Search in sources :

Example 1 with SetPartSettingsAction

use of org.jkiss.dbeaver.erd.ui.editor.tools.SetPartSettingsAction in project dbeaver by dbeaver.

the class ERDEditorPart method fillPartContextMenu.

public void fillPartContextMenu(IMenuManager menu, IStructuredSelection selection) {
    if (selection.isEmpty()) {
        return;
    }
    menu.add(new ChangeZOrderAction(this, selection, true));
    menu.add(new ChangeZOrderAction(this, selection, false));
    menu.add(new SetPartColorAction(this, selection));
    ResetPartColorAction resetPartColorAction = new ResetPartColorAction(this, selection);
    if (resetPartColorAction.isEnabled()) {
        menu.add(resetPartColorAction);
    }
    SetPartSettingsAction settingsAction = new SetPartSettingsAction(this, selection);
    if (settingsAction.isEnabled()) {
        menu.add(settingsAction);
    }
/*
        Set<IAction> actionSet = new HashSet<>();
        for (Object actionId : getSelectionActions()) {
            IAction action = getActionRegistry().getAction(actionId);
            if (!actionSet.contains(action)) {
                menu.add(action);
                actionSet.add(action);
            }
        }
*/
}
Also used : ResetPartColorAction(org.jkiss.dbeaver.erd.ui.editor.tools.ResetPartColorAction) ChangeZOrderAction(org.jkiss.dbeaver.erd.ui.editor.tools.ChangeZOrderAction) SetPartSettingsAction(org.jkiss.dbeaver.erd.ui.editor.tools.SetPartSettingsAction) SetPartColorAction(org.jkiss.dbeaver.erd.ui.editor.tools.SetPartColorAction)

Example 2 with SetPartSettingsAction

use of org.jkiss.dbeaver.erd.ui.editor.tools.SetPartSettingsAction in project dbeaver by serge-rider.

the class ERDEditorPart method fillPartContextMenu.

public void fillPartContextMenu(IMenuManager menu, IStructuredSelection selection) {
    if (selection.isEmpty()) {
        return;
    }
    menu.add(new ChangeZOrderAction(this, selection, true));
    menu.add(new ChangeZOrderAction(this, selection, false));
    menu.add(new SetPartColorAction(this, selection));
    ResetPartColorAction resetPartColorAction = new ResetPartColorAction(this, selection);
    if (resetPartColorAction.isEnabled()) {
        menu.add(resetPartColorAction);
    }
    SetPartSettingsAction settingsAction = new SetPartSettingsAction(this, selection);
    if (settingsAction.isEnabled()) {
        menu.add(settingsAction);
    }
/*
        Set<IAction> actionSet = new HashSet<>();
        for (Object actionId : getSelectionActions()) {
            IAction action = getActionRegistry().getAction(actionId);
            if (!actionSet.contains(action)) {
                menu.add(action);
                actionSet.add(action);
            }
        }
*/
}
Also used : ResetPartColorAction(org.jkiss.dbeaver.erd.ui.editor.tools.ResetPartColorAction) ChangeZOrderAction(org.jkiss.dbeaver.erd.ui.editor.tools.ChangeZOrderAction) SetPartSettingsAction(org.jkiss.dbeaver.erd.ui.editor.tools.SetPartSettingsAction) SetPartColorAction(org.jkiss.dbeaver.erd.ui.editor.tools.SetPartColorAction)

Aggregations

ChangeZOrderAction (org.jkiss.dbeaver.erd.ui.editor.tools.ChangeZOrderAction)2 ResetPartColorAction (org.jkiss.dbeaver.erd.ui.editor.tools.ResetPartColorAction)2 SetPartColorAction (org.jkiss.dbeaver.erd.ui.editor.tools.SetPartColorAction)2 SetPartSettingsAction (org.jkiss.dbeaver.erd.ui.editor.tools.SetPartSettingsAction)2