public void consolesRemoved(IConsole[] consoles) { for (int i = 0; i < consoles.length; i++) { IConsole console = consoles[i]; if (console == AbstractConsole.this) { ConsolePlugin.getDefault().getConsoleManager().removeConsoleListener(this); destroy(); } } } }
/** * Shows this console in all console views. This console will be become visible * if another console is currently pinned. * * @since 3.1 */ public void activate() { ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this); }
private static MessageConsole findConsole(String name) { ConsolePlugin plugin = ConsolePlugin.getDefault(); IConsoleManager conMan = plugin.getConsoleManager(); IConsole[] existing = conMan.getConsoles(); for (int i = 0; i < existing.length; i++) if (name.equals(existing[i].getName())) return (MessageConsole) existing[i]; MessageConsole myConsole = new MessageConsole(name, null); conMan.addConsoles(new IConsole[] { myConsole }); return myConsole; }
@Override public void run() { ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{fConsole}); } }
/** * Returns the console manager. * * @return the console manager */ private IConsoleManager getConsoleManager() { return ConsolePlugin.getDefault().getConsoleManager(); }
MessageConsole console = new MessageConsole("My Console", null); console.activate(); ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{ console }); MessageConsoleStream consoleStream = console.newMessageStream(); consoleStream.println("Hello, world!");
public void run() { IHyperlink link = viewer.getHyperlink(); if (link != null) { link.linkActivated(); } }
@Override public boolean isConflicting(ISchedulingRule rule) { if (contains(rule)) { return true; } if (rule != this && rule instanceof MatcherSchedulingRule) { return (((MatcherSchedulingRule)rule).getConsole() == TextConsole.this); } return false; }
public IOConsolePage(TextConsole console, IConsoleView view) { super(console, view); fPropertyChangeListener = new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(IConsoleConstants.P_CONSOLE_OUTPUT_COMPLETE)) { setReadOnly(); } } }; console.addPropertyChangeListener(fPropertyChangeListener); }
/** * Disposes this console. This method should only be called by clients managing a * console's lifecycle, otherwise this method will be called automatically when this * console is removed from the console manager. The method is called once to dispose * this console, after which this console will no longer be used. * * @since 3.1 */ public final void destroy() { dispose(); }
/** * Returns a viewer used to display the contents of this page's console. * * @param parent container for the viewer * @return a viewer used to display the contents of this page's console */ protected TextConsoleViewer createViewer(Composite parent) { return new TextConsoleViewer(parent, fConsole, fConsoleView); }
@Override public void verifyText(VerifyEvent e) { // unlock the auto lock if user starts typing only if it was not manual lock if (scrollLockStateProvider != null && !scrollLockStateProvider.getScrollLock()) { setScrollLock(false); } } });
@Override public void consolesRemoved(IConsole[] consoles) { for (int i = 0; i < consoles.length; i++) { IConsole console = consoles[i]; if (console == AbstractConsole.this) { ConsolePlugin.getDefault().getConsoleManager().removeConsoleListener(this); destroy(); } } } }
public void run() { ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{fConsole}); } }
/** * Shows this console in all console views. This console will be become visible * if another console is currently pinned. * * @since 3.1 */ public void activate() { ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this); }
@Override public void run() { IHyperlink link = viewer.getHyperlink(); if (link != null) { link.linkActivated(); } }