public abstract class ActionsImplementationProvider extends Object
public boolean canRename(Lookup lookup) { Node[] nodes = lookup.lookupAll(Node.class); if (..one node selected and the node belongs to java...) return true; else return false; } public void doRename(Lookup selectedNodes) { Node[] nodes = lookup.lookupAll(Node.class); final FileObject fo = getFileFromNode(nodes[0]); UI.openRefactoringUI(new RenameRefactoringUI(fo); }For help on creating and registering actions See Refactoring FAQ
Constructor and Description |
---|
ActionsImplementationProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCopy(Lookup lookup) |
boolean |
canDelete(Lookup lookup) |
boolean |
canFindUsages(Lookup lookup) |
boolean |
canMove(Lookup lookup) |
boolean |
canRename(Lookup lookup) |
void |
doCopy(Lookup lookup) |
void |
doDelete(Lookup lookup) |
void |
doFindUsages(Lookup lookup) |
void |
doMove(Lookup lookup) |
void |
doRename(Lookup lookup) |
public boolean canRename(Lookup lookup)
lookup
- current contextpublic void doRename(Lookup lookup)
lookup
- current contextpublic boolean canFindUsages(Lookup lookup)
lookup
- current contextpublic void doFindUsages(Lookup lookup)
lookup
- current contextpublic boolean canDelete(Lookup lookup)
lookup
- current contextpublic void doDelete(Lookup lookup)
lookup
- current contextpublic boolean canMove(Lookup lookup)
lookup
- current contextpublic void doMove(Lookup lookup)
lookup
- current contextpublic boolean canCopy(Lookup lookup)
lookup
- current contextpublic void doCopy(Lookup lookup)
lookup
- current context