예제 #1
0
 private void newProcessStarting() {
   SootOutputEvent clear_event =
       new SootOutputEvent(this, ISootOutputEventConstants.SOOT_CLEAR_EVENT);
   SootPlugin.getDefault().fireSootOutputEvent(clear_event);
   SootOutputEvent se = new SootOutputEvent(this, ISootOutputEventConstants.SOOT_NEW_TEXT_EVENT);
   se.setTextToAppend("Starting ...");
   SootPlugin.getDefault().fireSootOutputEvent(se);
 }
예제 #2
0
  public void runFinish() {
    getFileHandler().refreshFolder();
    getFileHandler().refreshAll(getSootSelection().getProject());
    // for updating markers
    SootPlugin.getDefault().getManager().updateSootRanFlag();
    final IEditorPart activeEdPart =
        SootPlugin.getDefault()
            .getWorkbench()
            .getActiveWorkbenchWindow()
            .getActivePage()
            .getActiveEditor();
    SootPlugin.getDefault().getPartManager().updatePart(activeEdPart);
    // run cfgviewer
    if (getCfgList() != null) {
      // currently this is the call graph list of pkgs
      GraphGenerator generator = new GraphGenerator();
      generator.setChildren(convertPkgList(getCfgList()));
      GraphPlugin.getDefault().setGenerator(generator);

      generator.run(null);
    }
  }
예제 #3
0
  protected void runSootAsProcess(String cmd) {

    SootProcessRunner op;
    try {
      newProcessStarting();
      op = new SootProcessRunner(Display.getCurrent(), cmd, sootClasspath);

      if (window == null) {
        window = SootPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
      }
      new ProgressMonitorDialog(window.getShell()).run(true, true, op);

    } catch (InvocationTargetException e1) {
      // handle exception
    } catch (InterruptedException e2) {
      // handle cancelation
      System.out.println(e2.getMessage());
    }
  }