コード例 #1
0
  private boolean configure(
      TestNGConfiguration configuration,
      Location location,
      ConfigurationContext context,
      Project project,
      @Nullable PsiClass delegate,
      @Nullable PsiMethod method) {
    if (delegate == null) {
      return false;
    }

    setupConfigurationModule(context, configuration);
    Module originalModule = configuration.getConfigurationModule().getModule();
    configuration.setClassConfiguration(delegate);
    if (method != null) {
      configuration.setMethodConfiguration(PsiLocation.fromPsiElement(project, method));
    }
    configuration.restoreOriginalModule(originalModule);
    configuration.setName(configuration.getName());
    JavaRunConfigurationExtensionManager.getInstance()
        .extendCreatedConfiguration(configuration, location);
    return true;
  }
コード例 #2
0
 public void setPsiElement(final PsiPackage psiPackage) {
   setName(psiPackage.getQualifiedName());
 }
コード例 #3
0
 public void setPsiElement(final PsiClass psiClass) {
   setName(psiClass.getQualifiedName());
 }