|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.builder.nature.ToggleXtextNatureAction
public class ToggleXtextNatureAction
Constructor Summary | |
---|---|
ToggleXtextNatureAction()
|
Method Summary | |
---|---|
boolean |
hasNature(org.eclipse.core.resources.IProject project)
|
void |
run(org.eclipse.jface.action.IAction action)
Performs this action. |
void |
selectionChanged(org.eclipse.jface.action.IAction action,
org.eclipse.jface.viewers.ISelection selection)
Notifies this action delegate that the selection in the workbench has changed. |
void |
setActivePart(org.eclipse.jface.action.IAction action,
org.eclipse.ui.IWorkbenchPart targetPart)
Sets the active part for the delegate. |
void |
toggleNature(org.eclipse.core.resources.IProject project)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToggleXtextNatureAction()
Method Detail |
---|
public void run(org.eclipse.jface.action.IAction action)
org.eclipse.ui.IActionDelegate
This method is called by the proxy action when the action has been triggered. Implement this method to do the actual work.
Note: If the action delegate also implements
IActionDelegate2
, then this method is not invoked but
instead the runWithEvent(IAction, Event)
method is called.
run
in interface org.eclipse.ui.IActionDelegate
action
- the action proxy that handles the presentation portion of the
actionpublic void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
org.eclipse.ui.IActionDelegate
Implementers can use this opportunity to change the availability of the action or to modify other presentation properties.
When the selection changes, the action enablement state is updated based on the criteria specified in the plugin.xml file. Then the delegate is notified of the selection change regardless of whether the enablement criteria in the plugin.xml file is met.
selectionChanged
in interface org.eclipse.ui.IActionDelegate
action
- the action proxy that handles presentation portion of
the actionselection
- the current selection, or null
if there
is no selection.public void setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)
org.eclipse.ui.IObjectActionDelegate
This method will be called every time the action appears in a popup menu. The targetPart may change with each invocation.
setActivePart
in interface org.eclipse.ui.IObjectActionDelegate
action
- the action proxy that handles presentation portion of the
action; must not be null
.targetPart
- the new part target; must not be null
.public void toggleNature(org.eclipse.core.resources.IProject project)
public boolean hasNature(org.eclipse.core.resources.IProject project)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |