• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java EditSourceOnDoubleClickHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.util.EditSourceOnDoubleClickHandler的典型用法代码示例。如果您正苦于以下问题:Java EditSourceOnDoubleClickHandler类的具体用法?Java EditSourceOnDoubleClickHandler怎么用?Java EditSourceOnDoubleClickHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EditSourceOnDoubleClickHandler类属于com.intellij.util包,在下文中一共展示了EditSourceOnDoubleClickHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addTreeMouseListeners

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void addTreeMouseListeners() {
    EditSourceOnDoubleClickHandler.install(getTree(), new Runnable() {
        @Override
        public void run() {
            TreePath path = getTree().getSelectionPath();
            if (path == null)
                return;
            DefaultMutableTreeNode selectedElement = (DefaultMutableTreeNode)path.getLastPathComponent();
            if (selectedElement == null)
                return;
            GlobalConfigsTreeStructure.GlobalConfigNode configNode = (GlobalConfigsTreeStructure.GlobalConfigNode)selectedElement.getUserObject();
            if (configNode == null)
                return;
            PsiElement element = configNode.getXmlTag();
            if (element == null)
                return;
            OpenSourceUtil.navigate((Navigatable)element);
        }
    });

    CustomizationUtil.installPopupHandler(getTree(), IdeActions.GROUP_STRUCTURE_VIEW_POPUP, ActionPlaces.STRUCTURE_VIEW_POPUP);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:23,代码来源:GlobalConfigsToolWindowPanel.java


示例2: initTree

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void initTree(final MyTree tree) {
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  tree.setCellRenderer(new MyTreeCellRenderer(tree == myLeftTree));
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(tree);

  TreeUtil.installActions(tree);
  SmartExpander.installOn(tree);
  EditSourceOnDoubleClickHandler.install(tree);
  new TreeSpeedSearch(tree);

  PopupHandler.installUnknownPopupHandler(tree, createTreePopupActions(), ActionManager.getInstance());


}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:CyclicDependenciesPanel.java


示例3: editAction

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
@NotNull
public CheckBoxListModelEditor<T> editAction(final @NotNull Function<T, T> consumer) {
  final Runnable action = new Runnable() {
    @Override
    public void run() {
      T item = getSelectedItem();
      if (item != null) {
        T newItem = consumer.fun(item);
        if (newItem != null) {
          list.updateItem(item, newItem, StringUtil.notNullize(toNameConverter.fun(newItem)));
        }
        list.requestFocus();
      }
    }
  };
  toolbarDecorator.setEditAction(new AnActionButtonRunnable() {
    @Override
    public void run(AnActionButton button) {
      action.run();
    }
  });
  EditSourceOnDoubleClickHandler.install(list, action);
  return this;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:CheckBoxListModelEditor.java


示例4: StatisticsPanel

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
public StatisticsPanel() {
    super(new BorderLayout(0, 0));
    myChildInfo = new StatisticsTable(TestColumnInfo.COLUMN_NAMES);
    myTable = new TableView(myChildInfo) {
      @Override
      public TableCellRenderer getCellRenderer(int row, int column) {
        return new TestTableRenderer(TestColumnInfo.COLUMN_NAMES);
      }
    };
    EditSourceOnDoubleClickHandler.install(myTable);
    PopupHandler.installPopupHandler(myTable,
                        IdeActions.GROUP_TESTSTATISTICS_POPUP,
                        ActionPlaces.TESTSTATISTICS_VIEW_POPUP);
//    add(myTestCaseInfo, BorderLayout.NORTH);
    add(ScrollPaneFactory.createScrollPane(myTable), BorderLayout.CENTER);
    final JPanel eastPanel = new JPanel(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false));

    myTotalLabel = new SimpleColoredComponent();
    eastPanel.add(myTotalLabel);

    myTimeLabel = new SimpleColoredComponent();
    eastPanel.add(myTimeLabel);

    add(eastPanel, BorderLayout.SOUTH);
  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:StatisticsPanel.java


示例5: createComponent

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void createComponent() {
  setLayout(new BorderLayout());
  myRepositoryTree = new Tree();
  myRepositoryTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  myRepositoryTree.setRootVisible(false);
  myRepositoryTree.setShowsRootHandles(true);
  JScrollPane scrollPane =
    ScrollPaneFactory.createScrollPane(myRepositoryTree, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
  add(scrollPane, BorderLayout.CENTER);
  myRepositoryTree.setCellRenderer(new SvnRepositoryTreeCellRenderer());
  TreeSpeedSearch search = new TreeSpeedSearch(myRepositoryTree, new Convertor<TreePath, String>() {
    @Override
    public String convert(TreePath o) {
      Object component = o.getLastPathComponent();
      if (component instanceof RepositoryTreeNode) {
        return ((RepositoryTreeNode)component).getURL().toDecodedString();
      }
      return null;
    }
  });
  search.setComparator(new SpeedSearchComparator(false, true));

  EditSourceOnDoubleClickHandler.install(myRepositoryTree);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:RepositoryBrowserComponent.java


示例6: FilesystemToolwindow

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
public FilesystemToolwindow(final VirtualFile root, Project project) {
  myRoot = root;
  myProject = project;

  myToolWindow = ToolWindowManager.getInstance(project).registerToolWindow("File System", false, ToolWindowAnchor.LEFT);
  myContent = new MyContent();

  final FileChooserDescriptor descriptor = new FileChooserDescriptor(true, true, true, false, true, true);
  descriptor.setRoots(myRoot);

  myFsTree = new FileSystemTreeImpl(project, descriptor);
  myContent.add(ScrollPaneFactory.createScrollPane(myFsTree.getTree()), BorderLayout.CENTER);
  EditSourceOnDoubleClickHandler.install(myFsTree.getTree());
  EditSourceOnEnterKeyHandler.install(myFsTree.getTree());

  final ContentFactory contentFactory = new ContentFactoryImpl();
  final Content content = contentFactory.createContent(myContent, null, false);
  myToolWindow.getContentManager().addContent(content);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:FilesystemToolwindow.java


示例7: initTree

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void initTree(final Tree tree) {
  final MigrationRootsTreeCellRenderer rootsTreeCellRenderer = new MigrationRootsTreeCellRenderer();
  tree.setCellRenderer(rootsTreeCellRenderer);
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(tree);

  TreeUtil.installActions(tree);
  TreeUtil.expandAll(tree);
  SmartExpander.installOn(tree);
  EditSourceOnDoubleClickHandler.install(tree);
  new TreeSpeedSearch(tree);
  PopupHandler.installUnknownPopupHandler(tree, createTreePopupActions(), ActionManager.getInstance());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:MigrationPanel.java


示例8: installHandlers

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
protected void installHandlers() {
  EditSourceOnDoubleClickHandler.install(this);
  new TreeSpeedSearch(this, new Convertor<TreePath, String>() {
    public String convert(final TreePath path) {
      final AbstractTestProxy testProxy = getSelectedTest(path);
      if (testProxy == null) return null;
      return testProxy.getName();
    }
  });
  TreeUtil.installActions(this);
  PopupHandler.installPopupHandler(this, IdeActions.GROUP_TESTTREE_POPUP, ActionPlaces.TESTTREE_VIEW_POPUP);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:TestTreeView.java


示例9: UnversionedViewDialog

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
public UnversionedViewDialog(final Project project) {
  super(project, true);
  setTitle("Unversioned Files");
  myProject = project;
  final Runnable closer = new Runnable() {
    public void run() {
      UnversionedViewDialog.this.close(0);
    }
  };
  myView = new ChangesListView(project) {
    @Override
    public void calcData(DataKey key, DataSink sink) {
      super.calcData(key, sink);
      if (ChangesListView.UNVERSIONED_FILES_DATA_KEY.is(key.getName())) {
        sink.put(key, Arrays.asList(getSelectedFiles()));
      }
    }

    @Override
    protected void editSourceRegistration() {
      EditSourceOnDoubleClickHandler.install(this, closer);
      EditSourceOnEnterKeyHandler.install(this, closer);
    }
  };
  myChangeListManager = ChangeListManager.getInstance(project);
  createPanel();
  setOKButtonText("Close");

  init();
  initData(((ChangeListManagerImpl) myChangeListManager).getUnversionedFiles());
  myView.setMinimumSize(new Dimension(100, 100));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:UnversionedViewDialog.java


示例10: initTree

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void initTree() {
  myTree.setCellRenderer(new MyTreeCellRenderer());
  myTree.setRootVisible(false);
  myTree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(myTree);
  TreeUtil.installActions(myTree);
  EditSourceOnDoubleClickHandler.install(myTree);
  new TreeSpeedSearch(myTree);
  myCopyPasteDelegator = new CopyPasteDelegator(myProject, this) {
    @Override
    @NotNull
    protected PsiElement[] getSelectedElements() {
      return getSelectedPsiElements();
    }
  };
  myTreeExpansionMonitor = PackageTreeExpansionMonitor.install(myTree, myProject);
  final ScopeTreeStructureExpander[] extensions = Extensions.getExtensions(ScopeTreeStructureExpander.EP_NAME, myProject);
  for (ScopeTreeStructureExpander expander : extensions) {
    myTree.addTreeWillExpandListener(expander);
  }
  if (extensions.length == 0) {
    myTree.addTreeWillExpandListener(new SortingExpandListener());
  }
  myTree.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (KeyEvent.VK_ENTER == e.getKeyCode()) {
        final Object component = myTree.getLastSelectedPathComponent();
        if (component instanceof DefaultMutableTreeNode) {
          final DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)component;
          if (selectedNode.isLeaf()) {
            OpenSourceUtil.openSourcesFrom(DataManager.getInstance().getDataContext(myTree), false);
          }
        }
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:39,代码来源:ScopeTreeViewPanel.java


示例11: EditorsPanel

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
public EditorsPanel(final Project project, List<EditorInfo> editors) {
  super(new BorderLayout());
  myProject = project;
  myModel.setItems(editors);
  add(ScrollPaneFactory.createScrollPane(myTable), BorderLayout.CENTER);
  EditSourceOnDoubleClickHandler.install(myTable);
  EditSourceOnEnterKeyHandler.install(myTable, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:EditorsPanel.java


示例12: initUI

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void initUI() {
  final DefaultMutableTreeNode root = new DefaultMutableTreeNode();

  myJTree = new JTree(root);
  myJTree.setRootVisible(false);
  myJTree.setShowsRootHandles(false);
  myJTree.setCellRenderer(new ChangesBrowserNodeRenderer(myProject, true, false));

  TreeModelBuilder builder = new TreeModelBuilder(myProject, true);
  final DefaultTreeModel treeModel = builder.buildModelFromFilePaths(myFilesToShow);
  myJTree.setModel(treeModel);

  myJTree.expandPath(new TreePath(root.getPath()));

  final JLabel label = new JLabel(myText) {
    @Override
    public Dimension getPreferredSize() {
      final Dimension superValue = super.getPreferredSize();
      return new Dimension((int) superValue.getWidth(), (int) (superValue.getHeight() * 1.7));
    }
  };
  label.setUI(new MultiLineLabelUI());
  label.setBackground(UIUtil.getTextFieldBackground());
  label.setVerticalTextPosition(JLabel.TOP);
  myPanel.setBackground(UIUtil.getTextFieldBackground());
  myPanel.add(label, BorderLayout.NORTH);
  myPanel.add(myJTree, BorderLayout.CENTER);

  EditSourceOnDoubleClickHandler.install(myJTree);
  EditSourceOnEnterKeyHandler.install(myJTree);
  
  final EditSourceAction editSourceAction = new EditSourceAction();
  editSourceAction.registerCustomShortcutSet(CommonShortcuts.getEditSource(), myPanel);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:IntersectingLocalChangesPanel.java


示例13: installHandlers

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
protected void installHandlers() {
  EditSourceOnDoubleClickHandler.install(this);
  new TreeSpeedSearch(this, new Convertor<TreePath, String>() {
    public String convert(final TreePath path) {
      final AbstractTestProxy testProxy = getSelectedTest(path);
      if (testProxy == null) return null;
      return testProxy.getName();
    }
  });
  TreeUtil.installActions(this);
  PopupHandler.installPopupHandler(this, IdeActions.GROUP_TESTTREE_POPUP, ActionPlaces.TESTTREE_VIEW_POPUP);
  ViewAssertEqualsDiffAction.registerShortcut(this);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:TestTreeView.java


示例14: initTree

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void initTree() {
  myTree.setCellRenderer(new MyTreeCellRenderer());
  myTree.setRootVisible(false);
  myTree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(myTree);
  TreeUtil.installActions(myTree);
  EditSourceOnDoubleClickHandler.install(myTree);
  new TreeSpeedSearch(myTree);
  myCopyPasteDelegator = new CopyPasteDelegator(myProject, this) {
    @Override
    @NotNull
    protected PsiElement[] getSelectedElements() {
      return getSelectedPsiElements();
    }
  };
  myTreeExpansionMonitor = PackageTreeExpansionMonitor.install(myTree, myProject);
  final ScopeTreeStructureExpander[] extensions = Extensions.getExtensions(ScopeTreeStructureExpander.EP_NAME, myProject);
  for (ScopeTreeStructureExpander expander : extensions) {
    myTree.addTreeWillExpandListener(expander);
  }
  if (extensions.length == 0) {
    myTree.addTreeWillExpandListener(new SortingExpandListener());
  }
  myTree.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (KeyEvent.VK_ENTER == e.getKeyCode()) {
        final Object component = myTree.getLastSelectedPathComponent();
        if (component instanceof DefaultMutableTreeNode) {
          final DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)component;
          if (selectedNode.isLeaf()) {
            OpenSourceUtil.openSourcesFrom(DataManager.getInstance().getDataContext(myTree), false);
          }
        }
      }
    }
  });
  CustomizationUtil.installPopupHandler(myTree, IdeActions.GROUP_PROJECT_VIEW_POPUP, ActionPlaces.PROJECT_VIEW_POPUP);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:40,代码来源:ScopeTreeViewPanel.java


示例15: SpecificFilesViewDialog

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
protected SpecificFilesViewDialog(@Nonnull Project project,
                                  @Nonnull String title,
                                  @Nonnull Key<Stream<VirtualFile>> shownDataKey,
                                  @Nonnull List<VirtualFile> initDataFiles) {
  super(project, true);
  setTitle(title);
  myProject = project;
  final Runnable closer = () -> this.close(0);
  myView = new ChangesListView(project) {
    @Override
    public void calcData(Key<?> key, DataSink sink) {
      super.calcData(key, sink);
      if (shownDataKey == key) {
        sink.put(shownDataKey, getSelectedFiles());
      }
    }

    @Override
    protected void editSourceRegistration() {
      EditSourceOnDoubleClickHandler.install(this, closer);
      EditSourceOnEnterKeyHandler.install(this, closer);
    }
  };
  myChangeListManager = ChangeListManager.getInstance(project);
  createPanel();
  setOKButtonText("Close");

  init();
  initData(initDataFiles);
  myView.setMinimumSize(new Dimension(100, 100));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:32,代码来源:SpecificFilesViewDialog.java


示例16: initTree

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void initTree() {
  myTree.setCellRenderer(new MyTreeCellRenderer());
  myTree.setRootVisible(false);
  myTree.setShowsRootHandles(true);
  UIUtil.setLineStyleAngled(myTree);
  TreeUtil.installActions(myTree);
  EditSourceOnDoubleClickHandler.install(myTree);
  new TreeSpeedSearch(myTree);
  myCopyPasteDelegator = new CopyPasteDelegator(myProject, this) {
    @Override
    @Nonnull
    protected PsiElement[] getSelectedElements() {
      return getSelectedPsiElements();
    }
  };
  myTreeExpansionMonitor = PackageTreeExpansionMonitor.install(myTree, myProject);
  final ScopeTreeStructureExpander[] extensions = Extensions.getExtensions(ScopeTreeStructureExpander.EP_NAME, myProject);
  for (ScopeTreeStructureExpander expander : extensions) {
    myTree.addTreeWillExpandListener(expander);
  }
  if (extensions.length == 0) {
    myTree.addTreeWillExpandListener(new SortingExpandListener());
  }
  myTree.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (KeyEvent.VK_ENTER == e.getKeyCode()) {
        final Object component = myTree.getLastSelectedPathComponent();
        if (component instanceof DefaultMutableTreeNode) {
          final DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)component;
          if (selectedNode.isLeaf()) {
            OpenSourceUtil.openSourcesFrom(DataManager.getInstance().getDataContext(myTree), false);
          }
        }
      }
    }
  });
  CustomizationUtil.installPopupHandler(myTree, IdeActions.GROUP_PROJECT_VIEW_POPUP, ActionPlaces.PROJECT_VIEW_POPUP);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:40,代码来源:ScopeTreeViewPanel.java


示例17: initTree

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
private void initTree(final Tree tree)
{
	final MigrationRootsTreeCellRenderer rootsTreeCellRenderer = new MigrationRootsTreeCellRenderer();
	tree.setCellRenderer(rootsTreeCellRenderer);
	tree.setRootVisible(false);
	tree.setShowsRootHandles(true);
	UIUtil.setLineStyleAngled(tree);

	TreeUtil.installActions(tree);
	TreeUtil.expandAll(tree);
	SmartExpander.installOn(tree);
	EditSourceOnDoubleClickHandler.install(tree);
	new TreeSpeedSearch(tree);
	PopupHandler.installUnknownPopupHandler(tree, createTreePopupActions(), ActionManager.getInstance());
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:MigrationPanel.java


示例18: installEditSourceOnDoubleClickHandler

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
public void installEditSourceOnDoubleClickHandler() {
  EditSourceOnDoubleClickHandler.install(myTreeView);
  EditSourceOnDoubleClickHandler.install(myFlatView);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DualView.java


示例19: installEditSourceOnDoubleClick

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
public void installEditSourceOnDoubleClick(final JTree tree) {
  EditSourceOnDoubleClickHandler.install(tree);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:TreeUIHelperImpl.java


示例20: NewErrorTreeViewPanel

import com.intellij.util.EditSourceOnDoubleClickHandler; //导入依赖的package包/类
public NewErrorTreeViewPanel(Project project, String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) {
  myProject = project;
  myHelpId = helpId;
  myCreateExitAction = createExitAction;
  myConfiguration = ErrorTreeViewConfiguration.getInstance(project);
  setLayout(new BorderLayout());

  myAutoScrollToSourceHandler = new AutoScrollToSourceHandler() {
    @Override
    protected boolean isAutoScrollMode() {
      return myConfiguration.isAutoscrollToSource();
    }

    @Override
    protected void setAutoScrollMode(boolean state) {
      myConfiguration.setAutoscrollToSource(state);
    }
  };

  myMessagePanel = new JPanel(new BorderLayout());

  myErrorViewStructure = new ErrorViewStructure(project, canHideWarnings());
  DefaultMutableTreeNode root = new DefaultMutableTreeNode();
  root.setUserObject(myErrorViewStructure.createDescriptor(myErrorViewStructure.getRootElement(), null));
  final DefaultTreeModel treeModel = new DefaultTreeModel(root);
  myTree = new Tree(treeModel) {
    @Override
    public void setRowHeight(int i) {
      super.setRowHeight(0);
      // this is needed in order to make UI calculate the height for each particular row
    }
  };
  myBuilder = new ErrorViewTreeBuilder(myTree, treeModel, myErrorViewStructure);

  myExporterToTextFile = new ErrorViewTextExporter(myErrorViewStructure);
  myOccurrenceNavigatorSupport = new MyOccurrenceNavigatorSupport(myTree);

  myAutoScrollToSourceHandler.install(myTree);
  TreeUtil.installActions(myTree);
  UIUtil.setLineStyleAngled(myTree);
  myTree.setRootVisible(false);
  myTree.setShowsRootHandles(true);
  myTree.setLargeModel(true);

  JScrollPane scrollPane = NewErrorTreeRenderer.install(myTree);
  scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
  myMessagePanel.add(scrollPane, BorderLayout.CENTER);

  if (createToolbar) {
    add(createToolbarPanel(rerunAction), BorderLayout.WEST);
  }

  add(myMessagePanel, BorderLayout.CENTER);

  myTree.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (e.getKeyCode() == KeyEvent.VK_ENTER) {
        navigateToSource(false);
      }
    }
  });

  myTree.addMouseListener(new PopupHandler() {
    @Override
    public void invokePopup(Component comp, int x, int y) {
      popupInvoked(comp, x, y);
    }
  });

  EditSourceOnDoubleClickHandler.install(myTree);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:73,代码来源:NewErrorTreeViewPanel.java



注:本文中的com.intellij.util.EditSourceOnDoubleClickHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BGMBuilder类代码示例发布时间:2022-05-23
下一篇:
Java JSONUtil类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap