Search in sources :

Example 1 with FixConsole

use of org.eclipse.releng.tools.AdvancedFixCopyrightAction.FixConsole in project eclipse.platform.releng by eclipse.

the class RemoveAllConsolesAction method run.

@Override
public void run() {
    List<IConsole> consolesList = new ArrayList<>();
    for (IConsole console : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
        if (console instanceof FixConsole) {
            consolesList.add(console);
        }
    }
    if (consolesList.isEmpty())
        return;
    IConsole[] consoles = new IConsole[consolesList.size()];
    for (int i = 0; i < consoles.length; i++) {
        consoles[i] = consolesList.get(i);
    }
    ConsolePlugin.getDefault().getConsoleManager().removeConsoles(consoles);
}
Also used : FixConsole(org.eclipse.releng.tools.AdvancedFixCopyrightAction.FixConsole) ArrayList(java.util.ArrayList) IConsole(org.eclipse.ui.console.IConsole)

Aggregations

ArrayList (java.util.ArrayList)1 FixConsole (org.eclipse.releng.tools.AdvancedFixCopyrightAction.FixConsole)1 IConsole (org.eclipse.ui.console.IConsole)1