public boolean equals(final Object object) {
   if (!(object instanceof Data)) return false;
   final Data second = (Data) object;
   return Comparing.equal(TEST_OBJECT, second.TEST_OBJECT)
       && Comparing.equal(getMainClassName(), second.getMainClassName())
       && Comparing.equal(getPackageName(), second.getPackageName())
       && Comparing.equal(getMethodName(), second.getMethodName())
       && Comparing.equal(getWorkingDirectory(), second.getWorkingDirectory())
       && Comparing.equal(VM_PARAMETERS, second.VM_PARAMETERS)
       && Comparing.equal(PARAMETERS, second.PARAMETERS)
       && Comparing.equal(myPattern, second.myPattern)
       && Comparing.equal(FORK_MODE, second.FORK_MODE)
       && Comparing.equal(DIR_NAME, second.DIR_NAME);
 }
  public Collection<Module> getValidModules() {
    if (TEST_PACKAGE.equals(myData.TEST_OBJECT) || TEST_PATTERN.equals(myData.TEST_OBJECT)) {
      return Arrays.asList(ModuleManager.getInstance(getProject()).getModules());
    }
    try {
      myData.getTestObject(getProject(), this).checkConfiguration();
    } catch (RuntimeConfigurationError e) {
      return Arrays.asList(ModuleManager.getInstance(getProject()).getModules());
    } catch (RuntimeConfigurationException e) {
      // ignore
    }

    return JavaRunConfigurationModule.getModulesForClass(getProject(), myData.getMainClassName());
  }
 public PsiClass getPsiElement() {
   return getConfigurationModule().findClass(myData.getMainClassName());
 }
 public String getRunClass() {
   final Data data = getPersistentData();
   return data.TEST_OBJECT != TEST_CLASS && data.TEST_OBJECT != TEST_METHOD
       ? null
       : data.getMainClassName();
 }