Search in sources :

Example 1 with TableAddAction

use of org.talend.sqlbuilder.erdiagram.ui.actions.TableAddAction in project tdi-studio-se by Talend.

the class ErDiagramMenuProvider method buildContextMenu.

@Override
public void buildContextMenu(IMenuManager menu) {
    menu.add(new Separator(RELATION));
    menu.add(new Separator(GEFActionConstants.GROUP_EDIT));
    IAction action;
    action = getAction(ActionFactory.DELETE.getId());
    ((ErDiagramItemDeleteAction) action).update();
    if (action.isEnabled()) {
        menu.appendToGroup(GEFActionConstants.GROUP_EDIT, action);
    }
    CreateRelationAction createRelation;
    createRelation = new CreateRelationAction(part);
    createRelation.update();
    if (createRelation.isEnabled()) {
        menu.add(createRelation);
    }
    TableAddAction addAction = new TableAddAction(part);
    addAction.update();
    menu.add(addAction);
}
Also used : TableAddAction(org.talend.sqlbuilder.erdiagram.ui.actions.TableAddAction) IAction(org.eclipse.jface.action.IAction) ErDiagramItemDeleteAction(org.talend.sqlbuilder.erdiagram.ui.actions.ErDiagramItemDeleteAction) CreateRelationAction(org.talend.sqlbuilder.erdiagram.ui.actions.CreateRelationAction) Separator(org.eclipse.jface.action.Separator)

Aggregations

IAction (org.eclipse.jface.action.IAction)1 Separator (org.eclipse.jface.action.Separator)1 CreateRelationAction (org.talend.sqlbuilder.erdiagram.ui.actions.CreateRelationAction)1 ErDiagramItemDeleteAction (org.talend.sqlbuilder.erdiagram.ui.actions.ErDiagramItemDeleteAction)1 TableAddAction (org.talend.sqlbuilder.erdiagram.ui.actions.TableAddAction)1