Package org.eclipse.ui.console

Examples of org.eclipse.ui.console.MessageConsole


    }

    private void initConsole(IConsoleManager consoleManager) {

        if (console == null) {
            console = new MessageConsole(WhitelabelSupport.getProductName() + " Console", CONSOLE_TYPE_SLING,
                    WhitelabelSupport.getProductIcon(), true);
            consoleManager.addConsoles(new IConsole[] { console });
        }
    }
View Full Code Here


  public void startTracking(CloudFoundryApplicationModule appModule) {
    if (server == null || appModule == null) {
      return;
    }

    MessageConsole console = findCloudFoundryConsole(server, appModule);
    if (console != null) {
      if (Logger.INFO) {
         Logger.println(Logger.INFO_LEVEL, this, "isApplicationStarted", "Start app state tracking: " + ((IModule)appModule).getName()); //$NON-NLS-1$ //$NON-NLS-2$
      }
      consoleMonitor = createPatternMatchListener(appModule);
      console.addPatternMatchListener(consoleMonitor);
    }
  }
View Full Code Here

      return;
    }
    if (Logger.INFO) {
       Logger.println(Logger.INFO_LEVEL, this, "stopTracking", "Stop app state tracking: " + ((IModule)appModule).getName()); //$NON-NLS-1$ //$NON-NLS-2$
    }
    MessageConsole console = findCloudFoundryConsole(server, appModule);
    if (console != null) {
      console.removePatternMatchListener(consoleMonitor);
    }
  }
View Full Code Here

    String appUrl = getConsoleId(server.getServer(), appModule);
    ApplicationLogConsole serverLogTail = consoleByUri.get(appUrl);
    if (serverLogTail == null) {

      MessageConsole appConsole = getApplicationConsole(server, appModule);

      serverLogTail = new ApplicationLogConsole(new ConsoleConfig(appConsole, server, appModule));
      consoleByUri.put(getConsoleId(server.getServer(), appModule), serverLogTail);
    }
    return serverLogTail;
View Full Code Here

      consoleByUri.remove(appUrl);

      serverLogTail.stop();

      MessageConsole messageConsole = serverLogTail.getConsole();
      consoleManager.removeConsoles(new IConsole[] { messageConsole });
      messageConsole.destroy();
    }
  }
View Full Code Here

    consoleByUri.clear();
  }

  public static MessageConsole getApplicationConsole(CloudFoundryServer server,
      CloudFoundryApplicationModule appModule) {
    MessageConsole appConsole = null;
    String consoleName = getConsoleId(server.getServer(), appModule);
    for (IConsole console : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
      if (console instanceof MessageConsole && console.getName().equals(consoleName)) {
        appConsole = (MessageConsole) console;
      }
    }
    if (appConsole == null) {
      appConsole = new MessageConsole(getConsoleDisplayName(server, appModule),
          ApplicationLogConsole.CONSOLE_TYPE, null, true);
      appConsole.setAttribute(ApplicationLogConsole.ATTRIBUTE_SERVER, server);
      appConsole.setAttribute(ApplicationLogConsole.ATTRIBUTE_APP, appModule);
      // appConsole.setAttribute(ApplicationLogConsole.ATTRIBUTE_INSTANCE,
      // instanceIndex);
      ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { appConsole });
    }
View Full Code Here

  }

  protected synchronized CloudFoundryConsole getTraceConsoleStream() {

    if (traceConsole == null) {
      MessageConsole messageConsole = null;
      for (IConsole console : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
        if (console instanceof MessageConsole && console.getName().equals(CLOUD_FOUNDRY_TRACE_CONSOLE_NAME)) {
          messageConsole = (MessageConsole) console;
        }
      }
      if (messageConsole == null) {
        messageConsole = new MessageConsole(CLOUD_FOUNDRY_TRACE_CONSOLE_NAME, TRACE_CONSOLE_ID, null, true);
      }
      traceConsole = new CloudFoundryConsole(new ConsoleConfig(messageConsole, null, null));

      ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { messageConsole });
View Full Code Here

      CloudFoundryApplicationModule appModule, int instanceIndex) {
    String appUrl = getConsoleId(server.getServer(), appModule, instanceIndex);
    CloudFoundryFileConsole serverLogTail = consoleByUri.get(appUrl);
    if (serverLogTail == null) {

      MessageConsole appConsole = getApplicationConsole(server, appModule, instanceIndex);

      serverLogTail = new CloudFoundryFileConsole(appModule, appConsole);
      consoleByUri.put(getConsoleId(server.getServer(), appModule, instanceIndex), serverLogTail);
    }
    return serverLogTail;
View Full Code Here

    if (serverLogTail != null) {
     
      consoleByUri.remove(appUrl);
     
      serverLogTail.stop();
      MessageConsole messageConsole = serverLogTail.getConsole();
      consoleManager.removeConsoles(new IConsole[] { messageConsole });
      messageConsole.destroy();
    }
  }
View Full Code Here

  }

  public static MessageConsole getApplicationConsole(CloudFoundryServer server,
      CloudFoundryApplicationModule appModule, int instanceIndex) {
    MessageConsole appConsole = null;
    String consoleName = getConsoleId(server.getServer(), appModule, instanceIndex);
    for (IConsole console : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
      if (console instanceof MessageConsole && console.getName().equals(consoleName)) {
        appConsole = (MessageConsole) console;
      }
    }
    if (appConsole == null) {
      appConsole = new MessageConsole(getConsoleDisplayName(server, appModule, instanceIndex),
          CloudFoundryFileConsole.CONSOLE_TYPE, null, true);
      appConsole.setAttribute(CloudFoundryFileConsole.ATTRIBUTE_SERVER, server);
      appConsole.setAttribute(CloudFoundryFileConsole.ATTRIBUTE_APP, appModule);
      appConsole.setAttribute(CloudFoundryFileConsole.ATTRIBUTE_INSTANCE, instanceIndex);
      ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { appConsole });
    }

    return appConsole;
  }
View Full Code Here

TOP

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

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.