Skip to main content


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 09:56 Go to next message
Alexander Mack is currently offline Alexander MackFriend
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 09:56]

Report message to a moderator

Re: Rename Java Package programmatically [message #668334 is a reply to message #668168] Thu, 05 May 2011 09:18 Go to previous message
David  Pérez is currently offline David PérezFriend
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 Apr 25 07:57:46 GMT 2024

Powered by FUDForum. Page generated in 0.02841 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top