Search in sources :

Example 1 with DeleteFromModelAction

use of com.archimatetool.editor.diagram.actions.DeleteFromModelAction in project archi by archimatetool.

the class ArchimateDiagramEditor method createActions.

/**
 * Add some extra Actions - *after* the graphical viewer has been created
 */
@Override
@SuppressWarnings("unchecked")
protected void createActions(GraphicalViewer viewer) {
    super.createActions(viewer);
    ActionRegistry registry = getActionRegistry();
    IAction action;
    // Delete from Model
    action = new DeleteFromModelAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    // Viewpoints
    for (IViewpoint viewPoint : ViewpointManager.INSTANCE.getAllViewpoints()) {
        action = new ViewpointAction(this, viewPoint);
        registry.registerAction(action);
    }
    // Find/Replace
    action = new FindReplaceAction(getEditorSite().getWorkbenchWindow());
    registry.registerAction(action);
    // Generate View For
    action = new GenerateViewAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
}
Also used : ViewpointAction(com.archimatetool.editor.diagram.actions.ViewpointAction) IAction(org.eclipse.jface.action.IAction) DeleteFromModelAction(com.archimatetool.editor.diagram.actions.DeleteFromModelAction) FindReplaceAction(com.archimatetool.editor.diagram.actions.FindReplaceAction) GenerateViewAction(com.archimatetool.editor.diagram.actions.GenerateViewAction) IViewpoint(com.archimatetool.model.viewpoints.IViewpoint) ActionRegistry(org.eclipse.gef.ui.actions.ActionRegistry)

Aggregations

DeleteFromModelAction (com.archimatetool.editor.diagram.actions.DeleteFromModelAction)1 FindReplaceAction (com.archimatetool.editor.diagram.actions.FindReplaceAction)1 GenerateViewAction (com.archimatetool.editor.diagram.actions.GenerateViewAction)1 ViewpointAction (com.archimatetool.editor.diagram.actions.ViewpointAction)1 IViewpoint (com.archimatetool.model.viewpoints.IViewpoint)1 ActionRegistry (org.eclipse.gef.ui.actions.ActionRegistry)1 IAction (org.eclipse.jface.action.IAction)1