Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Rename refactoring
Rename refactoring [message #61818] Thu, 19 June 2003 13:37 Go to next message
Eclipse UserFriend
Originally posted by: scheglov_ke.nlmk.ru

Is it possible to start rename refactoring in plugin?
I want to rename local variables, fields and methods.

--
SY, Konstantin.
Re: Rename refactoring [message #61888 is a reply to message #61818] Thu, 19 June 2003 15:22 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

You can rename fields and methods, but local variables are still
protected and not available as api.

Here's an example that allows a IField to be renamed:

try {
RenameSupport rename =
RenameSupport.create(
(IField) field,
dialog.getFinalName(),
RenameSupport.UPDATE_GETTER_METHOD
| RenameSupport.UPDATE_JAVADOC_COMMENTS
| RenameSupport.UPDATE_REFERENCES
| RenameSupport.UPDATE_REGULAR_COMMENTS
| RenameSupport.UPDATE_SETTER_METHOD
| RenameSupport.UPDATE_STRING_LITERALS);
rename.perform(
targetPart.getSite().getShell(),
targetPart.getSite().getWorkbenchWindow());
} catch (CoreException e) {
} catch (InterruptedException e) {
} catch (InvocationTargetException e) {
}

Where org.eclipse.jdt.ui.refactoring.RenameSupport.

Rich
Previous Topic:Using Eclipse (JDT) in a compiler class
Next Topic:CVS and importing external projects
Goto Forum:
  


Current Time: Sun Nov 03 12:16:28 GMT 2024

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

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

Back to the top