• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))


  • Subject: Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))
  • From: David Avendasora <email@hidden>
  • Date: Mon, 28 Dec 2009 18:08:46 -0500

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@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))
      • From: "Cheong Hee (Gmail)" <email@hidden>
References: 
 >Refactor java files (Prev: OT: Refactor files into packages (Eclipse)) (From: "Cheong Hee (Gmail)" <email@hidden>)
 >Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse)) (From: David Avendasora <email@hidden>)
 >Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse)) (From: Cheong Hee Ng <email@hidden>)

  • Prev by Date: Re: Stored procedure problem
  • Next by Date: Re: Stored procedure problem
  • Previous by thread: Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))
  • Next by thread: Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))
  • Index(es):
    • Date
    • Thread