Example #1
0
 protected void progressBar() {
   m_totalLineCount++;
   if (m_totalLineCount % 3000 == 0) {
     m_processPercent++;
     if (m_processPercent == 100) {
       m_processPercent = 0;
     }
     m_progressBarWindow.setValue(m_processPercent);
   }
 }
Example #2
0
  public void analyze(StackFileInfo stackFile) {
    m_stackFile = stackFile;
    m_stackFile.clearAll();
    m_stackFile.setUsedParser(this);
    m_stackFile.setParserConfig(m_config);

    init();

    m_progressBarWindow =
        new ProgressBarWindow(
            MainProcessor.instance().getParentComposite().getShell(), "Stack log file Analyzing");

    try {
      process();
      makeTotalSecond();
    } finally {
      if (m_workingThread_writer != null) {
        try {
          m_workingThread_writer.close();
        } catch (Exception e) {
        }
      }

      m_progressBarWindow.close();
    }

    if (m_filter != null) {
      String stackFilename = m_stackFile.getFilename();
      String ext =
          new StringBuilder(20)
              .append('_')
              .append(WORKINGTHREAD_EXT)
              .append('.')
              .append(EXTENSION)
              .toString();
      int index = stackFilename.indexOf(ext);
      if (index > 0) {
        stackFilename =
            new StringBuilder(200)
                .append(stackFilename.substring(0, index))
                .append('.')
                .append(m_filter)
                .toString();
        m_stackFile.setFilename(stackFilename);
      }
    }

    saveAll();
    clearAll();
    m_stackFile = null;
  }