|
Eclipse JDT 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jdt.ui.refactoring.RenameSupport
Central access point to execute rename refactorings.
Field Summary | |
static int |
NONE
Flag indication that no additional update is to be performed. |
static int |
UPDATE_GETTER_METHOD
Flag indicating that the getter method is to be updated as well. |
static int |
UPDATE_JAVADOC_COMMENTS
Flag indicating that Java doc comments are to be updated as well. |
static int |
UPDATE_REFERENCES
Flag indicating that references are to be updated as well. |
static int |
UPDATE_REGULAR_COMMENTS
Flag indicating that regular comments are to be updated as well. |
static int |
UPDATE_SETTER_METHOD
Flag indicating that the setter method is to be updated as well. |
static int |
UPDATE_STRING_LITERALS
Flag indicating that string literals are to be updated as well. |
Method Summary | |
static RenameSupport |
create(ICompilationUnit unit,
String newName,
int flags)
Creates a new rename support for the given ICompilationUnit. |
static RenameSupport |
create(IField field,
String newName,
int flags)
Creates a new rename support for the given IField. |
static RenameSupport |
create(IJavaProject project,
String newName,
int flags)
Creates a new rename support for the given IJavaProject. |
static RenameSupport |
create(IMethod method,
String newName,
int flags)
Creates a new rename support for the given IMethod. |
static RenameSupport |
create(IPackageFragmentRoot root,
String newName)
Creates a new rename support for the given IPackageFragmentRoot. |
static RenameSupport |
create(IPackageFragment fragment,
String newName,
int flags)
Creates a new rename support for the given IPackageFragment. |
static RenameSupport |
create(IType type,
String newName,
int flags)
Creates a new rename support for the given IType. |
void |
openDialog(Shell parent)
Opens the refactoring dialog for this rename support. |
void |
perform(Shell parent,
IRunnableContext context)
Executes the rename refactoring without showing a dialog to gather additional user input (for example the new name of the IJavaElement). |
IStatus |
preCheck()
Executes some light weight precondition checking. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int UPDATE_REFERENCES
public static final int UPDATE_JAVADOC_COMMENTS
public static final int UPDATE_REGULAR_COMMENTS
public static final int UPDATE_STRING_LITERALS
public static final int UPDATE_GETTER_METHOD
public static final int UPDATE_SETTER_METHOD
Method Detail |
public IStatus preCheck() throws CoreException
openDialog
or
perform
.
The method is mainly used to determine enable/disablement of actions.if
- an unexpected exception occurs while performing the checking.openDialog(Shell)
,
perform(Shell, IRunnableContext)
public void openDialog(Shell parent) throws CoreException
parent
- a shell used as a parent for the refactoring dialog.CoreException
- if an unexpected exception occurs while opening the
dialog.public void perform(Shell parent, IRunnableContext context) throws InterruptedException, InvocationTargetException
parent
- a shell used as a parent for the error dialog.context
- a IRunnableContext to execute the operation.InterruptedException
- if the operation has been canceled by the
user.InvocationTargetException
- if an error occured while executing the
operation.openDialog(Shell)
,
IRunnableContext.run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
public static RenameSupport create(IJavaProject project, String newName, int flags) throws CoreException
project
- the IJavaProject to be renamed.newName
- the project's new name. null
is a valid
value indicating that no new name is provided.flags
- flags controlling additional parameters. Valid flags are
UPDATE_REFERENCES
or NONE
.CoreException
- if an unexpected error occured while creating
the RenameSupport.public static RenameSupport create(IPackageFragmentRoot root, String newName) throws CoreException
root
- the IPackageFragmentRoot to be renamed.newName
- the package fragment roor's new name. null
is
a valid value indicating that no new name is provided.CoreException
- if an unexpected error occured while creating
the RenameSupport.public static RenameSupport create(IPackageFragment fragment, String newName, int flags) throws CoreException
fragment
- the IPackageFragment to be renamed.newName
- the package fragement's new name. null
is a
valid value indicating that no new name is provided.flags
- flags controlling additional parameters. Valid flags are
UPDATE_REFERENCES
, UPDATE_JAVADOC_COMMENTS
,
UPDATE_REGULAR_COMMENTS
and
UPDATE_STRING_LITERALS
, or their bitwise OR, or
NONE
.CoreException
- if an unexpected error occured while creating
the RenameSupport.public static RenameSupport create(ICompilationUnit unit, String newName, int flags) throws CoreException
unit
- the ICompilationUnit to be renamed.newName
- the compilation unit's new name. null
is a
valid value indicating that no new name is provided.flags
- flags controlling additional parameters. Valid flags are
UPDATE_REFERENCES
, UPDATE_JAVADOC_COMMENTS
,
UPDATE_REGULAR_COMMENTS
and
UPDATE_STRING_LITERALS
, or their bitwise OR, or
NONE
.CoreException
- if an unexpected error occured while creating
the RenameSupport.public static RenameSupport create(IType type, String newName, int flags) throws CoreException
type
- the IType to be renamed.newName
- the type's new name. null
is a valid value
indicating that no new name is provided.flags
- flags controlling additional parameters. Valid flags are
UPDATE_REFERENCES
, UPDATE_JAVADOC_COMMENTS
,
UPDATE_REGULAR_COMMENTS
and
UPDATE_STRING_LITERALS
, or their bitwise OR, or
NONE
.CoreException
- if an unexpected error occured while creating
the RenameSupport.public static RenameSupport create(IMethod method, String newName, int flags) throws CoreException
method
- the IMethod to be renamed.newName
- the method's new name. null
is a valid value
indicating that no new name is provided.flags
- flags controlling additional parameters. Valid flags are
UPDATE_REFERENCES
or NONE
.CoreException
- if an unexpected error occured while creating
the RenameSupport.public static RenameSupport create(IField field, String newName, int flags) throws CoreException
method
- the IField to be renamed.newName
- the field's new name. null
is a valid value
indicating that no new name is provided.flags
- flags controlling additional parameters. Valid flags are
UPDATE_REFERENCES
, UPDATE_JAVADOC_COMMENTS
,
UPDATE_REGULAR_COMMENTS
,
UPDATE_STRING_LITERALS
, UPDATE_GETTER_METHOD
and UPDATE_SETTER_METHOD, or their bitwise OR, or
NONE
.CoreException
- if an unexpected error occured while creating
the RenameSupport.
|
Eclipse JDT 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |