Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.IAction.run()


      @Override
      protected void fillMenu(IMenuManager menu) {
        SurroundWithAction.fillMenu(menu);       
      }     
    };
    theAction.run();
  }

}
View Full Code Here


          manager.add(new Action(Messages.ApplicationActionBarAdvisor_CREATE_FILTER) {
            @Override
            public void run() {
              CreateFilterAction action = new CreateFilterAction();
              action.selectionChanged(null, selection);
              action.run(null);
            }

            @Override
            public ImageDescriptor getImageDescriptor() {
              return OwlUI.FILTER;
View Full Code Here

          manager.add(new Action(Messages.ApplicationActionBarAdvisor_UPDATE) {
            @Override
            public void run() {
              IActionDelegate action = new ReloadTypesAction();
              action.selectionChanged(null, selection);
              action.run(null);
            }

            @Override
            public ImageDescriptor getImageDescriptor() {
              return OwlUI.getImageDescriptor("icons/elcl16/reload.gif"); //$NON-NLS-1$
View Full Code Here

    }

    public void doubleClick(DoubleClickEvent event) {
        IAction action = getAction(DOUBLE_CLICK_ACTION);
        if (action != null && action.isEnabled()) {
            action.run();
        } else {
            ISelection selection = event.getSelection();
            if (!(selection instanceof IStructuredSelection)) {
                return;
            }
View Full Code Here

                    fixLink.setText(fix.getText());
                    fixLink.setHref(fix);
                    fixLink.addHyperlinkListener(new HyperlinkAdapter() {
                        @Override
                        public void linkActivated(HyperlinkEvent e) {
                            fix.run();
                            close();
                            // part.getSite().getPage().activate(part);
                            part.setFocus();
                        }
                    });
View Full Code Here

    public final void run(IAction action)
    {
        IAction toRun = editor.getAction(action.getId());
        assert toRun != null;

        toRun.run();
    }

    public void setActiveEditor(IAction action, IEditorPart targetEditor)
    {
        if (targetEditor == null) { return; }
View Full Code Here

        try
        {
            testIface.selectText("main::some_sub");
           
            IAction openSubAction = editor.getAction(PerlEditorActionIds.OPEN_DECLARATION);
            openSubAction.run();

            // Check that the module editor opened with the right selection
            moduleEditor = findEditor("EPICTest/lib/TestOpenSub.pm");
            assertNotNull(moduleEditor);
            ISelectionProvider provider = moduleEditor.getSelectionProvider();
View Full Code Here

        try
        {
            testIface.selectText("some_sub()");
           
            IAction openSubAction = editor.getAction(PerlEditorActionIds.OPEN_DECLARATION);
            openSubAction.run();
           
            // Check that the module editor opened with the right selection
            moduleEditor = findEditor("EPICTest/lib/TestOpenSub.pm");
            assertNotNull(moduleEditor);
            ISelectionProvider provider = moduleEditor.getSelectionProvider();
View Full Code Here

           
            IDocument doc2 = moduleEditor.getViewer().getDocument();
            appendText(doc2, "\n\nsub zzz { }");
           
            testIface.selectText("zzz");
            openSubAction.run();
            selection = (ITextSelection) provider.getSelection();
            assertEquals(
                "sub zzz",
                moduleEditor.getTestInterface().getText().substring(
                    selection.getOffset() - 4,
View Full Code Here

            if (view != null) closeView(view);
           
            testIface.selectText("print");
           
            IAction perlDocAction = editor.getAction(PerlEditorActionIds.PERL_DOC);
            perlDocAction.run();
           
            view = (PerlDocView) findView(VIEW_ID);
            assertNotNull(view);
            assertTrue(
                view.getDisplayedText(0).indexOf("print FILEHANDLE LIST") != -1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.