Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
17,400
TestData () { return data; }
getPersistantData
17,401
Collection<Module> () { //TODO add handling for package return JavaRunConfigurationModule.getModulesForClass(getProject(), data.getMainClassName()); }
getValidModules
17,402
String () { return TestNGTestObject.fromConfig(this).getGeneratedName(); }
suggestedName
17,403
String () { return TestNGTestObject.fromConfig(this).getActionName(); }
getActionName
17,404
void (@Nullable String value) { data.setVMParameters(value); }
setVMParameters
17,405
String () { return data.getVMParameters(); }
getVMParameters
17,406
void (String value) { data.setProgramParameters(value); }
setProgramParameters
17,407
String () { return data.getProgramParameters(); }
getProgramParameters
17,408
void (String value) { data.setWorkingDirectory(value); }
setWorkingDirectory
17,409
String () { return data.getWorkingDirectory(); }
getWorkingDirectory
17,410
void (@NotNull Map<String, String> envs) { data.setEnvs(envs); }
setEnvs
17,411
void (boolean passParentEnvs) { data.PASS_PARENT_ENVS = passParentEnvs; }
setPassParentEnvs
17,412
boolean () { return data.PASS_PARENT_ENVS; }
isPassParentEnvs
17,413
boolean () { return ALTERNATIVE_JRE_PATH_ENABLED; }
isAlternativeJrePathEnabled
17,414
void (boolean enabled) { this.ALTERNATIVE_JRE_PATH_ENABLED = enabled; }
setAlternativeJrePathEnabled
17,415
String () { return ALTERNATIVE_JRE_PATH != null ? new AlternativeJrePathConverter().fromString(ALTERNATIVE_JRE_PATH) : null; }
getAlternativeJrePath
17,416
void (String path) { String collapsedPath = path != null ? new AlternativeJrePathConverter().toString(path) : null; boolean changed = !Objects.equals(ALTERNATIVE_JRE_PATH, collapsedPath); this.ALTERNATIVE_JRE_PATH = collapsedPath; ApplicationConfiguration.onAlternativeJreChanged(changed, getProject()); }
setAlternativeJrePath
17,417
String () { return !data.TEST_OBJECT.equals(TestType.CLASS.getType()) && !data.TEST_OBJECT.equals(TestType.METHOD.getType()) ? null : data.getMainClassName(); }
getRunClass
17,418
String () { return !data.TEST_OBJECT.equals(TestType.PACKAGE.getType()) ? null : data.getPackageName(); }
getPackage
17,419
void (PsiClass psiclass) { setModule(data.setMainClass(psiclass)); data.TEST_OBJECT = TestType.CLASS.getType(); setGeneratedName(); }
beClassConfiguration
17,420
boolean (PsiElement element) { return TestNGTestObject.fromConfig(this).isConfiguredByElement(element); }
isConfiguredByElement
17,421
String () { return getPersistantData().TEST_OBJECT; }
getTestType
17,422
String (String paramSetName) { return TestNGConfigurationProducer.getInvocationNumber(paramSetName); }
prepareParameterizedParameter
17,423
TestSearchScope () { return getPersistantData().getScope(); }
getTestSearchScope
17,424
void (TestSearchScope searchScope) { getPersistantData().setScope(searchScope); }
setSearchScope
17,425
void (Module module, PsiPackage pkg) { data.setPackage(pkg); setModule(module); data.TEST_OBJECT = TestType.PACKAGE.getType(); setGeneratedName(); }
setPackageConfiguration
17,426
void (Location<PsiMethod> location) { setModule(data.setTestMethod(location)); setGeneratedName(); }
beMethodConfiguration
17,427
void (PsiClass psiclass) { setModule(data.setMainClass(psiclass)); data.TEST_OBJECT = TestType.CLASS.getType(); setGeneratedName(); }
setClassConfiguration
17,428
void (Location<PsiMethod> location) { setModule(data.setTestMethod(location)); setGeneratedName(); }
setMethodConfiguration
17,429
void (List<PsiClass> classes, PsiMethod method) { data.TEST_OBJECT = TestType.PATTERN.getType(); final String suffix; if (method != null) { data.METHOD_NAME = method.getName(); suffix = "," + data.METHOD_NAME; } else { suffix = ""; } LinkedHashSet<String> patterns = new LinkedHashSet<>(); for (PsiClass pattern : classe...
bePatternConfiguration
17,430
void (@NotNull Element element) { super.readExternal(element); JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element); DefaultJDOMExternalizer.readExternal(this, element); DefaultJDOMExternalizer.readExternal(getPersistantData(), element); EnvironmentVariablesComponent.readExternal(element, getP...
readExternal
17,431
boolean (@NotNull Field field) { return "TEST_OBJECT".equals(field.getName()) || super.test(field); }
test
17,432
RefactoringElementListener (final PsiElement element) { if (data.TEST_OBJECT.equals(TestType.PACKAGE.getType())) { if (!(element instanceof PsiPackage)) return null; final RefactoringElementListener listener = RefactoringListeners.getListener((PsiPackage)element, myPackage); return RunConfigurationExtension.wrapRefacto...
getRefactoringElementListener
17,433
void (@NotNull final PsiElement newElement) { data.setTestMethod(PsiLocation.fromPsiElement((PsiMethod)newElement)); }
elementRenamedOrMoved
17,434
void (@NotNull PsiElement newElement, @NotNull String oldQualifiedName) { final int methodIdx = oldQualifiedName.indexOf("#") + 1; if (methodIdx <= 0 || methodIdx >= oldQualifiedName.length()) return; data.METHOD_NAME = oldQualifiedName.substring(methodIdx); }
undoElementMovedOrRenamed
17,435
boolean () { return false; }
collectOutputFromProcessHandler
17,436
SMTRunnerConsoleProperties (@NotNull Executor executor) { return new TestNGConsoleProperties(this, executor); }
createTestConsoleProperties
17,437
byte () { return 0x1; }
getTestFrameworkId
17,438
Set<String> () { if (!TestType.GROUP.getType().equals(data.TEST_OBJECT)) { return null; } Set<String> groups = StringUtil.split(data.getGroupName(), ",").stream() .map(String::trim) .filter(StringUtil::isNotEmpty) .collect(Collectors.toSet()); return groups.isEmpty() ? null : groups; }
calculateGroupNames
17,439
void (PsiLocation<PsiMethod> position) { beMethodConfiguration(position); getPersistantData().TEST_OBJECT = TestType.SOURCE.getType(); }
beFromSourcePosition
17,440
String () { return TESTNG_TEST_FRAMEWORK_NAME; }
getFrameworkName
17,441
boolean (Module module) { return module != null && getConfiguration().getPersistantData().getScope() != TestSearchScope.WHOLE_PROJECT; }
configureByModule
17,442
void (JavaParameters javaParameters, Module module) { javaParameters.getClassPath().addFirst(PathUtil.getJarPathForClass(RemoteTestNGStarter.class)); }
configureRTClasspath
17,443
List<String> (String parameters) { try { Integer.parseInt(parameters); return super.getNamedParams(parameters); } catch (NumberFormatException e) { return Arrays.asList(parameters.split(" ")); } }
getNamedParams
17,444
String () { return "none"; }
getForkMode
17,445
void () { super.onFound(); writeClassesPerModule(myClasses); }
onFound
17,446
void (Map<PsiClass, Map<PsiMethod, List<String>>> classes) { if (forkPerModule()) { final Map<Module, List<String>> perModule = new TreeMap<>((o1, o2) -> StringUtil.compare(o1.getName(), o2.getName(), true)); for (final PsiClass psiClass : classes.keySet()) { final Module module = ModuleUtilCore.findModuleForPsiElement...
writeClassesPerModule
17,447
String () { return "testng"; }
getFrameworkId
17,448
void (ParametersList parametersList, String tempFilePath) { parametersList.add(new CompositeParameterTargetedValue("-temp")); parametersList.add(new CompositeParameterTargetedValue().addPathPart(tempFilePath)); }
passTempFile
17,449
TestNGConfiguration () { return config; }
getConfiguration
17,450
TestSearchScope () { return getConfiguration().getPersistantData().getScope(); }
getScope
17,451
void (List<String> options) { TestData data = getConfiguration().getPersistantData(); if (TestType.METHOD.getType().equals(data.TEST_OBJECT) || TestType.CLASS.getType().equals(data.TEST_OBJECT)) { options.add(StringUtil.getPackageName(data.MAIN_CLASS_NAME)); } else if (TestType.PACKAGE.getType().equals(data.TEST_OBJECT...
collectPackagesToOpen
17,452
boolean () { return getConfiguration().isUseModulePath(); }
useModulePath
17,453
boolean (@NotNull RunProfile profile) { return profile instanceof TestNGConfiguration; }
validForProfile
17,454
String () { return "testng"; }
getThreadName
17,455
String () { return "TestNGDebug"; }
getRunnerId
17,456
void (PsiClass psiClass) { final JTextField textField = myPatternTextField.getTextField(); final String text = textField.getText(); textField.setText(text + (!text.isEmpty() ? "||" : "") + psiClass.getQualifiedName()); }
onClassChoosen
17,457
void (ActionEvent e) { showDialog(); }
actionPerformed
17,458
boolean () { return false; }
productionOnly
17,459
void () { final boolean allPackagesInProject = packagesInProject.isSelected() && packagePanel.isVisible(); moduleClasspath.setEnabled(!allPackagesInProject); if (allPackagesInProject) { moduleClasspath.getComponent().setSelectedItem(null); } }
evaluateModuleClassPath
17,460
void () { final TestType testKind = (TestType)myTestKind.getSelectedItem(); if (testKind == TestType.PACKAGE) { packagePanel.setVisible(true); packageField.setVisible(true); classField.setVisible(false); methodField.setVisible(false); groupField.setVisible(false); suiteField.setVisible(false); myPattern.setVisible(fals...
redisplay
17,461
String () { return classField.getComponent().getText(); }
getClassName
17,462
ModuleDescriptionsComboBox () { return moduleClasspath.getComponent(); }
getModulesComponent
17,463
void (@NotNull TestNGConfiguration config) { this.config = config; model.reset(config); commonJavaParameters.reset(config); getModuleSelector().reset(config); TestData data = config.getPersistantData(); TestSearchScope scope = data.getScope(); if (scope == TestSearchScope.SINGLE_MODULE) { packagesInModule.setSelected(t...
resetEditorFrom
17,464
void (@NotNull TestNGConfiguration config) { model.apply(getModuleSelector().getModule(), config); getModuleSelector().applyTo(config); TestData data = config.getPersistantData(); final TestType testKind = (TestType)myTestKind.getSelectedItem(); if (testKind != TestType.CLASS && testKind != TestType.METHOD && testKind ...
applyEditorTo
17,465
ConfigurationModuleSelector () { return moduleSelector; }
getModuleSelector
17,466
JComponent () { return panel; }
createEditor
17,467
JComponent () { return anchor; }
getAnchor
17,468
void (JComponent anchor) { this.anchor = anchor; methodField.setAnchor(anchor); packageField.setAnchor(anchor); groupField.setAnchor(anchor); suiteField.setAnchor(anchor); outputDirectory.setAnchor(anchor); classField.setAnchor(anchor); myPattern.setAnchor(anchor); myTestLabel.setAnchor(anchor); }
setAnchor
17,469
void () { myShortenCommandLineCombo = new LabeledComponent<>(); }
createUIComponents
17,470
void (JRadioButton[] buttons, ChangeListener changelistener) { ButtonGroup buttongroup = new ButtonGroup(); for (JRadioButton button : buttons) { button.getModel().addChangeListener(changelistener); buttongroup.add(button); } if (buttongroup.getSelection() == null) buttongroup.setSelected(buttons[0].getModel(), true); ...
registerListener
17,471
void () { commonParametersPanel.add(commonJavaParameters, BorderLayout.CENTER); classField.setComponent(new EditorTextFieldWithBrowseButton(project, true, (declaration, place) -> { if (declaration instanceof PsiClass && place.getParent() instanceof PsiJavaCodeReferenceElement) { return JavaCodeFragment.VisibilityChecke...
createView
17,472
boolean (VirtualFile virtualFile, boolean showHidden) { if (!showHidden && virtualFile.getName().charAt(0) == '.') return false; return virtualFile.isDirectory() || "properties".equals(virtualFile.getExtension()); }
isFileVisible
17,473
void (TestType type) { //LOGGER.info("onTypeChanged with " + type); myTestKind.setSelectedItem(type); if (type == TestType.PACKAGE) { packageField.setEnabled(true); classField.setEnabled(false); methodField.setEnabled(false); groupField.setEnabled(false); suiteField.setEnabled(false); myPattern.setEnabled(false); } els...
onTypeChanged
17,474
GlobalSearchScope (Module[] modules) { if (modules == null || modules.length == 0) return null; GlobalSearchScope[] scopes = ContainerUtil.map2Array(modules, GlobalSearchScope.class, GlobalSearchScope::moduleWithDependenciesAndLibrariesScope); return GlobalSearchScope.union(scopes); }
getSearchScope
17,475
String () { GlobalSearchScope searchScope = getSearchScope(config.getModules()); if (searchScope == null) { searchScope = GlobalSearchScope.allScope(project); } final TestListenerFilter filter = new TestListenerFilter(searchScope, project); TreeClassChooser chooser = TreeClassChooserFactory.getInstance(project) .create...
selectListenerClass
17,476
void (AnActionButton button) { final String className = selectListenerClass(); if (className != null) { listenerModel.addListener(className); LOGGER.info("Adding listener " + className + " to configuration."); } }
run
17,477
Condition<PsiMethod> (PsiClass testClass) { return TestNGUtil::hasTest; }
getFilter
17,478
String () { return TestNGConfigurationEditor.this.getClassName(); }
getClassName
17,479
ConfigurationModuleSelector () { return moduleSelector; }
getModuleSelector
17,480
String () { return list.getSelectedValue(); }
getSelected
17,481
String (PsiClass[] classes, JComponent component) { GroupList groupList = new GroupList(classes); DialogBuilder builder = new DialogBuilder(component); builder.setCenterPanel(groupList); builder.setPreferredFocusComponent(groupList.list); builder.setTitle(TestngBundle.message("testng.choose.test.group")); return builde...
showDialog
17,482
String () { ClassFilter.ClassFilterWithScope filter; try { filter = getFilter(); } catch (MessageInfoException e) { MessagesEx.MessageInfo message = e.getMessageInfo(); message.showNow(); return null; } TreeClassChooser chooser = TreeClassChooserFactory.getInstance(getProject()).createWithInnerClassesScopeChooser( Test...
showDialog
17,483
void (PsiClass psiClass) { }
onClassChoosen
17,484
PsiClass (String className) { return editor.getModuleSelector().findClass(className); }
findClass
17,485
GlobalSearchScope (Module[] modules) { if (modules == null || modules.length == 0) return null; GlobalSearchScope[] scopes = ContainerUtil.map2Array(modules, GlobalSearchScope.class, module -> GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module)); return GlobalSearchScope.union(scopes); }
getSearchScope
17,486
void (TreeClassChooser chooser) { String s = getText(); PsiClass psiclass = findClass(s); if (psiclass == null) return; PsiDirectory psidirectory = psiclass.getContainingFile().getContainingDirectory(); if (psidirectory != null) chooser.selectDirectory(psidirectory); chooser.select(psiclass); }
init
17,487
String () { TestClassFilter filter; Module module = editor.getModuleSelector().getModule(); if (module == null) { filter = new TestClassFilter(GlobalSearchScope.projectScope(getProject()), getProject(), false); } else { filter = new TestClassFilter(GlobalSearchScope.moduleScope(module), getProject(), false); } PsiClass...
showDialog
17,488
String () { PackageChooserDialog chooser = new PackageChooserDialog(TestngBundle.message("package.browser.dialog.title.choose.package"), getProject()); chooser.show(); PsiPackage psiPackage = chooser.getSelectedPackage(); String packageName = psiPackage == null ? null : psiPackage.getQualifiedName(); return packageName...
showDialog
17,489
String () { FileChooserDescriptor descriptor = new FileChooserDescriptor(true, false, false, false, false, false) { @Override public boolean isFileVisible(VirtualFile virtualFile, boolean showHidden) { if(!showHidden && virtualFile.getName().charAt(0) == '.') return false; return virtualFile.isDirectory() || "xml".equa...
showDialog
17,490
boolean (VirtualFile virtualFile, boolean showHidden) { if(!showHidden && virtualFile.getName().charAt(0) == '.') return false; return virtualFile.isDirectory() || "xml".equals(virtualFile.getExtension()) || "yaml".equals(virtualFile.getExtension()); }
isFileVisible
17,491
TestSearchScope () { return TestSearchScope.MODULE_WITH_DEPENDENCIES; }
getScope
17,492
boolean () { return getConfiguration().getConfigurationModule().getModule() == null; }
forkPerModule
17,493
void () { super.onFound(); writeClassesPerModule(myClasses); }
onFound
17,494
ConfigurationFactory () { return TestNGConfigurationType.getInstance().getConfigurationFactories()[0]; }
getConfigurationFactory
17,495
void (JavaTestConfigurationBase configuration, PsiLocation<PsiMethod> position) { ((TestNGConfiguration)configuration).beFromSourcePosition(position); }
setPosition
17,496
boolean (@NotNull Location<PsiMethod> method) { //TODO return TestNGUtil.hasTest(method.getPsiElement()); }
isApplicable
17,497
RunProfileState (Location<PsiMethod> @NotNull [] testMethods, Module module, RunConfiguration configuration, ExecutionEnvironment environment) { TestData data = ((TestNGConfiguration)configuration).getPersistantData(); data.setPatterns(collectMethodPatterns(testMethods)); data.TEST_OBJECT = TestType.PATTERN.type; retur...
createProfile
17,498
boolean (@NotNull VirtualFile file) { return myFileIndex.isInContent(file) && TestNGUtil.isTestngSuiteFile(file); }
contains
17,499
boolean (@NotNull Module aModule) { return true; }
isSearchInModuleContent