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
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:


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


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

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


[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...

Previous Topic:My Plugin only works in helios!!
Next Topic:Command to cycle through tab folder
Goto Forum:

Current Time: Sat May 26 06:05:08 GMT 2018

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

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

Back to the top