Package org.eclipse.ui.actions

Examples of org.eclipse.ui.actions.ActionContext


        } else {
            action = new WorkingSetFindAction(fSite,
                    new FindReferencesInWorkingSetAction(fSite, workingSets),
                    SearchUtil.toString(workingSets));
        }
        final ActionContext context = getContext();
        if (context != null) {
            action.update(context.getSelection());
        }
        addAction(action, manager);
    }
View Full Code Here


    @Override
    protected void fillContextMenu(final IMenuManager mgr) {
        super.fillContextMenu(mgr);
        addSortActions(mgr);
        fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider()
                .getSelection()));
        fActionGroup.fillContextMenu(mgr);
    }
View Full Code Here

        } else {
            action = new WorkingSetFindAction(fSite,
                    new FindReferencesInWorkingSetAction(fSite, workingSets),
                    SearchUtil.toString(workingSets));
        }
        final ActionContext context = getContext();
        if (context != null) {
            action.update(context.getSelection());
        }
        addAction(action, manager);
    }
View Full Code Here

        // if (ErlideUtil.isTest()) {
        // menu.prependToGroup(IContextMenuConstants.GROUP_OPEN, testAction);
        // }
        addCommonActions(menu);
        final ActionContext context = new ActionContext(getSelectionProvider()
                .getSelection());
        fContextMenuGroup.setContext(context);
        fContextMenuGroup.fillContextMenu(menu);
        fContextMenuGroup.setContext(null);
    }
View Full Code Here

    }

    protected void contextMenuAboutToShow(final IMenuManager menu) {
        ErlideUIPlugin.createStandardGroups(menu);
        final IStructuredSelection selection = (IStructuredSelection) getSelection();
        fActionGroups.setContext(new ActionContext(selection));
        fActionGroups.fillContextMenu(menu);
    }
View Full Code Here

        menu.prependToGroup(ITextEditorActionConstants.GROUP_OPEN, fShowOutline);
        addCommonActions(menu);

        menu.appendToGroup(ITextEditorActionConstants.GROUP_FIND, callhierarchy);

        final ActionContext context = new ActionContext(getSelectionProvider()
                .getSelection());
        fContextMenuGroup.setContext(context);
        fContextMenuGroup.fillContextMenu(menu);
        fContextMenuGroup.setContext(null);
    }
View Full Code Here

       
        initDragAndDrop();
       
        mActions.fillActionBars(getViewSite().getActionBars());
       
        mActions.setContext(new ActionContext(
                mTreeViewer.getSelection()));
       
        mActions.updateActionBars();
    }
View Full Code Here

            public void menuAboutToShow(IMenuManager manager)
            {
                IStructuredSelection selection = (IStructuredSelection) mTreeViewer
                        .getSelection();
               
                mActions.setContext(new ActionContext(selection));
                mActions.fillContextMenu(manager);
            }
        });
       
        Menu menu = menuManager.createContextMenu(mTreeViewer.getTree());
View Full Code Here

       
        mTreeViewer.addSelectionChangedListener(new ISelectionChangedListener()
        {
            public void selectionChanged(SelectionChangedEvent event)
            {
                mActions.setContext(new ActionContext(event.getSelection()));
               
                mActions.updateActionBars();
            }
        });
       
View Full Code Here

     *
     * @param mgr the menuManager manager representing the context menuManager
     */
    protected void fillContextMenu(IMenuManager mgr) {
        super.fillContextMenu(mgr);
        actionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection()));
        actionGroup.fillContextMenu(mgr);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.actions.ActionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.