Search in sources :

Example 1 with IHandlerService

use of org.eclipse.ui.handlers.IHandlerService in project tdi-studio-se by Talend.

the class ProcessView method createPartControl.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
     */
@Override
public void createPartControl(Composite parent) {
    this.parent = parent;
    parent.setLayout(new FillLayout());
    sash = new SashForm(parent, SWT.HORIZONTAL | SWT.SMOOTH);
    sash.setLayoutData(new GridData(GridData.FILL_BOTH));
    sash.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    GridLayout layout = new GridLayout();
    sash.setLayout(layout);
    Composite left = new Composite(sash, SWT.NONE);
    left.setLayout(new FillLayout());
    Composite right = new Composite(sash, SWT.NONE);
    right.setLayout(new FormLayout());
    FormData layouDatag = new FormData();
    layouDatag.left = new FormAttachment(0, 0);
    layouDatag.width = 32;
    layouDatag.top = new FormAttachment(0, 0);
    layouDatag.bottom = new FormAttachment(100, 0);
    final Composite buttonComposite = new Composite(right, SWT.ERROR);
    buttonComposite.setLayoutData(layouDatag);
    buttonComposite.setLayout(new GridLayout());
    Composite cotextCom = new Composite(right, SWT.NONE);
    layouDatag = new FormData();
    layouDatag.left = new FormAttachment(0, 32);
    layouDatag.right = new FormAttachment(100, 0);
    layouDatag.top = new FormAttachment(0, 0);
    layouDatag.bottom = new FormAttachment(100, 0);
    cotextCom.setLayoutData(layouDatag);
    cotextCom.setLayout(new GridLayout());
    tabFactory.initComposite(left, false);
    moveButton = new Button(buttonComposite, SWT.PUSH);
    //$NON-NLS-1$
    moveButton.setText(">>");
    moveButton.setToolTipText(Messages.getString("ProcessComposite.hideContext"));
    final GridData layoutData = new GridData();
    layoutData.verticalAlignment = GridData.CENTER;
    layoutData.horizontalAlignment = GridData.CENTER;
    layoutData.grabExcessHorizontalSpace = true;
    layoutData.grabExcessVerticalSpace = true;
    moveButton.setLayoutData(layoutData);
    addListeners();
    sash.setSashWidth(5);
    sash.setWeights(new int[] { 18, 5 });
    contextComposite = new ProcessContextComposite(cotextCom, SWT.NONE);
    contextComposite.setBackground(right.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    // processComposite = new ProcessComposite(tabFactory.getTabComposite(), SWT.H_SCROLL | SWT.V_SCROLL |
    // SWT.NO_FOCUS);
    // dc = processComposite;
    // createBasicComposite(tabFactory.getTabComposite(), element, null);
    tabFactory.getTabComposite().layout();
    tabFactory.addSelectionChangedListener(new ISelectionChangedListener() {

        @Override
        public void selectionChanged(SelectionChangedEvent event) {
            IStructuredSelection selection = (IStructuredSelection) event.getSelection();
            TalendPropertyTabDescriptor descriptor = (TalendPropertyTabDescriptor) selection.getFirstElement();
            if (descriptor == null) {
                return;
            }
            if (currentSelectedTab != null && (currentSelectedTab.getCategory() != descriptor.getCategory())) {
                for (Control curControl : tabFactory.getTabComposite().getChildren()) {
                    curControl.dispose();
                }
            }
            if (currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
                currentSelectedTab = descriptor;
                selectedPrimary = false;
                createDynamicComposite(tabFactory.getTabComposite(), (Element) descriptor.getData(), descriptor.getCategory());
            }
        }
    });
    setElement();
    IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
    IHandler handler1;
    IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
    if (brandingService.getBrandingConfiguration().isAllowDebugMode()) {
        Action debugAction = new DebugAction();
        handler1 = new ActionHandler(debugAction);
        handlerService.activateHandler(debugAction.getActionDefinitionId(), handler1);
    }
    Action killAction = new KillAction();
    handler1 = new ActionHandler(killAction);
    handlerService.activateHandler(killAction.getActionDefinitionId(), handler1);
    FocusListener fl = new FocusListener() {

        @Override
        public void focusGained(FocusEvent e) {
            //$NON-NLS-1$
            log.trace(Messages.getString("ProcessView.gainFocusLog"));
            IContextService contextService = (IContextService) RunProcessPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
            //$NON-NLS-1$
            ca = contextService.activateContext("talend.runProcess");
        }

        @Override
        public void focusLost(FocusEvent e) {
            //$NON-NLS-1$
            log.trace(Messages.getString("ProcessView.lostFocusLog"));
            if (ca != null) {
                IContextService contextService = (IContextService) RunProcessPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
                contextService.deactivateContext(ca);
            }
        }
    };
    addListenerOnChildren(parent, fl);
    rubjobManager.setProcessShell(getSite().getShell());
    contextManagerListener = new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            if (RunProcessContextManager.PROP_ACTIVE.equals(evt.getPropertyName())) {
                // rubjobManager.setBooleanTrace(false);
                runningProcessChanged();
            }
        }
    };
    RunProcessPlugin.getDefault().getRunProcessContextManager().addPropertyChangeListener(contextManagerListener);
    runAction = new RunAction();
}
Also used : Action(org.eclipse.jface.action.Action) ClearPerformanceAction(org.talend.designer.runprocess.ui.actions.ClearPerformanceAction) PropertyChangeListener(java.beans.PropertyChangeListener) Element(org.talend.core.model.process.Element) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) FocusEvent(org.eclipse.swt.events.FocusEvent) GridLayout(org.eclipse.swt.layout.GridLayout) ProcessContextComposite(org.talend.designer.runprocess.ui.ProcessContextComposite) Control(org.eclipse.swt.widgets.Control) Button(org.eclipse.swt.widgets.Button) IContextService(org.eclipse.ui.contexts.IContextService) FormAttachment(org.eclipse.swt.layout.FormAttachment) FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) PropertyChangeEvent(java.beans.PropertyChangeEvent) TraceDebugProcessComposite(org.talend.designer.runprocess.ui.TraceDebugProcessComposite) Composite(org.eclipse.swt.widgets.Composite) TargetExecComposite(org.talend.designer.runprocess.ui.TargetExecComposite) MemoryRuntimeComposite(org.talend.designer.runprocess.ui.MemoryRuntimeComposite) AdvanceSettingComposite(org.talend.designer.runprocess.ui.AdvanceSettingComposite) MultipleThreadDynamicComposite(org.talend.designer.core.ui.views.properties.MultipleThreadDynamicComposite) ProcessComposite(org.talend.designer.runprocess.ui.ProcessComposite) ProcessContextComposite(org.talend.designer.runprocess.ui.ProcessContextComposite) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) FillLayout(org.eclipse.swt.layout.FillLayout) TalendPropertyTabDescriptor(org.talend.core.ui.properties.tab.TalendPropertyTabDescriptor) IBrandingService(org.talend.core.ui.branding.IBrandingService) SashForm(org.eclipse.swt.custom.SashForm) IHandlerService(org.eclipse.ui.handlers.IHandlerService) GridData(org.eclipse.swt.layout.GridData) IHandler(org.eclipse.core.commands.IHandler) ActionHandler(org.eclipse.ui.commands.ActionHandler) FocusListener(org.eclipse.swt.events.FocusListener)

Example 2 with IHandlerService

use of org.eclipse.ui.handlers.IHandlerService in project tdi-studio-se by Talend.

the class AbstractTalendEditor method configureGraphicalViewer.

@Override
protected void configureGraphicalViewer() {
    super.configureGraphicalViewer();
    /** * Manage the view in the Outline ** */
    ScrollingGraphicalViewer viewer = (ScrollingGraphicalViewer) getGraphicalViewer();
    viewer.setSelectionManager(new TalendSelectionManager());
    TalendScalableFreeformRootEditPart root = new TalendScalableFreeformRootEditPart(getEditorInput());
    List<String> zoomLevels = new ArrayList<String>();
    zoomLevels.add(ZoomManager.FIT_ALL);
    zoomLevels.add(ZoomManager.FIT_WIDTH);
    zoomLevels.add(ZoomManager.FIT_HEIGHT);
    root.getZoomManager().setZoomLevelContributions(zoomLevels);
    // root.getZoomManager().setZoomAnimationStyle(ZoomManager.ANIMATE_NEVER);
    IAction zoomIn = new ZoomInAction(root.getZoomManager());
    IAction zoomOut = new ZoomOutAction(root.getZoomManager());
    getActionRegistry().registerAction(zoomIn);
    getActionRegistry().registerAction(zoomOut);
    IHandlerService service = (IHandlerService) getEditorSite().getService(IHandlerService.class);
    service.activateHandler(zoomIn.getActionDefinitionId(), new ActionHandler(zoomIn));
    service.activateHandler(zoomOut.getActionDefinitionId(), new ActionHandler(zoomOut));
    IAction directEditAction = new DirectEditAction(this);
    getActionRegistry().registerAction(directEditAction);
    getSelectionActions().add(directEditAction.getId());
    IAction copyAction = new GEFCopyAction(this);
    getActionRegistry().registerAction(copyAction);
    getSelectionActions().add(copyAction.getId());
    // setAction(copyAction.getId(), copyAction);
    IAction pasteAction = new GEFPasteAction(this);
    getActionRegistry().registerAction(pasteAction);
    getSelectionActions().add(pasteAction.getId());
    // setAction(pasteAction.getId(), pasteAction);
    IAction deleteAction = new GEFDeleteAction(this);
    getActionRegistry().registerAction(deleteAction);
    getSelectionActions().add(deleteAction.getId());
    // setAction(deleteAction.getId(), deleteAction);
    IAction undoAction = new GEFUndoAction(this);
    getActionRegistry().registerAction(undoAction);
    getSelectionActions().add(undoAction.getId());
    IAction redoAction = new GEFRedoAction(this);
    getActionRegistry().registerAction(redoAction);
    getSelectionActions().add(redoAction.getId());
    IAction setRefAction = new ConnectionSetAsMainRef(this);
    getActionRegistry().registerAction(setRefAction);
    getSelectionActions().add(setRefAction.getId());
    IAction modifyMergeAction = new ModifyMergeOrderAction(this);
    getActionRegistry().registerAction(modifyMergeAction);
    getSelectionActions().add(modifyMergeAction.getId());
    IAction modifyOutputOrderAction = new ModifyOutputOrderAction(this);
    getActionRegistry().registerAction(modifyOutputOrderAction);
    getSelectionActions().add(modifyOutputOrderAction.getId());
    List<IAction> calcOrderActions = ModifyConnectionOrderAction.getOrderActions(this);
    for (IAction orderAction : calcOrderActions) {
        getActionRegistry().registerAction(orderAction);
        getSelectionActions().add(orderAction.getId());
    }
    viewer.setRootEditPart(root);
    PartFactory partFactory = new PartFactory();
    // set the factory to use for creating EditParts for elements in the model
    getGraphicalViewer().setEditPartFactory(partFactory);
    getGraphicalViewer().setKeyHandler(new NodePartKeyHander(getGraphicalViewer()).setParent(getCommonKeyHandler()));
    // GraphicalViewer graViewer = getGraphicalViewer();
    // graViewer.setKeyHandler(new GraphicalViewerKeyHandler(graViewer));
    initializeActivationCodeTrigger();
    /** * Management of the context menu ** */
    ContextMenuProvider cmProvider = new TalendEditorContextMenuProvider(this, viewer, getActionRegistry());
    viewer.setContextMenu(cmProvider);
    /** * Management of the Zoom ** */
    /*
         * ZoomManager manager = (ZoomManager) getGraphicalViewer().getProperty(ZoomManager.class.toString()); if
         * (manager != null) { manager.setZoom(getProcess().getZoom()); }
         */
    // Scroll-wheel Zoom
    getGraphicalViewer().setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.MOD1), MouseWheelZoomHandler.SINGLETON);
    /** * Snap To Grid ** */
    // Grid properties
    getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_SPACING, new Dimension(AbstractTalendEditor.GRID_SIZE, AbstractTalendEditor.GRID_SIZE));
    getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, new Boolean(true));
    // We keep grid visibility and enablement in sync
    getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, new Boolean(true));
    IAction showGrid = new ToggleGridAction(getGraphicalViewer());
    getActionRegistry().registerAction(showGrid);
    /** * Snap To Geometry ** */
    getGraphicalViewer().setProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED, new Boolean(false));
    IAction snapAction = new ToggleSnapToGeometryAction(getGraphicalViewer());
    getActionRegistry().registerAction(snapAction);
    configurationSubJob(viewer);
}
Also used : ModifyMergeOrderAction(org.talend.designer.core.ui.action.ModifyMergeOrderAction) ToggleSnapToGeometryAction(org.eclipse.gef.ui.actions.ToggleSnapToGeometryAction) GEFCopyAction(org.talend.designer.core.ui.action.GEFCopyAction) GEFPasteAction(org.talend.designer.core.ui.action.GEFPasteAction) GEFDeleteAction(org.talend.designer.core.ui.action.GEFDeleteAction) ZoomOutAction(org.eclipse.gef.ui.actions.ZoomOutAction) ProcessTreePartFactory(org.talend.designer.core.ui.editor.outline.ProcessTreePartFactory) ArrayList(java.util.ArrayList) ContextMenuProvider(org.eclipse.gef.ContextMenuProvider) ScrollingGraphicalViewer(org.eclipse.gef.ui.parts.ScrollingGraphicalViewer) NodePartKeyHander(org.talend.designer.core.ui.NodePartKeyHander) ModifyOutputOrderAction(org.talend.designer.core.ui.action.ModifyOutputOrderAction) DirectEditAction(org.eclipse.gef.ui.actions.DirectEditAction) ZoomInAction(org.eclipse.gef.ui.actions.ZoomInAction) IAction(org.eclipse.jface.action.IAction) ConnectionSetAsMainRef(org.talend.designer.core.ui.action.ConnectionSetAsMainRef) ToggleGridAction(org.eclipse.gef.ui.actions.ToggleGridAction) GEFUndoAction(org.talend.designer.core.ui.action.GEFUndoAction) Dimension(org.eclipse.draw2d.geometry.Dimension) IHandlerService(org.eclipse.ui.handlers.IHandlerService) GEFRedoAction(org.talend.designer.core.ui.action.GEFRedoAction) ActionHandler(org.eclipse.jface.commands.ActionHandler)

Example 3 with IHandlerService

use of org.eclipse.ui.handlers.IHandlerService in project dbeaver by serge-rider.

the class ActionUtils method runCommand.

public static void runCommand(String commandId, ISelection selection, IServiceLocator serviceLocator) {
    if (commandId != null) {
        try {
            ICommandService commandService = serviceLocator.getService(ICommandService.class);
            IHandlerService handlerService = serviceLocator.getService(IHandlerService.class);
            if (commandService != null) {
                Command command = commandService.getCommand(commandId);
                boolean needContextPatch = false;
                if (selection != null) {
                    needContextPatch = true;
                    if (serviceLocator instanceof IWorkbenchSite) {
                        final ISelection curSelection = ((IWorkbenchSite) serviceLocator).getSelectionProvider().getSelection();
                        if (curSelection instanceof IStructuredSelection && selection instanceof IStructuredSelection) {
                            if (((IStructuredSelection) curSelection).size() == ((IStructuredSelection) selection).size() && ((IStructuredSelection) curSelection).getFirstElement() == ((IStructuredSelection) selection).getFirstElement()) {
                                // The same selection
                                needContextPatch = false;
                            }
                        }
                    }
                }
                if (selection != null && needContextPatch) {
                    // Create new eval context
                    IEvaluationContext context = new EvaluationContext(handlerService.createContextSnapshot(false), selection);
                    if (serviceLocator instanceof IWorkbenchPartSite) {
                        context.addVariable(ISources.ACTIVE_PART_NAME, ((IWorkbenchPartSite) serviceLocator).getPart());
                    }
                    context.addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME, selection);
                    ParameterizedCommand pc = new ParameterizedCommand(command, null);
                    handlerService.executeCommandInContext(pc, null, context);
                } else if (command != null && command.isEnabled()) {
                    handlerService.executeCommand(commandId, null);
                }
            }
        } catch (Exception e) {
            log.error("Can't execute command '" + commandId + "'", e);
        }
    }
}
Also used : IHandlerService(org.eclipse.ui.handlers.IHandlerService) ParameterizedCommand(org.eclipse.core.commands.ParameterizedCommand) Command(org.eclipse.core.commands.Command) ISelection(org.eclipse.jface.viewers.ISelection) IEvaluationContext(org.eclipse.core.expressions.IEvaluationContext) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) IEvaluationContext(org.eclipse.core.expressions.IEvaluationContext) EvaluationContext(org.eclipse.core.expressions.EvaluationContext) ParameterizedCommand(org.eclipse.core.commands.ParameterizedCommand) ICommandService(org.eclipse.ui.commands.ICommandService) NotDefinedException(org.eclipse.core.commands.common.NotDefinedException)

Example 4 with IHandlerService

use of org.eclipse.ui.handlers.IHandlerService in project dbeaver by serge-rider.

the class AboutBoxDialog method createDialogArea.

@Override
protected Control createDialogArea(Composite parent) {
    Color background = JFaceColors.getBannerBackground(parent.getDisplay());
    //Color foreground = JFaceColors.getBannerForeground(parent.getDisplay());
    parent.setBackground(background);
    Composite group = new Composite(parent, SWT.NONE);
    group.setBackground(background);
    GridLayout layout = new GridLayout(1, false);
    layout.marginHeight = 20;
    layout.marginWidth = 20;
    group.setLayout(layout);
    GridData gd;
    IProduct product = Platform.getProduct();
    {
        Label nameLabel = new Label(group, SWT.NONE);
        nameLabel.setBackground(background);
        nameLabel.setFont(NAME_FONT);
        nameLabel.setText(product.getName());
        gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.horizontalAlignment = GridData.CENTER;
        nameLabel.setLayoutData(gd);
    }
    Label titleLabel = new Label(group, SWT.NONE);
    titleLabel.setBackground(background);
    titleLabel.setFont(TITLE_FONT);
    titleLabel.setText(product.getProperty(PRODUCT_PROP_SUB_TITLE));
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalAlignment = GridData.CENTER;
    titleLabel.setLayoutData(gd);
    titleLabel.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseDoubleClick(MouseEvent e) {
            BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {

                @Override
                public void run() {
                    // Do not create InstallationDialog directly
                    // but execute "org.eclipse.ui.help.installationDialog" command
                    IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
                    IHandlerService service = workbenchWindow.getService(IHandlerService.class);
                    if (service != null) {
                        try {
                            //$NON-NLS-1$
                            service.executeCommand("org.eclipse.ui.help.installationDialog", null);
                        } catch (Exception e1) {
                        // just ignore error
                        }
                    }
                }
            });
        }
    });
    Label imageLabel = new Label(group, SWT.NONE);
    imageLabel.setBackground(background);
    gd = new GridData();
    gd.verticalAlignment = GridData.BEGINNING;
    gd.horizontalAlignment = GridData.CENTER;
    gd.grabExcessHorizontalSpace = true;
    imageLabel.setLayoutData(gd);
    imageLabel.setImage(ABOUT_IMAGE);
    Label versionLabel = new Label(group, SWT.NONE);
    versionLabel.setBackground(background);
    versionLabel.setText(CoreMessages.dialog_about_label_version + GeneralUtils.getProductVersion().toString());
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalAlignment = GridData.CENTER;
    versionLabel.setLayoutData(gd);
    Label releaseTimeLabel = new Label(group, SWT.NONE);
    releaseTimeLabel.setBackground(background);
    releaseTimeLabel.setText(DateFormat.getDateInstance(DateFormat.LONG).format(GeneralUtils.getProductReleaseDate()));
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalAlignment = GridData.CENTER;
    releaseTimeLabel.setLayoutData(gd);
    Label authorLabel = new Label(group, SWT.NONE);
    authorLabel.setBackground(background);
    authorLabel.setText(product.getProperty(PRODUCT_PROP_COPYRIGHT));
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalAlignment = GridData.CENTER;
    authorLabel.setLayoutData(gd);
    Link siteLink = UIUtils.createLink(group, UIUtils.makeAnchor(product.getProperty(PRODUCT_PROP_WEBSITE)), new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            UIUtils.launchProgram(e.text);
        }
    });
    siteLink.setBackground(background);
    gd = new GridData();
    gd.horizontalAlignment = GridData.CENTER;
    siteLink.setLayoutData(gd);
    return parent;
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) MouseEvent(org.eclipse.swt.events.MouseEvent) Color(org.eclipse.swt.graphics.Color) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) MouseAdapter(org.eclipse.swt.events.MouseAdapter) GridLayout(org.eclipse.swt.layout.GridLayout) IHandlerService(org.eclipse.ui.handlers.IHandlerService) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) IProduct(org.eclipse.core.runtime.IProduct)

Example 5 with IHandlerService

use of org.eclipse.ui.handlers.IHandlerService in project dbeaver by serge-rider.

the class CheckForUpdateAction method activateStandardHandler.

public static void activateStandardHandler(IWorkbenchWindow window) {
    if (p2UpdateHandlerActivation == null) {
        return;
    }
    IHandlerService srv = window.getService(IHandlerService.class);
    srv.deactivateHandler(p2UpdateHandlerActivation);
    p2UpdateHandlerActivation = null;
}
Also used : IHandlerService(org.eclipse.ui.handlers.IHandlerService)

Aggregations

IHandlerService (org.eclipse.ui.handlers.IHandlerService)107 ActionHandler (org.eclipse.jface.commands.ActionHandler)45 Action (org.eclipse.jface.action.Action)41 RefreshAction (org.netxms.ui.eclipse.actions.RefreshAction)25 IEvaluationContext (org.eclipse.core.expressions.IEvaluationContext)19 Command (org.eclipse.core.commands.Command)18 ICommandService (org.eclipse.ui.commands.ICommandService)18 ExecutionEvent (org.eclipse.core.commands.ExecutionEvent)16 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)15 AbstractHandler (org.eclipse.core.commands.AbstractHandler)11 ParameterizedCommand (org.eclipse.core.commands.ParameterizedCommand)10 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)10 SelectionEvent (org.eclipse.swt.events.SelectionEvent)10 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)10 EvaluationContext (org.eclipse.core.expressions.EvaluationContext)9 IHandler (org.eclipse.core.commands.IHandler)8 IAction (org.eclipse.jface.action.IAction)8 GridLayout (org.eclipse.swt.layout.GridLayout)8 IContextService (org.eclipse.ui.contexts.IContextService)8 ArrayList (java.util.ArrayList)7