|
38 | 38 |
|
39 | 39 | public class WindowToolFactory implements ToolWindowFactory {
|
40 | 40 |
|
41 |
| - private static final Logger LOGGER = LoggerFactory.getLogger(WindowToolFactory.class); |
| 41 | + private static final Logger LOGGER = LoggerFactory.getLogger(WindowToolFactory.class); |
42 | 42 |
|
43 |
| - @Override |
44 |
| - public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) { |
45 |
| - ContentFactory contentFactory = IDEAContentFactory.getInstance(); |
46 |
| - JBPanel<JBPanel> panel = new JBPanel<>(); |
47 |
| - panel.setLayout(new BorderLayout()); |
48 |
| - Content content = contentFactory.createContent(panel, "", false); |
49 |
| - ApplicationsTreeStructure structure = new ApplicationsTreeStructure(project); |
50 |
| - StructureTreeModel<ApplicationsTreeStructure> model = new StructureTreeModel<>(structure, content); |
51 |
| - content.setDisposer(structure); |
52 |
| - new MutableModelSynchronizer<>(model, structure, structure); |
53 |
| - Tree tree = new Tree(new AsyncTreeModel(model, content)); |
54 |
| - tree.putClientProperty(Constants.STRUCTURE_PROPERTY, structure); |
55 |
| - tree.setCellRenderer(new NodeRenderer()); |
56 |
| - tree.setRootVisible(false); |
57 |
| - PopupHandler.installPopupMenu(tree, "org.jboss.tools.intellij.tree", ActionPlaces.MAIN_MENU); |
58 |
| - panel.add(new JBScrollPane(tree), BorderLayout.CENTER); |
59 |
| - toolWindow.getContentManager().addContent(content); |
60 |
| - ArrayList<AnAction> actions = new ArrayList<>(); |
61 |
| - actions.add(ActionManager.getInstance().getAction("org.jboss.tools.intellij.openshift.actions.toolwindow.FeedBackAction")); |
62 |
| - toolWindow.setTitleActions(actions); |
63 |
| - TreeHelper.addLinkSupport(tree); |
64 |
| - } |
| 43 | + @Override |
| 44 | + public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) { |
| 45 | + ContentFactory contentFactory = IDEAContentFactory.getInstance(); |
| 46 | + JBPanel<JBPanel> panel = new JBPanel<>(); |
| 47 | + panel.setLayout(new BorderLayout()); |
| 48 | + Content content = contentFactory.createContent(panel, "", false); |
| 49 | + ApplicationsTreeStructure structure = new ApplicationsTreeStructure(project, content); |
| 50 | + StructureTreeModel<ApplicationsTreeStructure> model = new StructureTreeModel<>(structure, content); |
| 51 | + content.setDisposer(structure); |
| 52 | + new MutableModelSynchronizer<>(model, structure, structure); |
| 53 | + Tree tree = new Tree(new AsyncTreeModel(model, content)); |
| 54 | + tree.putClientProperty(Constants.STRUCTURE_PROPERTY, structure); |
| 55 | + tree.setCellRenderer(new NodeRenderer()); |
| 56 | + tree.setRootVisible(false); |
| 57 | + PopupHandler.installPopupMenu(tree, "org.jboss.tools.intellij.tree", ActionPlaces.MAIN_MENU); |
| 58 | + panel.add(new JBScrollPane(tree), BorderLayout.CENTER); |
| 59 | + toolWindow.getContentManager().addContent(content); |
| 60 | + ArrayList<AnAction> actions = new ArrayList<>(); |
| 61 | + actions.add(ActionManager.getInstance().getAction("org.jboss.tools.intellij.openshift.actions.toolwindow.FeedBackAction")); |
| 62 | + toolWindow.setTitleActions(actions); |
| 63 | + TreeHelper.addLinkSupport(tree); |
| 64 | + } |
65 | 65 | }
|
0 commit comments