Rename refactoring [message #61818] |
Thu, 19 June 2003 13:37 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02950 seconds