Examples of NavigationAction


Examples of com.dci.intellij.dbn.language.common.navigation.NavigationAction

                                    rootPsiElement.lookupPsiElementBySubject(targetAttribute,
                                                identifierPsiElement.getChars(),
                                                identifierPsiElement.getObjectType());

                            if (targetElement != null) {
                                NavigationAction navigationAction = targetContentType == DBContentType.CODE_BODY ?
                                        new NavigateToDefinitionAction(null, targetElement, objectType) :
                                        new NavigateToSpecificationAction(null, targetElement, objectType);
                                Annotation annotation = holder.createInfoAnnotation(basePsiElement, null);
                                NavigationGutterRenderer gutterIconRenderer = new NavigationGutterRenderer(navigationAction, GutterIconRenderer.Alignment.RIGHT);
                                annotation.setGutterIconRenderer(gutterIconRenderer);
                            }
                            NavigateToObjectAction navigateToObjectAction = new NavigateToObjectAction(identifierPsiElement.resolveUnderlyingObject(), objectType);
                            Annotation annotation = holder.createInfoAnnotation(basePsiElement, null);
                            annotation.setGutterIconRenderer(new NavigationGutterRenderer(navigateToObjectAction, GutterIconRenderer.Alignment.LEFT));


                        }
                    } else if (object.getContentType() == DBContentType.CODE_SPEC_AND_BODY) {
                        SourceCodeManager codeEditorManager = SourceCodeManager.getInstance(object.getProject());


                        BasePsiElement targetElement = codeEditorManager.getObjectNavigationElement(object, targetContentType, identifierPsiElement.getObjectType(), identifierPsiElement.getChars());
                        if (targetElement != null) {
                            NavigationAction navigationAction = targetContentType == DBContentType.CODE_BODY ?
                                    new NavigateToDefinitionAction(object, targetElement, objectType) :
                                    new NavigateToSpecificationAction(object, targetElement, objectType);
                            Annotation annotation = holder.createInfoAnnotation(basePsiElement, null);
                            annotation.setGutterIconRenderer(new NavigationGutterRenderer(navigationAction, GutterIconRenderer.Alignment.RIGHT));
                        }
View Full Code Here

Examples of org.jboss.on.embedded.ui.NavigationAction

        }.run();
    }

    public void getOutcomeForNode(JONTreeNode node, int level)
    {
        NavigationAction navAction = getNavigationAction();
        navAction.setCurrentPath(node.getPath());

        SummaryAction action = new SummaryAction();
        action.setNavigationAction(navAction);

        String outcome = action.view();
View Full Code Here

Examples of org.jboss.on.embedded.ui.NavigationAction

        }.run();
    }

    public void getBreadcrumbForNode(JONTreeNode node, int level)
    {
        NavigationAction navAction = getNavigationAction();
        navAction.setCurrentPath(node.getPath());
        List breadcrumbs = navAction.getBreadCrumbs();

        assert breadcrumbs != null;
        assert !breadcrumbs.isEmpty();
    }
View Full Code Here

Examples of org.jboss.on.embedded.ui.NavigationAction

        }.run();
    }

    public void findNode(JONTreeNode node, int level)
    {
        NavigationAction navAction = getNavigationAction();
        JONTreeNode retrievedNode = navAction.findNode(node.getPath());

        assert retrievedNode != null;
        assert retrievedNode.getName().equals(node.getName());
        assert retrievedNode.getPath().equals(node.getPath());
    }
View Full Code Here

Examples of org.jboss.on.embedded.ui.NavigationAction

            protected void testComponents() throws Exception
            {
                ResourceType localDS = getManager().getResourceType(ResourceTypes.RESOURCE_TYPE_LOCAL_DATASOURCE);
                assert localDS != null;

                NavigationAction navAction = getNavigationAction();
                ResourceTypeTreeNode retrievedNode = navAction.findNodeByResourceTypeAndParent(localDS, getPlatformNode());

                assert retrievedNode != null;
                assert localDS.equals(retrievedNode.getResourceType());
                assert retrievedNode.getChildNodes().size() == 6;
            }
View Full Code Here

Examples of org.jboss.on.embedded.ui.NavigationAction

        return (NavigationAction)Component.getInstance("navigationAction", true);
    }

    private JONTreeNode getPlatformNode()
    {
        NavigationAction navAction = getNavigationAction();
        navAction.setCurrentPath("bad_path");
        // if the path doesn't match anything the root node is returned
        JONTreeNode root = navAction.getSelectedNode();

        return root;
    }
View Full Code Here

Examples of org.rssowl.ui.internal.actions.NavigationActionFactory.NavigationAction

      }

        /* Next */
      case NEXT: {
        NavigationActionType defaultAction = NavigationActionType.values()[fPreferences.getInteger(DefaultPreferences.DEFAULT_NEXT_ACTION)];
        NavigationAction action = new NavigationAction(defaultAction);
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Previous */
      case PREVIOUS: {
        NavigationActionType defaultAction = NavigationActionType.values()[fPreferences.getInteger(DefaultPreferences.DEFAULT_PREVIOUS_ACTION)];
        NavigationAction action = new NavigationAction(defaultAction);
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* New Bookmark */
      case NEW_BOOKMARK: {
        NewBookMarkAction action = new NewBookMarkAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* New News Bin */
      case NEW_BIN: {
        NewNewsBinAction action = new NewNewsBinAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* New Saved Search */
      case NEW_SAVED_SEARCH: {
        NewSearchMarkAction action = new NewSearchMarkAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* New Folder */
      case NEW_FOLDER: {
        NewFolderAction action = new NewFolderAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* Close */
      case CLOSE: {
        IWorkbenchAction action = ActionFactory.CLOSE.create(fWindow);
        action.run();
        break;
      }

        /* Close Others */
      case CLOSE_OTHERS: {
        IWorkbenchPage page = fWindow.getActivePage();
        if (page != null) {
          IEditorReference[] refArray = page.getEditorReferences();
          if (refArray != null && refArray.length > 1) {
            IEditorReference[] otherEditors = new IEditorReference[refArray.length - 1];
            IEditorReference activeEditor = (IEditorReference) page.getReference(page.getActiveEditor());
            for (int i = 0; i < refArray.length; i++) {
              if (refArray[i] != activeEditor)
                continue;
              System.arraycopy(refArray, 0, otherEditors, 0, i);
              System.arraycopy(refArray, i + 1, otherEditors, i, refArray.length - 1 - i);
              break;
            }
            page.closeEditors(otherEditors, true);
          }
        }
        break;
      }

        /* Close All */
      case CLOSE_ALL: {
        IWorkbenchAction action = ActionFactory.CLOSE_ALL.create(fWindow);
        action.run();
        break;
      }

        /* Open */
      case OPEN: {
        IStructuredSelection selection = OwlUI.getActiveFeedViewSelection();
        FeedView feedView = OwlUI.getActiveFeedView();
        if (selection != null && !selection.isEmpty() && feedView != null) {
          OpenInBrowserAction action = new OpenInBrowserAction(selection, WebBrowserContext.createFrom(selection, feedView));
          action.run();
        }
        break;
      }

        /* Save As */
      case SAVE_AS: {
        FeedView activeFeedView = OwlUI.getActiveFeedView();
        if (activeFeedView != null)
          activeFeedView.doSaveAs();
        break;
      }

        /* Print */
      case PRINT: {
        FeedView activeFeedView = OwlUI.getActiveFeedView();
        if (activeFeedView != null)
          activeFeedView.print();
        break;
      }

        /* Fullscreen */
      case FULLSCREEN: {
        OwlUI.toggleFullScreen();
        wrappingAction.setChecked(fWindow.getShell().getFullScreen());
        break;
      }

        /* Toggle Bookmarks View */
      case BOOKMARK_VIEW: {
        OwlUI.toggleBookmarks();
        break;
      }

        /* Sticky */
      case STICKY: {
        IStructuredSelection selection = OwlUI.getActiveFeedViewSelection();
        if (selection != null && !selection.isEmpty())
          new MakeNewsStickyAction(selection).run();
        break;
      }

        /* Find more Feeds */
      case FIND_MORE_FEEDS: {
        SearchFeedsAction action = new SearchFeedsAction();
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Downloads & Activity */
      case ACTIVITIES: {
        ShowActivityAction action = new ShowActivityAction();
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Preferences */
      case PREFERENCES: {
        IWorkbenchAction action = ActionFactory.PREFERENCES.create(fWindow);
        action.run();
        break;
      }

        /* History */
      case HISTORY: {
View Full Code Here

Examples of org.rssowl.ui.internal.actions.NavigationActionFactory.NavigationAction

    public void widgetSelected(SelectionEvent e) {
      if (((MenuItem) e.widget).getSelection()) {
        Object data = e.widget.getData();
        if (data instanceof NavigationActionType) {
          NavigationActionType actionType = (NavigationActionType) data;
          NavigationAction action = new NavigationAction(actionType);
          action.init(fWindow);
          action.run(null);

          fPreferences.putInteger(fIsNext ? DefaultPreferences.DEFAULT_NEXT_ACTION : DefaultPreferences.DEFAULT_PREVIOUS_ACTION, actionType.ordinal());

          update(fIsNext ? CoolBarItem.NEXT : CoolBarItem.PREVIOUS, null, null, false);
        }
View Full Code Here

Examples of org.rssowl.ui.internal.actions.NavigationActionFactory.NavigationAction

    public void widgetSelected(SelectionEvent e) {
      if (((MenuItem) e.widget).getSelection()) {
        Object data = e.widget.getData();
        if (data instanceof NavigationActionType) {
          NavigationActionType actionType = (NavigationActionType) data;
          NavigationAction action = new NavigationAction(actionType);
          action.init(fWindow);
          action.run(null);

          fPreferences.putInteger(fIsNext ? DefaultPreferences.DEFAULT_NEXT_ACTION : DefaultPreferences.DEFAULT_PREVIOUS_ACTION, actionType.ordinal());

          update(fIsNext ? CoolBarItem.NEXT : CoolBarItem.PREVIOUS, null, null, false);
        }
View Full Code Here

Examples of org.rssowl.ui.internal.actions.NavigationActionFactory.NavigationAction

      }

        /* Next */
      case NEXT: {
        NavigationActionType defaultAction = NavigationActionType.values()[fPreferences.getInteger(DefaultPreferences.DEFAULT_NEXT_ACTION)];
        NavigationAction action = new NavigationAction(defaultAction);
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Previous */
      case PREVIOUS: {
        NavigationActionType defaultAction = NavigationActionType.values()[fPreferences.getInteger(DefaultPreferences.DEFAULT_PREVIOUS_ACTION)];
        NavigationAction action = new NavigationAction(defaultAction);
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* New Bookmark */
      case NEW_BOOKMARK: {
        NewBookMarkAction action = new NewBookMarkAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* New News Bin */
      case NEW_BIN: {
        NewNewsBinAction action = new NewNewsBinAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* New Saved Search */
      case NEW_SAVED_SEARCH: {
        NewSearchMarkAction action = new NewSearchMarkAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* New Folder */
      case NEW_FOLDER: {
        NewFolderAction action = new NewFolderAction();
        initWithExplorerSelectionAndRunAction(action);
        break;
      }

        /* Close */
      case CLOSE: {
        IWorkbenchAction action = ActionFactory.CLOSE.create(fWindow);
        action.run();
        break;
      }

        /* Close Others */
      case CLOSE_OTHERS: {
        IWorkbenchPage page = fWindow.getActivePage();
        if (page != null) {
          IEditorReference[] refArray = page.getEditorReferences();
          if (refArray != null && refArray.length > 1) {
            IEditorReference[] otherEditors = new IEditorReference[refArray.length - 1];
            IEditorReference activeEditor = (IEditorReference) page.getReference(page.getActiveEditor());
            for (int i = 0; i < refArray.length; i++) {
              if (refArray[i] != activeEditor)
                continue;
              System.arraycopy(refArray, 0, otherEditors, 0, i);
              System.arraycopy(refArray, i + 1, otherEditors, i, refArray.length - 1 - i);
              break;
            }
            page.closeEditors(otherEditors, true);
          }
        }
        break;
      }

        /* Close All */
      case CLOSE_ALL: {
        IWorkbenchAction action = ActionFactory.CLOSE_ALL.create(fWindow);
        action.run();
        break;
      }

        /* Open */
      case OPEN: {
        IStructuredSelection selection = OwlUI.getActiveFeedViewSelection();
        FeedView feedView = OwlUI.getActiveFeedView();
        if (selection != null && !selection.isEmpty() && feedView != null) {
          OpenInBrowserAction action = new OpenInBrowserAction(selection, WebBrowserContext.createFrom(selection, feedView));
          action.run();
        }
        break;
      }

        /* Save As */
      case SAVE_AS: {
        FeedView activeFeedView = OwlUI.getActiveFeedView();
        if (activeFeedView != null)
          activeFeedView.doSaveAs();
        break;
      }

        /* Print */
      case PRINT: {
        FeedView activeFeedView = OwlUI.getActiveFeedView();
        if (activeFeedView != null)
          activeFeedView.print();
        break;
      }

        /* Fullscreen */
      case FULLSCREEN: {
        OwlUI.toggleFullScreen();
        wrappingAction.setChecked(fWindow.getShell().getFullScreen());
        break;
      }

        /* Toggle Bookmarks View */
      case BOOKMARK_VIEW: {
        OwlUI.toggleBookmarks();
        break;
      }

        /* Sticky */
      case STICKY: {
        IStructuredSelection selection = OwlUI.getActiveFeedViewSelection();
        if (selection != null && !selection.isEmpty())
          new MakeNewsStickyAction(selection).run();
        break;
      }

        /* Find more Feeds */
      case FIND_MORE_FEEDS: {
        SearchFeedsAction action = new SearchFeedsAction();
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Downloads & Activity */
      case ACTIVITIES: {
        ShowActivityAction action = new ShowActivityAction();
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Preferences */
      case PREFERENCES: {
        IWorkbenchAction action = ActionFactory.PREFERENCES.create(fWindow);
        action.run();
        break;
      }

        /* History */
      case HISTORY: {
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.