Package org.eclipse.ui.console

Examples of org.eclipse.ui.console.IConsoleView


  static ConsolePrinter createAndDisplayConsole() throws PartInitException {
    MessageConsole console = findConsole();
    IWorkbenchPage page = activeWorkbenchPage();
    if (page != null) {
      IConsoleView view = (IConsoleView) page.showView(ID_CONSOLE_VIEW);
      view.display(console);
    }
    return new ConsolePrinter(console);
  }
View Full Code Here


      public void run() {

        try {
          IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
          String id = IConsoleConstants.ID_CONSOLE_VIEW;
          IConsoleView view;
          view = (IConsoleView) page.showView(id);
          view.display(console);
        } catch (PartInitException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }catch(NullPointerException e){
          e.printStackTrace();
View Full Code Here

      public void run() {

        try {
          IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
          String id = IConsoleConstants.ID_CONSOLE_VIEW;
          IConsoleView view;
          view = (IConsoleView) page.showView(id);
          view.display(console);
        } catch (PartInitException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }catch(NullPointerException e){
          e.printStackTrace();
View Full Code Here

      public void run() {

        try {
          IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
          String id = IConsoleConstants.ID_CONSOLE_VIEW;
          IConsoleView view;
          view = (IConsoleView) page.showView(id);
          view.display(console);
        } catch (PartInitException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }catch(NullPointerException e){
          e.printStackTrace();
View Full Code Here

            .getActiveWorkbenchWindow();
        if (window == null)
          return Status.OK_STATUS; // Eclipse exiting
        IWorkbenchPage page = window.getActivePage();
        try {
          IConsoleView view = (IConsoleView) page.showView(ID, null,
              IWorkbenchPage.VIEW_VISIBLE);
          view.display(console);
        } catch (PartInitException e) {
          Environment.logException("Could not activate the console", e);
        }
        return Status.OK_STATUS;
      }
View Full Code Here

   * 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;
  }
View Full Code Here

        public IStatus runInUIThread(IProgressMonitor monitor) {
          IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
          if (window != null) {
            IWorkbenchPage page= window.getActivePage();
            if (page != null) {
              IConsoleView consoleView= (IConsoleView)page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
              if (consoleView != null) {
                consoleView.warnOfContentChange(console);
              }
            }
          } 
          fWarnQueued = false;
          return Status.OK_STATUS;
View Full Code Here

                        }
                    }
                   
                    if (!consoleFound) {
                        try {
                            IConsoleView consoleView = (IConsoleView) page.showView(IConsoleConstants.ID_CONSOLE_VIEW, null, IWorkbenchPage.VIEW_CREATE);
                            boolean bringToTop = shouldBringToTop(console, consoleView);
                            if (bringToTop) {
                                page.bringToTop(consoleView);
                            }
                            consoleView.display(console);       
                        } catch (PartInitException pie) {
                            ConsolePlugin.log(pie);
                        }
                    }
                }
View Full Code Here

                if (consoleParts.size() == 0) {
                    consoleParts = getConsoleParts(page, true);
                }

                if (consoleParts.size() > 0) {
                    IConsoleView view = null;
                    long lastChangeMillis = Long.MIN_VALUE;

                    if (consoleParts.size() == 1) {
                        view = (IConsoleView) consoleParts.get(0);
                    } else {
                        //more than 1 view available
                        for (int i = 0; i < consoleParts.size(); i++) {
                            IConsoleView temp = (IConsoleView) consoleParts.get(i);
                            IConsole console = temp.getConsole();
                            if (console instanceof PydevConsole) {
                                PydevConsole tempConsole = (PydevConsole) console;
                                ScriptConsoleViewer viewer = tempConsole.getViewer();

                                long tempLastChangeMillis = viewer.getLastChangeMillis();
View Full Code Here

      return;
    try {
      MessageConsole console = findConsole("Code Statistics: XML OUTPUT");
      String id = IConsoleConstants.ID_CONSOLE_VIEW;
      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      IConsoleView view = (IConsoleView) page.showView(id);
      view.display(console);

      PrintWriter out = new PrintWriter(new BufferedOutputStream(console.newMessageStream()));
      for (ICompilationUnit icu : Utils.getSelectedIcu(selection)) {
        CompilationUnit cu = Utils.parse(icu);
        XmlVisitor visitor;
View Full Code Here

TOP

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

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.