JComponent () { Splitter splitter = new Splitter(true); splitter.setShowDividerControls(true); ProductivityFeaturesRegistry registry = ProductivityFeaturesRegistry.getInstance(); ArrayList<FeatureDescriptor> features = new ArrayList<>(); for (String id : registry.getFeatureIds()) { FeatureDescriptor feature = registry.getFeatureDescriptor(id); if (feature.isNeedToBeShownInGuide()) { TipAndTrickBean tip = TipUtils.INSTANCE.getTip(feature); if (tip != null && TipUtils.INSTANCE.checkTipFileExist(tip)) { features.add(feature); } } } TableView<FeatureDescriptor> table = new TableView<>(new ListTableModel<>(COLUMNS, features, 0)); TableViewSpeedSearch<FeatureDescriptor> search = new TableViewSpeedSearch<>(table, null) { @Override protected String getItemText(@NotNull FeatureDescriptor element) { return element.getDisplayName(); } }; search.setupListeners(); JPanel controlsPanel = new JPanel(new VerticalFlowLayout()); Application app = ApplicationManager.getApplication(); long uptime = System.currentTimeMillis() - app.getStartTime(); long idleTime = app.getIdleTime(); final String uptimeS = FeatureStatisticsBundle.message("feature.statistics.application.uptime", ApplicationNamesInfo.getInstance().getFullProductName(), NlsMessages.formatDurationApproximate(uptime)); final String idleTimeS = FeatureStatisticsBundle.message("feature.statistics.application.idle.time", NlsMessages.formatDurationApproximate(idleTime)); String labelText = uptimeS + ", " + idleTimeS; CompletionStatistics stats = ((FeatureUsageTrackerImpl)FeatureUsageTracker.getInstance()).getCompletionStatistics(); if (stats.dayCount > 0 && stats.sparedCharacters > 0) { String total = formatCharacterCount(stats.sparedCharacters, true); String perDay = formatCharacterCount(stats.sparedCharacters / stats.dayCount, false); labelText += "<br>" + IdeBundle.message("label.text.code.completion.saved", total, DateFormatUtil.formatDate(stats.startDate), perDay); } CumulativeStatistics fstats = ((FeatureUsageTrackerImpl)FeatureUsageTracker.getInstance()).getFixesStats(); if (fstats.dayCount > 0 && fstats.invocations > 0) { labelText += "<br>" + IdeBundle.message("label.text.quick.fixes.saved", fstats.invocations,DateFormatUtil.formatDate(fstats.startDate),fstats.invocations / fstats.dayCount); } controlsPanel.add(new JLabel(XmlStringUtil.wrapInHtml(labelText)), BorderLayout.NORTH); JPanel topPanel = new JPanel(new BorderLayout()); topPanel.add(controlsPanel, BorderLayout.NORTH); topPanel.add(ScrollPaneFactory.createScrollPane(table), BorderLayout.CENTER); splitter.setFirstComponent(topPanel); final StyledTextPane textPane = new StyledTextPane(); textPane.setBackground(UIUtil.getTextFieldBackground()); Disposer.register(getDisposable(), textPane); splitter.setSecondComponent(ScrollPaneFactory.createScrollPane(textPane)); table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { Collection<FeatureDescriptor> selection = table.getSelection(); if (selection.isEmpty()) { textPane.clear(); } else { TipAndTrickBean tip = TipUtils.INSTANCE.getTip(selection.iterator().next()); Component contextComponent = table.isShowing() ? table : WindowManager.getInstance().getFrame(myProject); List<TextParagraph> paragraphs = TipUtils.loadAndParseTip(tip, contextComponent); textPane.setParagraphs(paragraphs); } } }); ScrollingUtil.ensureSelectionExists(table); return splitter; }