Exemplo n.º 1
0
  /** If the console view is hidden, it is put to the front and focus is set on it. */
  private void putConsoleToForeground() throws PartInitException {
    IWorkbench wb = PlatformUI.getWorkbench();
    IWorkbenchWindow win = wb.getActiveWorkbenchWindow();

    IWorkbenchPage page = win.getActivePage(); // obtain the active page
    String id = IConsoleConstants.ID_CONSOLE_VIEW;
    IConsoleView view = (IConsoleView) page.showView(id);
    view.display(console);
  }
Exemplo n.º 2
0
 public static void show() {
   IWorkbench wb = PlatformUI.getWorkbench();
   IWorkbenchPage wbPage = wb.getActiveWorkbenchWindow().getActivePage();
   if (wbPage != null) {
     try {
       IConsoleView conView = (IConsoleView) wbPage.showView(IConsoleConstants.ID_CONSOLE_VIEW);
       conView.display(getRhinoConsole());
     } catch (PartInitException e) {
       PluginLogger.log("Console.show() - PartInitException: " + e.getMessage());
     }
   }
 }
Exemplo n.º 3
0
  private void showConsole(MessageConsole myConsole) {
    try {
      IConsoleView view;
      IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();

      String id = IConsoleConstants.ID_CONSOLE_VIEW;
      view = (IConsoleView) win.getActivePage().showView(id);
      view.display(myConsole);
    } catch (PartInitException e) {
      e.printStackTrace();
    }
  }
Exemplo n.º 4
0
 public static void openARESConsole() {
   IConsole myConsole = getConsole();
   IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
   String id = IConsoleConstants.ID_CONSOLE_VIEW;
   IConsoleView view;
   try {
     view = (IConsoleView) page.showView(id, null, IWorkbenchPage.VIEW_CREATE);
     view.display(myConsole);
   } catch (PartInitException e) {
     e.printStackTrace();
   }
 }
Exemplo n.º 5
0
  private static void basicOpenConsole() {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (window != null) {
      IWorkbenchPage page = window.getActivePage();
      if (page != null) {
        try {
          IConsole myConsole = findConsole(SQLPLUS_CONSOLE_VIEW);
          String id = IConsoleConstants.ID_CONSOLE_VIEW;
          IConsoleView view = (IConsoleView) page.showView(id);
          view.display(myConsole);

        } catch (PartInitException e) {
          ConsolePlugin.log(e);
        }
      }
    }
  }
Exemplo n.º 6
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.eclipse.debug.internal.ui.contexts.provisional.IDebugContextListener
  * #contextEvent
  * (org.eclipse.debug.internal.ui.contexts.provisional.DebugContextEvent)
  */
 public void debugContextChanged(final DebugContextEvent event) {
   if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
     IProcess process = getProcess();
     if (fView != null && process != null && process.equals(DebugUITools.getCurrentProcess())) {
       fView.display(fConsole);
     }
   }
 }