Пример #1
0
 public String suggestActionName() {
   final String configurationName = myConfiguration.getName();
   if (!myConfiguration.isGeneratedName()) {
     return "'" + configurationName + "'";
   }
   final JUnitConfiguration.Data data = myConfiguration.getPersistentData();
   if (data.getPackageName().trim().length() > 0) {
     return ExecutionBundle.message("test.in.scope.presentable.text", data.getPackageName());
   }
   return ExecutionBundle.message("all.tests.scope.presentable.text");
 }
Пример #2
0
 protected PsiPackage getPackage(JUnitConfiguration.Data data) throws CantRunException {
   final Project project = myConfiguration.getProject();
   final String packageName = data.getPackageName();
   final PsiManager psiManager = PsiManager.getInstance(project);
   final PsiPackage aPackage =
       JavaPsiFacade.getInstance(psiManager.getProject()).findPackage(packageName);
   if (aPackage == null) throw CantRunException.packageNotFound(packageName);
   return aPackage;
 }