List of usage examples for com.intellij.openapi.actionSystem ActionPlaces COMPILER_MESSAGES_POPUP
String COMPILER_MESSAGES_POPUP
To view the source code for com.intellij.openapi.actionSystem ActionPlaces COMPILER_MESSAGES_POPUP.
Click Source Link
From source file:com.intellij.ide.errorTreeView.NewErrorTreeViewPanel.java
License:Apache License
private void popupInvoked(Component component, int x, int y) { final TreePath path = myTree.getLeadSelectionPath(); if (path == null) { return;/*from w w w.ja va2s. c o m*/ } DefaultActionGroup group = new DefaultActionGroup(); if (getData(PlatformDataKeys.NAVIGATABLE.getName()) != null) { group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE)); } group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY)); addExtraPopupMenuActions(group); ActionPopupMenu menu = ActionManager.getInstance() .createActionPopupMenu(ActionPlaces.COMPILER_MESSAGES_POPUP, group); menu.getComponent().show(component, x, y); }
From source file:gradleplug.messages.MessagesPanel.java
License:Apache License
public MessagesPanel(Project project) { this.project = project; setLayout(new BorderLayout()); JPanel rootPanel = new JPanel(new BorderLayout()); errorViewStructure = new ErrorViewStructure(project, true); DefaultMutableTreeNode root = new DefaultMutableTreeNode(); root.setUserObject(errorViewStructure.createDescriptor(errorViewStructure.getRootElement(), null)); final DefaultTreeModel treeModel = new DefaultTreeModel(root); messageTree = new Tree(treeModel); errorViewTreeBuilder = new ErrorViewTreeBuilder(messageTree, treeModel, errorViewStructure); exporterToTextFile = new ErrorViewTextExporter(errorViewStructure); TreeUtil.installActions(messageTree); UIUtil.setLineStyleAngled(messageTree); messageTree.setRootVisible(false);//from ww w . j a v a2 s . c o m messageTree.setShowsRootHandles(true); messageTree.setLargeModel(true); JScrollPane scrollPane = NewErrorTreeRenderer.install(messageTree); rootPanel.add(scrollPane, BorderLayout.CENTER); add(createToolbarPanel(), BorderLayout.WEST); add(rootPanel, BorderLayout.CENTER); messageTree.addMouseListener(new PopupHandler() { public void invokePopup(Component component, int x, int y) { final TreePath path = messageTree.getLeadSelectionPath(); if (path == null) { return; } DefaultActionGroup group = new DefaultActionGroup(); group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY)); ActionPopupMenu menu = ActionManager.getInstance() .createActionPopupMenu(ActionPlaces.COMPILER_MESSAGES_POPUP, group); menu.getComponent().show(component, x, y); } }); }
From source file:ivyplug.ui.messages.MessagesPanel.java
License:Apache License
public MessagesPanel(Project project) { this.project = project; setLayout(new BorderLayout()); JPanel rootPanel = new JPanel(new BorderLayout()); errorViewStructure = new ErrorViewStructure(project, true); DefaultMutableTreeNode root = new DefaultMutableTreeNode(); root.setUserObject(errorViewStructure.createDescriptor(errorViewStructure.getRootElement(), null)); final DefaultTreeModel treeModel = new DefaultTreeModel(root); messageTree = JTreeFactory.createJTree(treeModel); errorViewTreeBuilder = new ErrorViewTreeBuilder(messageTree, treeModel, errorViewStructure); exporterToTextFile = new ErrorViewTextExporter(errorViewStructure); TreeUtil.installActions(messageTree); UIUtil.setLineStyleAngled(messageTree); messageTree.setRootVisible(false);//from w w w .ja v a 2s. c om messageTree.setShowsRootHandles(true); messageTree.setLargeModel(true); JScrollPane scrollPane = NewErrorTreeRenderer.install(messageTree); rootPanel.add(scrollPane, BorderLayout.CENTER); add(createToolbarPanel(), BorderLayout.WEST); add(rootPanel, BorderLayout.CENTER); messageTree.addMouseListener(new PopupHandler() { public void invokePopup(Component component, int x, int y) { final TreePath path = messageTree.getLeadSelectionPath(); if (path == null) { return; } DefaultActionGroup group = new DefaultActionGroup(); group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY)); ActionPopupMenu menu = ActionManager.getInstance() .createActionPopupMenu(ActionPlaces.COMPILER_MESSAGES_POPUP, group); menu.getComponent().show(component, x, y); } }); }