use of org.eclipse.ui.console.IConsole in project erlide_eclipse by erlang.
the class ErlConsoleManager method runtimeRemoved.
@Override
public void runtimeRemoved(final IBackend b) {
ErlLogger.debug("console REMOVED from " + b.getName());
final IConsole console = consoles.get(b);
if (console == null) {
return;
}
conMan.removeConsoles(new IConsole[] { console });
}
use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.
the class BuildConsole method findConsole.
/**
* Returns a reference to this {@link BuildConsole}. If the console does not
* yet exist, it is created.
*
* @return An existing or newly created instance of {@link BuildConsole}.
*/
public static BuildConsole findConsole() {
for (IConsole console : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
if (console instanceof BuildConsole) {
return (BuildConsole) console;
}
}
// no existing console, create new one
final BuildConsole console = new BuildConsole();
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { console });
return console;
}
use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.
the class ScriptConsole method anyRunning.
/**
* This method will check to see if any scripts are currently running.
* @return boolean indicating whether any scripts are running.
* @since 2.0
*/
public static boolean anyRunning() {
IConsole[] ic = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
ScriptConsole console;
for (IConsole con : ic) {
if (con instanceof ScriptConsole) {
console = (ScriptConsole) con;
if (console.isRunning()) {
return true;
}
}
}
return false;
}
use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.
the class ScriptConsole method stopAll.
/**
* This method will stop all consoles that are running.
* @since 2.0
*/
public static void stopAll() {
IConsole[] ic = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
ScriptConsole console;
for (IConsole con : ic) {
if (con instanceof ScriptConsole) {
console = (ScriptConsole) con;
console.stop();
}
}
}
use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.
the class CreaterepoUtils method findConsole.
/**
* Find the console to be used, and if none found, create
* a new console to use.
*
* @param name The name of the console.
* @return The found console or a new one if none found.
*/
public static MessageConsole findConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager manager = plugin.getConsoleManager();
MessageConsole console = null;
for (IConsole cons : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
if (cons.getName().equals(name)) {
console = (MessageConsole) cons;
}
}
// no existing console, create new one
if (console == null) {
console = new MessageConsole(name, null, null, true);
}
manager.addConsoles(new IConsole[] { console });
console.clearConsole();
console.activate();
return console;
}
Aggregations