Examples of Navigatable


Examples of com.intellij.pom.Navigatable

    return buildOccurenceInfo(false);
  }

  private OccurenceNavigator.OccurenceInfo buildOccurenceInfo(final boolean next)
  {
    Navigatable navigatable = new Navigatable()
    {
      public void navigate(boolean requestFocus)
      {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) getSelectionPath().getLastPathComponent();
        setSelectionPath(new TreePath(((next ? node.getNextLeaf() : node.getPreviousLeaf()).getPath())));
View Full Code Here

Examples of com.intellij.pom.Navigatable

    return buildOccurenceInfo(false);
  }

  private OccurenceNavigator.OccurenceInfo buildOccurenceInfo(final boolean next)
  {
    Navigatable navigatable = new Navigatable()
    {
      public void navigate(boolean requestFocus)
      {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) getSelectionPath().getLastPathComponent();
        setSelectionPath(new TreePath(((next ? node.getNextLeaf() : node.getPreviousLeaf()).getPath())));
View Full Code Here

Examples of com.intellij.pom.Navigatable

    private void navigateInBrowser() {
        int rowIndex = getSelectedRow();
        int columnIndex = getSelectedColumn();
        if (columnIndex == 1) {
            PresentableProperty presentableProperty = (PresentableProperty) getModel().getValueAt(rowIndex, 1);
            Navigatable navigatable = presentableProperty.getNavigatable();
            if (navigatable != null) navigatable.navigate(true);
        }
    }
View Full Code Here

Examples of com.intellij.pom.Navigatable

    return element != null && element.isValid();
  }

  @Override
  public void navigate(boolean requestFocus) {
    Navigatable descr = EditSourceUtil.getDescriptor(getElement());
    if (descr != null) descr.navigate(requestFocus);
  }
View Full Code Here

Examples of com.intellij.pom.Navigatable

    Counters counters = new Counters();
    DefaultMutableTreeNode node = findNode(myTree, true, counters);
    if (node == null) return null;
    TreePath treePath = new TreePath(node.getPath());
    TreeUtil.selectPath(myTree, treePath);
    Navigatable editSourceDescriptor = createDescriptorForNode(node);
    if (editSourceDescriptor == null) return null;
    return new OccurenceInfo(editSourceDescriptor, counters.myFoundOccurenceNumber, counters.myOccurencesCount);
  }
View Full Code Here

Examples of com.intellij.pom.Navigatable

    Counters counters = new Counters();
    DefaultMutableTreeNode node = findNode(myTree, false, counters);
    if (node == null) return null;
    TreePath treePath = new TreePath(node.getPath());
    TreeUtil.selectPath(myTree, treePath);
    Navigatable editSourceDescriptor = createDescriptorForNode(node);
    if (editSourceDescriptor == null) return null;
    return new OccurenceInfo(editSourceDescriptor, counters.myFoundOccurenceNumber, counters.myOccurencesCount);
  }
View Full Code Here

Examples of com.intellij.pom.Navigatable

      counters.myOccurencesCount = 0;
      for (int i=0; i < nodes.size(); i++) {
        TreeNode node = (TreeNode)nodes.get(i);
        if (!(node instanceof DefaultMutableTreeNode)) continue;

        Navigatable descriptor = createDescriptorForNode((DefaultMutableTreeNode)node);
        if (descriptor == null) continue;

        counters.myOccurencesCount++;
        if (result == node) {
          counters.myFoundOccurenceNumber = counters.myOccurencesCount;
View Full Code Here

Examples of com.intellij.pom.Navigatable

      }
      return null;
    }
    if (!(node instanceof DefaultMutableTreeNode)) return null;

    Navigatable descriptor = createDescriptorForNode((DefaultMutableTreeNode)node);
    if (descriptor == null) return null;
    return (DefaultMutableTreeNode)node;
  }
View Full Code Here

Examples of com.intellij.pom.Navigatable

            final Usage usage = ((UsageNode)node).getUsage();
            usage.navigate(false);
            usage.highlightInEditor();
          }
          else if (node.isLeaf()) {
            Navigatable navigatable = getNavigatableForNode(node);
            if (navigatable != null && navigatable.canNavigate()) {
              navigatable.navigate(false);
            }
          }
        }
      }
    });
View Full Code Here

Examples of com.intellij.pom.Navigatable

  }

  private static Navigatable getNavigatableForNode(DefaultMutableTreeNode node) {
    Object userObject = node.getUserObject();
    if (userObject instanceof Navigatable) {
      final Navigatable navigatable = (Navigatable)userObject;
      return navigatable.canNavigate() ? navigatable : null;
    }
    return null;
  }
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.