Rename refactoring [message #61818] |
Thu, 19 June 2003 13:37 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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.03162 seconds