/**
   * This is run once before all of the tests
   *
   * @see junit.extensions.TestSetup#setUp()
   */
  public final void setUp() throws Exception {
    // setup properties
    String noninteractive = System.getProperty(WTP_AUTOTEST_NONINTERACTIVE);
    if (noninteractive != null) {
      fPreviousWTPAutoTestNonInteractivePropValue = noninteractive;
    } else {
      fPreviousWTPAutoTestNonInteractivePropValue = "false";
    }
    System.setProperty(WTP_AUTOTEST_NONINTERACTIVE, "true");

    // get project
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    fProject = root.getProject(this.fProjectName);

    // setup project if it is not yet setup
    if (fProject == null || !fProject.exists()) {
      fProject = ProjectUtil.createProject(this.fProjectName, null, null);
      ProjectUtil.copyBundleEntriesIntoWorkspace(
          TESTING_RESOURCES_DIR + IPath.SEPARATOR + this.fProjectName,
          IPath.SEPARATOR + this.fProjectName);
    }

    // run any additional test setup
    this.additionalSetUp();

    // give the workspace a second to settle before running tests
    Thread.sleep(1000);
    waitForIndexManager();
  }
 private String getPresentablePath(@NotNull PsiFile file) {
   VirtualFile vFile = file.getVirtualFile();
   return vFile != null
       ? ProjectUtil.calcRelativeToProjectPath(vFile, myProject)
       : file.getName();
 }