Package org.eclipse.ui.console

Examples of org.eclipse.ui.console.IConsoleManager


    private MessageConsole console;

    @Override
    public void openConsole() {

        IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();

        initConsole(consoleManager);

        consoleManager.showConsoleView(console);
    }
View Full Code Here


                return;
            }

            delayedEvents.add(event);

            final IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();

            if (listener == null) {
                listener = new IConsoleListener() {

                    @Override
                    public void consolesRemoved(IConsole[] consoles) {
                        synchronized (sync) {
                            for (IConsole console : consoles) {
                                if (console.equals(slingConsole)) {
                                    slingConsole = null;
                                }
                            }
                        }
                    }

                    @Override
                    public void consolesAdded(IConsole[] consoles) {
                        synchronized (sync) {
                            for (IConsole console : consoles) {
                                if (console.getType().equals(SlingConsoleFactory.CONSOLE_TYPE_SLING)) {
                                    slingConsole = (MessageConsole) console;
                                    synchronized (delayedEvents) {
                                        for (Iterator<Event> it = delayedEvents.iterator(); it.hasNext();) {
                                            logEvent(it.next(), slingConsole);
                                            it.remove();
                                        }
                                    }
                                    consoleManager.removeConsoleListener(listener);
                                    listener = null;
                                    break;
                                }
                            }
                        }
                    }
                };

                consoleManager.addConsoleListener(listener);
            }
        }
    }
View Full Code Here

        }
    }

    private void initSlingConsole() {
        if (slingConsole == null) {
            final IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
            for (IConsole console : consoleManager.getConsoles()) {
                if (console.getType().equals(SlingConsoleFactory.CONSOLE_TYPE_SLING)) {
                    slingConsole = (MessageConsole) console;
                    break;
                }
            }
View Full Code Here

    private static BuildConsole findConsole()
    {
        BuildConsole console = null;

        IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();

        for (IConsole c : manager.getConsoles())
        {
            if (c instanceof BuildConsole)
            {
                console = (BuildConsole) c;
                break;
            }
        }

        if (console == null)
        {
            console = new BuildConsole();
            manager.addConsoles(new IConsole[] { console });
        }

        return console;
    }
View Full Code Here

    end = true;
  }
 
  private MessageConsole findConsole(String name) {
    ConsolePlugin plugin = ConsolePlugin.getDefault();
    IConsoleManager conMan = plugin.getConsoleManager();
    IConsole[] existing = conMan.getConsoles();

    for (IConsole iCons : existing)
      if (name.equals(iCons.getName()))
        return (MessageConsole) iCons;

    // on n'a pas trouv� la console, on en cr�e une nouvelle
    MessageConsole myConsole = new MessageConsole(name, null);
    conMan.addConsoles(new IConsole[] { myConsole });

    return myConsole;
  }
View Full Code Here

    }

    public static void showConsole() {
        IvyConsole console = IvyPlugin.getDefault().getConsole();
        if (console != null) {
            IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
            IConsole[] existing = manager.getConsoles();
            boolean exists = false;
            for (int i = 0; i < existing.length; i++) {
                if (console == existing[i]) {
                    exists = true;
                }
            }
            if (!exists) {
                manager.addConsoles(new IConsole[] {console});
            }
            manager.showConsoleView(console);
        }
    }
View Full Code Here

            manager.showConsoleView(console);
        }
    }

    public static void closeConsole() {
        IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
        IvyConsole console = IvyPlugin.getDefault().getConsole();
        if (console != null) {
            manager.removeConsoles(new IConsole[] {console});
            ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(
                console.new MyLifecycle());
        }
    }
View Full Code Here

  public TestResultsPanel(final IWorkbenchPage workbenchPage, Composite parent, int style) {
    super(parent, style);

    testCaseOpener = new TestCaseOpener(ServiceLocator.getService(LoadedSourceFileLibrary.class));

    IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
    MessageConsole messageConsole = new MessageConsole("JSTestDriver", null);
    messageConsole.activate();
    messageConsoleStream = new MessageConsoleStream(messageConsole);
    consoleManager.addConsoles(new IConsole[] {messageConsole});
    setLayout(new GridLayout(3, true));
    GridData layoutData = new GridData();
    layoutData.grabExcessHorizontalSpace = true;
    layoutData.grabExcessVerticalSpace = true;
    layoutData.verticalAlignment = SWT.FILL;
View Full Code Here

    }

    public static void showConsole() {
        IvyConsole console = IvyPlugin.getDefault().getConsole();
        if (console != null) {
            IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
            IConsole[] existing = manager.getConsoles();
            boolean exists = false;
            for (int i = 0; i < existing.length; i++) {
                if (console == existing[i])
                    exists = true;
            }
            if (!exists)
                manager.addConsoles(new IConsole[] {console});
            manager.showConsoleView(console);
        }
    }
View Full Code Here

            manager.showConsoleView(console);
        }
    }

    public static void closeConsole() {
        IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
        IvyConsole console = IvyPlugin.getDefault().getConsole();
        if (console != null) {
            manager.removeConsoles(new IConsole[] {console});
            ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(
                console.new MyLifecycle());
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.console.IConsoleManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.