예제 #1
0
 private String selectCurrentParserConfig() {
   String fileName =
       ResourceUtils.selectFileDialog(
           m_parentComposite,
           "XML Parser Configuration",
           new String[] {"XML config", "All Files"},
           new String[] {"*.xml", "*.*"});
   if (fileName != null) {
     PreferenceManager.get().setCurrentParserConfig(fileName);
     displayContent(null);
   }
   return fileName;
 }
예제 #2
0
  private void openAnalyzedInfo() {
    ArrayList<String> list = new ArrayList<String>();
    list.add(StackParser.INFO_EXTENSION);
    String filename =
        ResourceUtils.selectFileDialog(
            m_parentComposite,
            "Analyzed Info File",
            new String[] {"Stack Analyzed Files", "All Files"},
            new String[] {"*.info", "*.*"});
    if (filename == null) return;

    openAnalyzedFile(filename);
  }
예제 #3
0
  private void chooseStackFile() {
    PreferenceManager prefManager = PreferenceManager.get();

    String fileName =
        ResourceUtils.selectFileDialog(
            m_parentComposite,
            "Stack Log File",
            new String[] {"Stack Log Files", "All Files"},
            new String[] {"*.log;*.txt;*.gz;*.stack", "*.*"});

    if (fileName == null) {
      return;
    }

    File file = new File(fileName);
    prefManager.setSelectedPath(file.getParentFile());
    openFile(file, false);
  }
예제 #4
0
  public static void removeAllAnalyzedFile(StackFileInfo stackFileInfo) {
    String filename = stackFileInfo.getFilename();
    if (filename != null) {
      ResourceUtils.removeFile(getAnaylzedInfoFilename(filename));
      ResourceUtils.removeFile(getAnaylzedFilename(filename, WORKINGTHREAD_EXT));
      ResourceUtils.removeFile(getAnaylzedFilename(filename, SERVICE_EXT));
      ResourceUtils.removeFile(getAnaylzedFilename(filename, SQL_EXT));
      ResourceUtils.removeFile(getAnaylzedFilename(filename, TOP_EXT));
      ResourceUtils.removeFile(getAnaylzedFilename(filename, LOG_EXT));
      ResourceUtils.removeFile(getAnaylzedFilename(filename, UNIQUE_EXT));
    }

    ParserConfig config = stackFileInfo.getParserConfig();
    if (config != null) {
      ArrayList<AnalyzerValue> list = config.getAnalyzerList();
      if (list != null) {
        for (int i = 0; i < list.size(); i++) {
          ResourceUtils.removeFile(getAnaylzedFilename(filename, list.get(i).getExtension()));
        }
      }
    }
  }