@Test public void categoryNodesHaveCorrectExtraInformation() { JPanel toolPanel = toolWindow.getContent(); Component[] components = toolPanel.getComponents(); OnePixelSplitter splitter = (OnePixelSplitter) components[0]; JBScrollPane leftPane = (JBScrollPane) splitter.getFirstComponent(); JViewport leftView = leftPane.getViewport(); Tree suggestionTree = (Tree) leftView.getView(); TreePath webPPath = getTreePathWithString(suggestionTree, webPCategoryData.toString()); TreeCellRenderer treeCellRenderer = suggestionTree.getCellRenderer(); Component renderedNode = treeCellRenderer.getTreeCellRendererComponent( suggestionTree, webPPath.getLastPathComponent(), false, false, false, suggestionTree.getRowForPath(webPPath), false); assertThat(renderedNode.toString()).contains("2 recommendations"); assertThat(renderedNode.toString()).contains("29.30 KB"); }
public JPanel getContent() { window.validate(); return window; }
AnalyzeSizeToolWindow { public JPanel getContent() { window.validate(); return window; } }
AnalyzeSizeToolWindow { public JPanel getContent() { window.validate(); return window; } AnalyzeSizeToolWindow(
      ToolWindow toolWindow,
      Project project,
      ImmutableListMultimap<Category, Suggestion> categorizedSuggestions,
      ImmutableList<Category> categoryDisplayOrder); }
AnalyzeSizeToolWindow { public JPanel getContent() { window.validate(); return window; } AnalyzeSizeToolWindow(
      ToolWindow toolWindow,
      Project project,
      ImmutableListMultimap<Category, Suggestion> categorizedSuggestions,
      ImmutableList<Category> categoryDisplayOrder); JPanel getContent(); void setCategorizedSuggestions(
      ImmutableListMultimap<Category, Suggestion> categorizedSuggestions); void setCategoryDisplayOrder(ImmutableList<Category> categoryDisplayOrder); }
AnalyzeSizeToolWindow { public JPanel getContent() { window.validate(); return window; } AnalyzeSizeToolWindow(
      ToolWindow toolWindow,
      Project project,
      ImmutableListMultimap<Category, Suggestion> categorizedSuggestions,
      ImmutableList<Category> categoryDisplayOrder); JPanel getContent(); void setCategorizedSuggestions(
      ImmutableListMultimap<Category, Suggestion> categorizedSuggestions); void setCategoryDisplayOrder(ImmutableList<Category> categoryDisplayOrder);  }