Changing package structure through scripts

Hi ,
I have a project with huge number of files(around 2 thousand).
I want to change the package structure of my source files.Previously no consistent approach is followed.so i want to correct that now.
I can map each file to a new package structure.
example: mypackage\common\sample.java = app\comon\Using this input i want to correct oackage and releated imports in my java files.Can any one help me write the best one
or even if anyone can point to anything of this sort written earlier it would be of great help to me.
Thanks in advance.

..And I am not looking for a simple search replace
option...
as it is very difficult for me to test this project.
So, I am looking for a reliable way of changing
package and import statements in the depending filesThis would still be a simple search and replace just with "package " and "import " in front of the package name to search for. But you would still have problems whenever the following is used:
a.b.c.d.F bogus = new a.nb.c.d.F();As a matter of fact, simple search and replace (as long as it is done on the entire package name and not just parts of it) is probably your best bet, if you do not want to go the IDE way. There would probably still be a few mistakes, but there shouldn't be many (if your mapping is reliable). The other problem is would be if classes in one package are to be split into multiple packages, then have fun with any script you write to do it.

Similar Messages

  • Change font type through scripting support.

    Please help me for this scripting support. . I have 100 of PSD with text. Text is brush script. I need to change font as some other font through scripting.

    With the Mail App you cannot change the font.

  • App-V Server : Changing Package Name through Powershell.

    Hi,
    Is it possible to change the package name through powershell ?
    Here is the sequence i tried which didn't work...
     $package=Get-AppvServerPackage -PackageID ""
     $package.name="<new name>"
     Set-AppvServerPackage -AppvServerPackage $package
    And also the version set to all the packages is set to 0.0.0.1 , Is there any other place where they save the version of software or they don't deal with software version ?
    Any help on this would be great...
    Thanks,
    Sumit.

    I doubt that you can modify the package name 'afterwards'. If the package name really is a concern (users usually don't see that), it should be modified using the Sequencer or Application Virtualization Explorer.
    Falko
    Twitter
    @kirk_tn   |   Blog
    kirxblog   |   Web
    kirx.org   |   Fireside
    appvbook.com

  • Change Color Settings through Scripting

    We're having an issue at my work where Photoshiop is frequently losing its Color Settings.  Is there a way to modify these settings through scripting, so I can have it run automatically?  The settings are:
    Working Spaces
    RGB:  sRGB IEC61966-2.1
    Color Management Policies
    RGB: Covert to Working RGB
    Turn off “Ask when opening” for profile mismatches and missing profiles
    Conversion options
    Intent: Perceptual
    Thank you for your help.

    May be one of these will help…? Add to the event manager… You should really be looking at why this happens thou… Change to suit your settings name…
    app.load( File( Folder.appData + 'Adobe/Color/Profiles/Recommended/CoatedFOGRA39.icc' ) );
    app.colorSettings = 'CoatedFOGRA39.icc';

  • Changing Text Color Through Scripting?

    Is it possible to change the color of a text field within a
    display icon through scripting ?
    Basically using a calc icon I want to display text within a
    display icon and change the text color as well. Ideally I would
    like to use authorware's RGB function to change the text colour.
    Any help greatly appreciated. Thanks in advance.

    "Mike P" <[email protected]> wrote in
    message
    news:fq5vdj$8jt$[email protected]..
    > Is it possible to change the color of a text field
    within a display icon
    > through scripting ?
    >
    > Basically using a calc icon I want to display text
    within a display icon
    > and
    > change the text color as well. Ideally I would like to
    use authorware's
    > RGB
    > function to change the text colour.
    No. You have two choices. The first is something like this:
    {varRed}{varBlue}{varGreen}
    the {varRed} text would be red
    {varBlue} would be blue
    {varGreen} would be green.
    Then:
    varRed := "This is some text"
    varBlue := varGreen := ""
    Your text would be red if Update Displayed Variables was
    checked on the
    icon.
    You can also use RTF Objects, which will allow you to set
    font color using
    named colors or hexadecimals.
    HTH;
    Amy

  • Change the package of SAP script

    How to change the package of SAP script from local to other package?

    Hi Manish,
    Check this one:
    Change of package for Sap script
    Regards,
    Chandra Sekhar

  • What is package structure for Client ABAP Proxy?

    1.     What is the package structure need to be  followed for creating abap client proxy.
    2.     I read some where in the form, it need to be 4 levels. Why is it?
    Thank you
    Ganges Leaves

    Hi
    U hav to create a 4 level package structure for client ABAP proxy.
    U can create ur on packages
    1st level-structure package.
    2nd level-main package.
    3rd and 4th level-sub packages.
    To the 4th level only u hav to create proxy.
    The classes and code wil be automatically generated at the time of proxy creation.
    I think the 4 level structure bcz while in r/3 everythin in integration builder like software component version and all wil be takin as different levels.
    Also u can go through the weblogs in the above replies u got.
    Regards
    Victoria.

  • How to change package for Process chain

    Hi Experts,
               How do i change the package in the Transport connection. Iam transporting a PC from D to Q.
    1. I have some routines created in the infopackage.So i selected this one in the transport connection. I noticed under infopackages the following are also checked. a. infoobjects b. DataSource c. Infopackage d. Infopackage e. infosource f. transfer structure g. source system.will that cause problem in Q as I have them already in Q and P
    2. How do i change the package in the transport..Currentl all of them are &tmp. Please help me with the navigatioln steps.
    3. After clicking the truck icon, what shld i do ..do i have to transport the request as well. please provide me with steps.
    Thanks
    Dave
    Message was edited by: Dave Marcus

    1. I have some routines created in the infopackage.So i selected this one in the transport connection. I noticed under infopackages the following are also checked. a. infoobjects b. DataSource c. Infopackage d. Infopackage e. infosource f. transfer structure g. source system.will that cause problem in Q as I have them already in Q and P
    Ans : If you have ticked Transport Check button for Infopackage then only Infopackage is transported. Underlying Infoobjects, Transfer Structure etc. will not be transported.
    2. How do i change the package in the transport..Currentl all of them are &tmp. Please help me with the navigatioln steps.
    Ans : once you have pulled the necessary objects in the Transport Connection, Right click on the relevant object and select 'Change Package' to change the package from $tmp to others.
    3. After clicking the truck icon, what shld i do ..do i have to transport the request as well. please provide me with steps.
    Ans : Assign the Package by following question2, then assign Transport Request by clicking on the Truck Icon in Transport connection for the objects you have collected and then go to 'SE01' Transaction give the request number which you assigned in Transport connection and click on 'Display' which displays the request and all objects assigned to the request. select the Task Request and click on Truck icon which will release the task and then select the Main Request and click on Truck icon again which will release the main request.
    Thanks,
    Vamsi

  • Changing data structure in the receiver SOAP adapter

    I was wondering whether it is possible to have changing data structure in terms of one receiver SOAP adapter so I could sent data type 1 and 2 to a single XI web service enabled URL and make conditional parsing in terms of the received message ?
    I have a receiver SOAP adapter that ideally should be able to receive two different types of messages. But SOAP adapter is fixed to a sigle message interface that naturally has it's data structure set to just one type. I can just create conditions in terms of the data type 1 message that has been defined in the design side.
    Is it possible achieve this with just one SOAP receiver adapter?

    Henri,
    Please go through the note: 856597 (Quesiton NO 9)
    -Naveen.

  • Change of structure of database table

    A custom database table has been created and is already in use by 10 programs. Now a new requirement has come to add a field i.e. a check box to the database table to be used by one of the 10 programs. Can we change the structure of the database table after activating it and when the table is in use? Please provide me inputs on this.
    Thanks and regards
    Radhika

    Yes. U can change it. But I suggest u to do it through the process of 'Append Structure'.
    If u have any probelm after changing follow this process.
    Goto Utilities > Database Utilities> Activate and Adjust Database
    Awrd Points if useful
    Bhupal

  • Four layered package structure for ABAP proxies

    Hi
    I am trying to generate an outbound ( client ) abap proxy in our WAS 640 based ERP system by pointing to a XI message interface on the XI integration repository. I have a single package ZPROXY ( not a main or a structure package ) created in our ERP system to hold the proxy structures ( classes, interfaces ). I have this package assigned to a transport layer ( a common transport layer through which other ABAP objects are to be transported ). Is it really necessary to have a four layer package structures for proxies to be transported and work in the QA/Production system ?

    Hi Sudheer,
    Can you pls clarify what do you mean by 'four level package structure' ?
    Are you referring to the ABAP structures that get created during creating the proxy by SPROXY transaction ? These structures get automatically created. We simply have to write the code using these structures.
    Or do you mean the 'package' which is mandatory to create a transportable ABAP object ? i.e. transport from Development to Staging and then Production.
    Regards,

  • Is it possible to call a oracle packaged storedprocedure through

    Is it possible to call a oracle packaged storedprocedure through
    Deski?
    Also
    Receiving error when creating desktop intelligence report while using a
    stored procedure that retrieves data from globaltemporary table. Error
    message is " Object no longer exists". This same procedure can be
    successfully executed from eitherOracle SQL Plus or Crystal Reports.
    Any ideas , please help?

    It is possible to report off Stored Procedures in BusinessObjects Desktop Intelligence XIR2.  What you need to do is to configure your Stored Procedure as a data source. If you use parameter please make sure  that the default database is set to the database that contains the stored procedure.
    e.g. Click the correct DSN for the stored procedure. Click Configure.Click Next until the Change the default database to option appears.Change the default database to the database that contains the stored procedure.
    I hope this helps,
    Regards,
    Tim

  • How to load the Employee Images through Script

    Dear All,
    How to load Employee Images into HRMS module through script, Pls provide scripts any body having..
    Thank in advance,
    Hanimi
    Edited by: Hanimi on Jun 7, 2011 10:12 AM

    Hi Hussain,
    Following ctl file is working fine for loading images, But problem is at a time it is loading only 64 rows, pls let me know what i have change in my ctl file for loading all data at a time..
    load data
    infile '/usr/tmp/Images_Data.dat'
    INTO TABLE PER_IMAGES
    append
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS(
    parent_id,
    table_name constant "PER_PEOPLE_F",
    ext_fname FILLER CHAR(80),
    "IMAGE" LOBFILE(ext_fname) TERMINATED BY EOF,i
    mage_id "PER_IMAGES_S.nextval"
    Thanks,
    Hanimi..

  • HowTo: Use package structure in generated code?

    Hi,
    I'm trying to find out if JCS is meeting my requirements for JSF development. So far it is pretty good, although the lack of support for new components is defeating the purpose of JSF for a great deal.
    One of the most terrible things I encountered so far is the fact that I've been unable to get JCS to create a package structure to contain the generated code. In other words, I want JSC to generate the code in "src/com.foo.bar.my.application" instead of just the root of "src/" (where src/ means the source-folder of my project).
    This is a real drawback.
    Maybe I'm wrong, but in that case it's a plain bug because I can't get it to work.
    Iwan

    Admitedly, Creator does not yet offer much flexibility in terms of user-defined package structure. I know you won't like this, but here's a workaround/hack that almost gets to where you want to be.
    First of all, the binding between jsp file and backing bean is defined by the relative positioning between the two files. A JSP file at the top level folder maps to a backing bean just under the assigned java package name (something like webapplicationxx). If you create a directory structure for your JSPs and create pages in them, Creator will create a corresponding package hierarchy for the backing beans.
    So, one way to contrive a java package structure such as com.foo.bar is as follows (best to start with a new project):
    1. Under the Web Pages folder, create a subfolder hierarchy "foo/bar".
    3. Under the Java Sources folder, rename the top level package to 'com'.
    4. You may now create Web pages in the foo/bar subfolder. You'll probably want to cut & paste the Resources directory into the foo/bar folder if you want to use stylesheets, etc. As the pages are created, notice that a com/foo/bar package structure is created under the Java Sources node where the backing beans are maintained.
    One final note, due to a bug in Creator, renaming the package in step 3 does not properly update references to the old pacakge in SessionBean1.java. These will have to be manually changed in the editor. Also note that the ApplicationBean1 and SessionBean1 files must remain at under to top-level package.
    We acknowledge this deficiency in Creator and are working to fix it in the next release.

  • Package structure

    Well i actually develop a soft and i have a little question about packages structure.
    My application is composed is composed of a main JFrame with a JDesktopPane and
    a primary JInternalFrame. Some others JIF are used and in order to make it clear,
    i try to use this structure for the implementation.
    In my main directory, the Gui is placed. All the JIF are placed in a subdirectory called
    GuiFrames (and also as a package GuiFrames). For some reasons, I have to give the Gui class
    as argument to the JIF in order to keep a link to the main frame when switching from one
    JIF to another (there will be only one JIF visible in the JFrame).
    The problem is that the reference i use (ie the mainclass name) throw me to a
    "can't resolve symbol ..." problem. I don't know how to make a reference to a class that is just above in such a structure.
    let's resume it through this small draw :
    MainClass.java
    |
    |
    --> Package GuiFrames
    .... |
    .... --> JIFrameOne.java
    .... |
    .... --> JIFrameTwo.java
    .... |
    .... --> JIFrameThree.java
    .... |
    .... --> JIFrameFour.java
    .... |
    .... --> JIFrameFive.java
    In each JIFramexxxx.java, i need a link to MainClass.java, but MainClass.java can't be found from the package GuiFrames.
    Any suggestion would be welcome.
    Marc.
    PS: the easiest way would be to put all the JIF in the same directory as the MainClass, but i would avoid this for some development reasons.

    Put your MainClass in a specified package (instead of the default, nameless package as you have now) and import it in your JIFrame... classes.
    package MyPackage
    |
    --> MainClass.java
    .... |
    .... --> package GuiFrames
    .... .... |
    .... .... --> JIFrameOne.java
    so the source code looks like:
    // MainClass.java
    package MyPackage;
    public class MainClass {
    // JIFrameOne.java
    package MyPackage.GuiFrames;
    import MyPackage.MainClass;
    public class JIFrameOne {
    }Jesper

Maybe you are looking for

  • Mac Pro 4,1 kernel panic - restarts on its own

    I have a Mac Pro 4,1 that will not finish the start up process   It kernel panics at the end of the process. It will then do a restart on its own and kernel panics again. What's the best way to figure out what's wrong with it?  HDs? Processor ? Or th

  • How to see all the extractors(standar or not) used in BW system

    Hi experts, As requirement of our users, they ask us show them all the list of extractors used in our systems. I thoguht that we can check the flows one by one but they are so many. there is another way to see all the extractors used? I checked in th

  • Need to turn many old loads red

    Hi I am trying to clean our test system and we have many loads (mainly master data) that are stuck on yellow, approximately 800 going back a few months from old infopackage groups. I have stopped all loads from running until I sort this but is there

  • Datasource return nothing

    Hi experts! If a datasource return no record how I can check this ?? using if condition And display an error message

  • AP 1310 with WLC 5508

    Hi, I have upgraded my WLC 5508 from 7.0 to 7.4 and the AP 1310 no longer can associate to WLC. Seems that the AP doesn't work with WLC ver 7.4 Except changing these APs to autonomous mode, any other alternatives? Besides, if we change them to autono