@Override public void compilationFinished( boolean aborted, int errors, int warnings, CompileContext compileContext) { if (errors < 1) { // get the current time lastCompileTime = Calendar.getInstance(); StatusBar statusBar = WindowManager.getInstance() .getStatusBar(ProjectManager.getInstance().getOpenProjects()[0]); JBPopupFactory.getInstance() .createHtmlTextBalloonBuilder( "Build ready to be sent to TestFlight, <a href='open'>Click Here</a> to open TestFlightUploader and send it.", MessageType.INFO, new HyperlinkListener() { @Override public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { ToolWindowManager.getInstance(ProjectManager.getInstance().getOpenProjects()[0]) .getToolWindow("TF Uploader") .show(null); } } }) .setFadeoutTime(4000) .createBalloon() .show(RelativePoint.getNorthEastOf(statusBar.getComponent()), Balloon.Position.atRight); } }
public static void reportNumberReplacedOccurrences(Project project, int occurrences) { if (occurrences != 0) { final StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); if (statusBar != null) { statusBar.setInfo(FindBundle.message("0.occurrences.replaced", occurrences)); } } }
@Nullable private VirtualFile getCurrentFile() { final Project project = getProject(); if (project == null) return null; EditorsSplitters splitters = FileEditorManagerEx.getInstanceEx(project).getSplittersFor(myStatusBar.getComponent()); return splitters.getCurrentFile(); }
@Override public void selectionChanged(@NotNull FileEditorManagerEvent event) { myStatusBar.updateWidget(ID()); }