Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Rename Java Package programmatically(and rename subpackages)
Rename Java Package programmatically [message #668168] Wed, 04 May 2011 05:56 Go to next message
Alexander Mack is currently offline Alexander Mack
Messages: 100
Registered: July 2009
Senior Member
Hello,
I am trying to rename a java package programmatically.
Everything works fine so far, except the renaming of subpackages.
Lets assume the following package structue:

classmodel
classmodel.test
classmodel.test.subtest

If I rename the package classmodel.test to classmodel.testing I want the package subtest to be renamed to this path as well. The new structure should be

classmodel
classmodel.testing
classmodel.testing.subtest

Any suggestions how to handle this?
This:
ISourceManipulation lPackage = getPackageToRename(lPath);
lPackage.rename(lNewName, false, lProgressMonitor);

renames the package but doesn't rename the subpackage test.subtest to testing.subtest...

Regards
Alex

[Updated on: Wed, 04 May 2011 05:56]

Report message to a moderator

Re: Rename Java Package programmatically [message #668334 is a reply to message #668168] Thu, 05 May 2011 05:18 Go to previous message
David  Pérez is currently offline David Pérez
Messages: 228
Registered: July 2009
Senior Member
I would say this question belongs to the JDT people...

David
Previous Topic:Command to cycle through tab folder
Next Topic:Small CommandContributionItem improvement
Goto Forum:
  


Current Time: Thu Jul 24 02:26:09 EDT 2014

Powered by FUDForum. Page generated in 0.04600 seconds