Package org.eclipse.ui.console

Examples of org.eclipse.ui.console.MessageConsoleStream


        }
      });
      project_return result = parser.project();
      if (parser.getNumberOfSyntaxErrors() > 0){
        MessageConsole console = ToolModelActivator.findConsole(ToolModelActivator.TOOL_PARSER_OUTPUT);
        MessageConsoleStream msgStream = console.newMessageStream();
        msgStream.println(parser.getNumberOfSyntaxErrors() + " Syntax error in project " + file.getName() + "\n"
            + parseErrors.toString());
      } else {
        tree = (CommonTree) result.getTree();
        CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
        nodes.setTokenStream(tokens);
View Full Code Here


 
  public static void print(String message){
    if(console == null)
      init();

    MessageConsoleStream stream = console.newMessageStream();
    try {
      stream.print(message);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

  public static void println(String line){
    if(console == null)
      init();

    MessageConsoleStream stream = console.newMessageStream();
    try {
      stream.println(line);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

  public static void dumpStream(InputStream in){
    if(console == null)
      init();

    MessageConsoleStream stream = console.newMessageStream();
    BufferedReader reader = new BufferedReader(new InputStreamReader(in));
    String r = null;
    try {
      while((r = reader.readLine()) != null)
        stream.println(r);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

 
  public static void print(String message){
    if(console == null)
      init();

    MessageConsoleStream stream = console.newMessageStream();
    try {
      stream.print(message);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

  public static void println(String line){
    if(console == null)
      init();

    MessageConsoleStream stream = console.newMessageStream();
    try {
      stream.println(line);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

  public static void dumpStream(InputStream in){
    if(console == null)
      init();

    MessageConsoleStream stream = console.newMessageStream();
    BufferedReader reader = new BufferedReader(new InputStreamReader(in));
    String r = null;
    try {
      while((r = reader.readLine()) != null)
        stream.println(r);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

   
    this._saros.getSarosEditorManager().addSharedEditorListener(this);
  }
 
  public void print(String message){
    MessageConsoleStream stream = console.newMessageStream();
    try {
      stream.print(message);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

      e.printStackTrace();
    }
  }

  public void println(String line){
    MessageConsoleStream stream = console.newMessageStream();
    try {
      stream.println(line);
      stream.flush();
      stream.close();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

   
    private void analyseIO(Process proc) throws IOException, InterruptedException {
        BufferedReader goblinStream = new BufferedReader(new InputStreamReader(proc.getInputStream()));
        BufferedReader goblerrStream = new BufferedReader(new InputStreamReader(proc.getErrorStream()));

        MessageConsoleStream out = consoleOut();
     
        String line;
        while ((line = goblinStream.readLine()) != null) {
           
          if (monitor.isCanceled()) {
                throw new InterruptedException();
            }
           
          if (line.startsWith("WARNING")) {
            String[] parts = line.split(" /-/ ");
           
            IFile file = getFile(parts[1]);
            int lnr = Integer.parseInt(parts[2]);
            String warn = parts[3];
           
           
            if (file != null)
              addMarker(file,lnr,warn);
           
          } else if (line.startsWith("PROGRESS")){
            String[] parts = line.split(" /-/ ");
           
            if ("SUBTASK".equals(parts[1])){
              int subtaskWork = Integer.parseInt(parts[3]);
              monitor.beginSubtask(parts[2], subtaskWork);
            } else if ("WORKED".equals(parts[1])) {
              int worked = Integer.parseInt(parts[2]);
              monitor.worked(worked);
            } else if ("MORE WORK".equals(parts[1])){
              int work = Integer.parseInt(parts[2]);
              monitor.add_work(work);
            }
           
          } else
                out.println(line);
        }
        while ((line = goblerrStream.readLine()) != null)
            out.println(line);
    }
View Full Code Here

TOP

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

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.