Hi Cheong Hee,

Sorry, I misunderstood.

I always created the packages first, then moved the source files in and let 
Eclipse refactor the package names for me. I've never tried to do the reverse.

Dave

On Dec 28, 2009, at 1:22 PM, Cheong Hee Ng wrote:

> Hi David
> 
> I think this is one of ways I am doing so far as in (1) and (2).  I thought 
> there may be a lazy way to do it => when all java files moved/copied into 
> "Sources", these java files (since package has been defined in each java 
> file) could be moved into package all at one go.
> 
> Currently, moving one java file at a time is tedious and may be prone to 
> manual error (considering  quite big number of files to move into packages).  
> If Eclipse can't do that, I may need to find a tool to move the java files 
> into their package before moving them into Eclipse/Resources.  Is this what 
> you guys are doing during migration?
> 
> Cheers
> 
> Cheong Hee
>   
> 
> On Mon, Dec 28, 2009 at 7:14 PM, David Avendasora <[email protected]> 
> wrote:
> Hi Cheong Hee,
> 
> I just tested this on a new project. Here is what I had to do to get Eclipse 
> to automatically refactor the package declaration:
> 
> 1) Move .java file into the root of "Sources"
> 2) Move the .java file into a package.
> 
> If you move the .java file from the project root directly into a package 
> Eclipse will _not_ automatically add the package declaration. It only does it 
> if the .java file is already in a directory that is designated as a source 
> folder.
> 
> Dave
> 
> On Dec 27, 2009, at 11:27 PM, Cheong Hee (Gmail) wrote:
> 
>> Hi
>>  
>> Following previous tips on this item, I have tried both way as suggested:
>> 1.  moved java files to Sources using WOExplorer
>> 2.  Refactor -> rename
>>  
>> I had no luck to turn them directly into packages.  To recap, I am trying to 
>> move in some existing java files with package defined into new WO Framework 
>> project in Eclipse.  It turned out the files only moved in as "default 
>> package" and manually works need to be done to do it one at a time. 
>>  
>> anything missing here or am I the only one have this problem?  Really 
>> appreciate pointers.  I have quite some files to move into framework.
>>  
>> Cheers
>>  
>> Cheong Hee
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>> 
>> This email sent to [email protected]
> 
> David Avendasora
> Senior Software Engineer
> K12, Inc.
> 
> *****
> WebObjects Documentation Wiki : 
> http://wiki.objectstyle.org/confluence/display/WO/
> *****
> WebObjects API: 
> http://developer.apple.com/legacy/mac/library/documentation/MacOSXServer/Reference/WO54_Reference/index.html
> *****
> 
> 

David Avendasora
Senior Software Engineer
K12, Inc.

*****
WebObjects Documentation Wiki : 
http://wiki.objectstyle.org/confluence/display/WO/
*****
WebObjects API: 
http://developer.apple.com/legacy/mac/library/documentation/MacOSXServer/Reference/WO54_Reference/index.html
*****

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to