public abstract class AbstractAddToNewDiagramAction
extends org.eclipse.gmf.runtime.common.ui.action.AbstractActionDelegate
implements org.eclipse.ui.IWorkbenchWindowActionDelegate, org.eclipse.ui.IObjectActionDelegate
| Constructor and Description |
|---|
AbstractAddToNewDiagramAction() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart |
createDiagramEditPart(java.util.List targetEl,
org.eclipse.core.runtime.IProgressMonitor monitor)
This method will create a new file and open the editor up
|
void |
doRun(org.eclipse.core.runtime.IProgressMonitor progressMonitor) |
protected org.eclipse.gef.Request |
getDropRequest(java.util.List targetElements)
Gets the request for dropping the target elements onto the new class
diagram.
|
protected org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart |
getOpenedDiagramEditPart()
Return the DiagramEditPart in the new editor that the shape was added to.
|
protected org.eclipse.jface.viewers.ISelection |
getSelection()
This method returns the current selection for the action delegate.
|
protected abstract IUIContext |
getUIContext()
Subclassers must override to return a UI context corresponding
to the diagram type that this selection will be added to, i.e.
|
protected org.eclipse.ui.IWorkbenchWindow |
getWindow()
Obtains the workbench window from the part's site and returns it.
|
org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress.WorkIndicatorType |
getWorkIndicatorType() |
protected boolean |
isToSaveDiagram()
Returns true if the changes to the diagram edit part should be saved to
file.
|
void |
selectionChanged(org.eclipse.jface.action.IAction action,
org.eclipse.jface.viewers.ISelection selection) |
protected void |
setSelection(org.eclipse.jface.viewers.ISelection selection)
Sets the currentSelection to the given selection.
|
dispose, getAction, getActionManager, getLabel, getOperationHistory, getStructuredSelection, getWorkbenchPart, getWorkbenchWindow, handle, init, init, init, isRunnable, isSetup, needsSetup, openErrorDialog, partActivated, partBroughtToTop, partClosed, partDeactivated, partOpened, refresh, run, run, runWithEvent, setAction, setActiveEditor, setActivePart, setSetup, setup, setWorkbenchPart, setWorkbenchWindowprotected org.eclipse.jface.viewers.ISelection getSelection()
getSelection in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionDelegateprotected void setSelection(org.eclipse.jface.viewers.ISelection selection)
selection - the ISelection to set the currentSelection to.protected org.eclipse.ui.IWorkbenchWindow getWindow()
protected org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart getOpenedDiagramEditPart()
public void doRun(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
doRun in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionDelegateIActionDelegate.run(IAction)protected org.eclipse.gef.Request getDropRequest(java.util.List targetElements)
targetElements - the elements to be added to the new class diagram.protected boolean isToSaveDiagram()
public org.eclipse.gmf.runtime.common.ui.action.IActionWithProgress.WorkIndicatorType getWorkIndicatorType()
getWorkIndicatorType in interface org.eclipse.gmf.runtime.common.ui.action.IActionWithProgressgetWorkIndicatorType in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionDelegatepublic void selectionChanged(org.eclipse.jface.action.IAction action,
org.eclipse.jface.viewers.ISelection selection)
selectionChanged in interface org.eclipse.ui.IActionDelegateselectionChanged in class org.eclipse.gmf.runtime.common.ui.action.AbstractActionDelegateprotected abstract org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart createDiagramEditPart(java.util.List targetEl,
org.eclipse.core.runtime.IProgressMonitor monitor)
targetEl - List with element that is the target used to derive the filename and diagram path.monitor - ProgressMonitor to track the creation of diagram edit part.protected abstract IUIContext getUIContext()