void (boolean visible) { if (visible) { myShowTime.set(System.nanoTime()); ProblemsViewStatsCollector.tabShown(this); } else { Long time = myShowTime.getAndSet(null); if (time != null) { ProblemsViewStatsCollector.tabHidden(this, System.nanoTime() - time); } IntentionsUI intentionUI = getProject().getServiceIfCreated(IntentionsUI.class); if (intentionUI != null) { intentionUI.hide(); } } }