/** * Returns whether the given console view should be brought to the top. * The view should not be brought to the top if the view is pinned on * a console other than the given console. */ private boolean shouldBringToTop(IConsole console, IViewPart consoleView) { boolean bringToTop= true; if (consoleView instanceof IConsoleView) { IConsoleView cView= (IConsoleView)consoleView; if (cView.isPinned()) { IConsole pinnedConsole= cView.getConsole(); bringToTop = console.equals(pinnedConsole); } } return bringToTop; }
/** * Returns whether the given console view should be brought to the top. * The view should not be brought to the top if the view is pinned on * a console other than the given console. */ private boolean shouldBringToTop(IConsole console, IViewPart consoleView) { boolean bringToTop= true; if (consoleView instanceof IConsoleView) { IConsoleView cView= (IConsoleView)consoleView; if (cView.isPinned()) { IConsole pinnedConsole= cView.getConsole(); bringToTop = console.equals(pinnedConsole); } } return bringToTop; }
public void run() { if (!fConsole.equals(fView.getConsole())) { boolean pinned = fView.isPinned(); if (pinned) { fView.setPinned(false); } fView.display(fConsole); if (pinned) { fView.setPinned(true); } } }
public void update() { setEnabled(fView.getConsole() != null); setChecked(fView.isPinned()); } }
@Override public void update() { setEnabled(fView.getConsole() != null); setChecked(fView.isPinned()); } }
/** * Shows the given console in the given console view. * * @param console the console to show * @param consoleView the console view */ public static void showConsole(IConsole console, IConsoleView consoleView) { if (!console.equals(consoleView.getConsole())) { boolean pinned = consoleView.isPinned(); if (pinned) { consoleView.setPinned(false); } consoleView.display(console); if (pinned) { consoleView.setPinned(true); } } }