Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
54,600
File () { return new File(super.getTestDataPath()); }
getTestDataDirectory
54,601
void () { runAll( () -> super.tearDown(), () -> KotlinTestUtils.disposeVfsRootAccess(vfsDisposable) ); }
tearDown
54,602
Sdk (String sdkHome, String name) { ProjectJdkTable table = ReadAction.compute(() -> ProjectJdkTable.getInstance()); Sdk existing = table.findJdk(name); if (existing != null) { return existing; } return JavaSdk.getInstance().createJdk(name, sdkHome, true); }
getSdk
54,603
Sdk () { String javaHome = System.getProperty("java.home"); assert new File(javaHome).isDirectory(); return getSdk(javaHome, "Full JDK"); }
fullJdk
54,604
Sdk (@NotNull Disposable disposable, @NotNull Function0<Sdk> getJdk) { Sdk jdk = getJdk.invoke(); Sdk[] allJdks = ReadAction.compute(() -> ProjectJdkTable.getInstance()).getAllJdks(); for (Sdk existingJdk : allJdks) { if (existingJdk == jdk) { return existingJdk; } } ApplicationManager.getApplication().runWriteAction((...
addJdk
54,605
Sdk (@NotNull TestJdkKind kind) { return switch (kind) { case MOCK_JDK -> IdeaTestUtil.getMockJdk18(); case FULL_JDK_11 -> { String jre9 = KotlinTestUtils.getCurrentProcessJdkHome().getPath(); yield getSdk(jre9, "Full JDK 9"); } case FULL_JDK_17 -> IdeaTestUtil.getMockJdk(LanguageLevel.JDK_17.toJavaVersion()); case FUL...
jdk
54,606
LanguageLevel (@NotNull TestJdkKind kind) { return switch (kind) { case MOCK_JDK -> LanguageLevel.JDK_1_8; case FULL_JDK_11 -> LanguageLevel.JDK_11; case FULL_JDK_17 -> LanguageLevel.JDK_17; case FULL_JDK -> LanguageLevel.JDK_1_8; default -> throw new UnsupportedOperationException(kind.toString()); }; }
getLanguageLevel
54,607
ProjectDescriptorWithStdlibSources () { return new ProjectDescriptorWithStdlibSources(); }
getInstanceWithStdlibSources
54,608
void (@NotNull Module module, @NotNull ModifiableRootModel model) { super.configureModule(module, model); Library library = model.getModuleLibraryTable().getLibraryByName(KotlinJdkAndLibraryProjectDescriptor.LIBRARY_NAME); assert library != null; Library.ModifiableModel modifiableModel = library.getModifiableModel(); m...
configureModule
54,609
Sdk () { return PluginTestCaseBase.fullJdk(); }
getSdk
54,610
KotlinWithJdkAndRuntimeLightProjectDescriptor (@NotNull String version) { KotlinArtifactsDownloader instance = KotlinArtifactsDownloader.INSTANCE; return new KotlinWithJdkAndRuntimeLightProjectDescriptor( List.of(instance.downloadArtifactForIdeFromSources("kotlin-stdlib", version)), List.of( instance.downloadArtifactFo...
getInstance
54,611
KotlinWithJdkAndRuntimeLightProjectDescriptor () { return JDK_AND_RUNTIME_LIGHT_PROJECT_DESCRIPTOR; }
getInstance
54,612
KotlinWithJdkAndRuntimeLightProjectDescriptor () { return JDK8_AND_RUNTIME_LIGHT_PROJECT_DESCRIPTOR; }
getInstanceWithStdlibJdk8
54,613
KotlinWithJdkAndRuntimeLightProjectDescriptor () { return JDK_AND_RUNTIME_LIGHT_PROJECT_DESCRIPTOR_NO_SOURCES; }
getInstanceNoSources
54,614
KotlinWithJdkAndRuntimeLightProjectDescriptor (LanguageLevel level) { return new KotlinWithJdkAndRuntimeLightProjectDescriptor() { @Override public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model) { super.configureModule(module, model); model.getModuleExtension(LanguageLevelModuleExtensi...
getInstance
54,615
void (@NotNull Module module, @NotNull ModifiableRootModel model) { super.configureModule(module, model); model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(level); }
configureModule
54,616
KotlinWithJdkAndRuntimeLightProjectDescriptor () { return JDK_AND_RUNTIME_LIGHT_PROJECT_DESCRIPTOR_WITH_TESTS; }
getInstanceWithKotlinTest
54,617
KotlinWithJdkAndRuntimeLightProjectDescriptor () { return JDK_AND_RUNTIME_LIGHT_PROJECT_DESCRIPTOR_WITH_SCRIPT_RUNTIME; }
getInstanceWithScriptRuntime
54,618
KotlinWithJdkAndRuntimeLightProjectDescriptor () { return JDK_AND_RUNTIME_LIGHT_PROJECT_DESCRIPTOR_WITH_REFLECT; }
getInstanceWithReflect
54,619
KotlinWithJdkAndRuntimeLightProjectDescriptor () { return FULL_JDK_DESCRIPTOR; }
getInstanceFullJdk
54,620
String () { return ModuleTypeId.JAVA_MODULE; }
getModuleTypeId
54,621
Sdk () { return IdeaTestUtil.getMockJdk18(); }
getSdk
54,622
void (@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { addDefaultLibraries(model); configureModule(module, model); }
configureModule
54,623
void (@NotNull ModifiableRootModel model) { DefaultLightProjectDescriptor.addJetBrainsAnnotations(model); }
addDefaultLibraries
54,624
void (@NotNull Module module, @NotNull ModifiableRootModel model) { }
configureModule
54,625
boolean (@NotNull Object first, @NotNull Object second) { return comparePublicNonFinalFields(first, second, field -> field.getAnnotation(SkipInEquals.class) == null); }
comparePublicNonFinalFieldsWithSkip
54,626
boolean ( @NotNull Object first, @NotNull Object second, @Nullable Predicate<Field> acceptPredicate ) { Set<Field> firstFields = ContainerUtil.newHashSet(first.getClass().getFields()); for (Field field : second.getClass().getFields()) { if (firstFields.contains(field)) { if (isPublic(field) && !isFinal(field) && (accep...
comparePublicNonFinalFields
54,627
boolean (Field field) { return (field.getModifiers() & Modifier.PUBLIC) != 0; }
isPublic
54,628
boolean (Field field) { return (field.getModifiers() & Modifier.FINAL) != 0; }
isFinal
54,629
Object () { KotlinCodeStyleSettings clone = (KotlinCodeStyleSettings)super.clone(); clone.PACKAGES_TO_USE_STAR_IMPORTS = new KotlinPackageEntryTable(); clone.PACKAGES_TO_USE_STAR_IMPORTS.copyFrom(this.PACKAGES_TO_USE_STAR_IMPORTS); clone.PACKAGES_IMPORT_LAYOUT = new KotlinPackageEntryTable(); clone.PACKAGES_IMPORT_LAYO...
clone
54,630
boolean (Object obj) { if (!(obj instanceof KotlinCodeStyleSettings that)) return false; if (!Comparing.equal(PACKAGES_TO_USE_STAR_IMPORTS, that.PACKAGES_TO_USE_STAR_IMPORTS)) return false; if (!Comparing.equal(PACKAGES_IMPORT_LAYOUT, that.PACKAGES_IMPORT_LAYOUT)) return false; if (!ReflectionUtil.comparePublicNonFinal...
equals
54,631
KotlinCodeStyleSettings (Element parentElement) { // Read to temp KotlinCodeStyleSettings tempSettings = new KotlinCodeStyleSettings(CodeStyleSettings.getDefaults(), true); tempSettings.readExternal(parentElement); return tempSettings; }
readExternalToTemp
54,632
NodeAlignmentStrategy () { return NULL_STRATEGY; }
getNullStrategy
54,633
NodeAlignmentStrategy (AlignmentStrategy strategy) { return new AlignmentStrategyWrapper(strategy); }
fromTypes
54,634
Alignment (@NotNull ASTNode node) { ASTNode parent = node.getTreeParent(); if (parent != null) { return internalStrategy.getAlignment(parent.getElementType(), node.getElementType()); } return internalStrategy.getAlignment(node.getElementType()); }
getAlignment
54,635
KotlinCommonCodeStyleSettings () { return new KotlinCommonCodeStyleSettings(true); }
createForTempDeserialize
54,636
void (Element element) { if (isTempForDeserialize) { super.readExternal(element); return; } KotlinCommonCodeStyleSettings tempDeserialize = createForTempDeserialize(); tempDeserialize.readExternal(element); FormatterUtilKt.applyKotlinCodeStyle(tempDeserialize.CODE_STYLE_DEFAULTS, this, true); super.readExternal(element...
readExternal
54,637
void (@NotNull Element element, @NotNull LanguageCodeStyleProvider provider) { CommonCodeStyleSettings defaultSettings = provider.getDefaultCommonSettings(); FormatterUtilKt.applyKotlinCodeStyle(CODE_STYLE_DEFAULTS, defaultSettings, false); writeExternalBase(element, defaultSettings, provider); }
writeExternal
54,638
void ( @NotNull Element element, @NotNull CommonCodeStyleSettings defaultSettings, @NotNull LanguageCodeStyleProvider provider ) { Set<String> supportedFields = provider.getSupportedFields(); if (supportedFields != null) { supportedFields.add("FORCE_REARRANGE_MODE"); supportedFields.add("CODE_STYLE_DEFAULTS"); } else {...
writeExternalBase
54,639
CommonCodeStyleSettings (@NotNull CodeStyleSettings rootSettings) { KotlinCommonCodeStyleSettings commonSettings = new KotlinCommonCodeStyleSettings(); copyPublicFields(this, commonSettings); try { Method setRootSettingsMethod = CommonCodeStyleSettings.class.getDeclaredMethod("setRootSettings", CodeStyleSettings.class)...
clone
54,640
boolean (Object obj) { if (!(obj instanceof KotlinCommonCodeStyleSettings)) { return false; } if (!ReflectionUtil.comparePublicNonFinalFieldsWithSkip(this, obj)) { return false; } CommonCodeStyleSettings other = (CommonCodeStyleSettings) obj; if (!getSoftMargins().equals(other.getSoftMargins())) { return false; } Inden...
equals
54,641
void (@NotNull List<Integer> softMargins, @NotNull Element element) { if (softMargins.size() > 0) { XmlSerializer.serializeInto(this, element); } }
serializeInto
54,642
void (@NotNull KotlinFileStub stub, @NotNull IndexSink sink) { FqName packageFqName = stub.getPackageFqName(); sink.occurrence(KotlinExactPackagesIndex.NAME, packageFqName.asString()); if (stub.isScript()) return; FqName facadeFqName = ((KotlinFileStubImpl) stub).getFacadeFqName(); if (facadeFqName != null) { sink.occu...
indexFile
54,643
void (@NotNull KotlinClassStub stub, @NotNull IndexSink sink) { processNames(sink, stub.getName(), stub.getFqName(), stub.isTopLevel()); if (stub.isInterface()) { sink.occurrence(KotlinClassShortNameIndex.Helper.getIndexKey(), JvmAbi.DEFAULT_IMPLS_CLASS_NAME); } indexSuperNames(stub, sink); indexPrime(stub, sink); }
indexClass
54,644
void (KotlinStubWithFqName<?> stub, IndexSink sink) { String name = stub.getName(); if (name == null) return; KotlinModifierListStub modifierList = getModifierListStub(stub); if (modifierList != null && modifierList.hasModifier(KtTokens.PRIVATE_KEYWORD)) return; if (modifierList != null && modifierList.hasModifier(KtTo...
indexPrime
54,645
void (@NotNull KotlinObjectStub stub, @NotNull IndexSink sink) { String shortName = stub.getName(); processNames(sink, shortName, stub.getFqName(), stub.isTopLevel()); indexSuperNames(stub, sink); indexPrime(stub, sink); if (shortName != null && !stub.isObjectLiteral() && !stub.getSuperNames().isEmpty()) { sink.occurre...
indexObject
54,646
void ( @NotNull IndexSink sink, String shortName, FqName fqName, boolean level) { if (shortName != null) { sink.occurrence(KotlinClassShortNameIndex.Helper.getIndexKey(), shortName); } if (fqName != null) { sink.occurrence(KotlinFullClassNameIndex.Helper.getIndexKey(), fqName.asString()); if (level) { sink.occurrence(K...
processNames
54,647
void (KotlinClassOrObjectStub<? extends KtClassOrObject> stub, IndexSink sink) { for (String superName : stub.getSuperNames()) { sink.occurrence(KotlinSuperClassIndex.Helper.getIndexKey(), superName); } if (!(stub instanceof KotlinClassStub)) { return; } KotlinModifierListStub modifierListStub = getModifierListStub(stu...
indexSuperNames
54,648
KotlinModifierListStub (@NotNull KotlinStubWithFqName<?> stub) { return stub.findChildStubByType(KtStubElementTypes.MODIFIER_LIST); }
getModifierListStub
54,649
void (@NotNull KotlinFunctionStub stub, @NotNull IndexSink sink) { String name = stub.getName(); if (name != null) { sink.occurrence(KotlinFunctionShortNameIndex.Helper.getIndexKey(), name); if (IndexUtilsKt.isDeclaredInObject(stub)) { IndexUtilsKt.indexExtensionInObject(stub, sink); } KtTypeReference typeReference = s...
indexFunction
54,650
void (@NotNull KotlinTypeAliasStub stub, @NotNull IndexSink sink) { String name = stub.getName(); if (name != null) { sink.occurrence(KotlinTypeAliasShortNameIndex.Helper.getIndexKey(), name); indexPrime(stub, sink); } IndexUtilsKt.indexTypeAliasExpansion(stub, sink); FqName fqName = stub.getFqName(); if (fqName != nul...
indexTypeAlias
54,651
void (@NotNull KotlinPropertyStub stub, @NotNull IndexSink sink) { String name = stub.getName(); if (name != null) { sink.occurrence(KotlinPropertyShortNameIndex.Helper.getIndexKey(), name); if (IndexUtilsKt.isDeclaredInObject(stub)) { IndexUtilsKt.indexExtensionInObject(stub, sink); } KtTypeReference typeReference = s...
indexProperty
54,652
void (@NotNull KotlinParameterStub stub, @NotNull IndexSink sink) { String name = stub.getName(); if (name != null && stub.hasValOrVar()) { sink.occurrence(KotlinPropertyShortNameIndex.Helper.getIndexKey(), name); } }
indexParameter
54,653
void (@NotNull KotlinAnnotationEntryStub stub, @NotNull IndexSink sink) { String name = stub.getShortName(); if (name == null) { return; } sink.occurrence(KotlinAnnotationsIndex.Helper.getIndexKey(), name); KotlinFileStub fileStub = KotlinStubUtils.getContainingKotlinFileStub(stub); if (fileStub != null) { List<KotlinI...
indexAnnotation
54,654
void (@NotNull KotlinScriptStub stub, @NotNull IndexSink sink) { sink.occurrence(KotlinScriptFqnIndex.Helper.getIndexKey(), stub.getFqName().asString()); }
indexScript
54,655
KotlinFileStub (@NotNull KtFile file) { String packageFqName =file.getPackageFqNameByTree().asString(); boolean isScript = file.isScriptByTree(); if (file.hasTopLevelCallables()) { JvmFileClassInfo fileClassInfo = JvmFileClassUtil.getFileClassInfoNoResolve(file); String facadeFqNameRef = fileClassInfo.getFacadeClassFqN...
createFileStub
54,656
void (RunNotifier notifier) { initialize(); delegateRunner.run(notifier); }
run
54,657
Description () { initialize(); return isFakeTest ? Description.EMPTY : delegateRunner.getDescription(); }
getDescription
54,658
void (Sorter sorter) { initialize(); delegateRunner.sort(sorter); }
sort
54,659
void () { if (delegateRunner != null) return; delegateRunner = new JUnit38ClassRunner(getCollectedTests()); }
initialize
54,660
Test () { List<Class<?>> innerClasses = collectDeclaredClasses(testClass, false); Set<Class<?>> unprocessedInnerClasses = unprocessedClasses(innerClasses); if (unprocessedInnerClasses.isEmpty()) { if (!innerClasses.isEmpty() && !hasTestMethods(testClass)) { isFakeTest = true; return new JUnit3RunnerWithInners.FakeEmpty...
getCollectedTests
54,661
Test (Class<?> root) { Set<Class<?>> classes = new LinkedHashSet<>(collectDeclaredClasses(root, true)); Map<Class<?>, TestSuite> classSuites = new HashMap<>(); for (Class<?> aClass : classes) { classSuites.put(aClass, hasTestMethods(aClass) ? new TestSuite(aClass) : new TestSuite(aClass.getCanonicalName())); } for (Cla...
createTreeTestSuite
54,662
boolean (Class<?> klass) { for (Class<?> currentClass = klass; Test.class.isAssignableFrom(currentClass); currentClass = currentClass.getSuperclass()) { for (Method each : MethodSorter.getDeclaredMethods(currentClass)) { if (isTestMethod(each)) return true; } } return false; }
hasTestMethods
54,663
int () { return 0; }
countTestCases
54,664
void (TestResult result) { result.startTest(this); result.endTest(this); }
run
54,665
String () { return "Empty class with inners for " + className; }
toString
54,666
boolean (Method method) { return method.getParameterTypes().length == 0 && method.getName().startsWith("test") && method.getReturnType().equals(Void.TYPE) && Modifier.isPublic(method.getModifiers()); }
isTestMethod
54,667
KotlinCompilerSettingsTracker (Project project) { return project.getService(KotlinCompilerSettingsTracker.class); }
getInstance
54,668
Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, KotlinBaseResourcesIcons.class.getClassLoader(), cacheKey, flags); }
load
54,669
Icon (@NotNull DeclarationDescriptor descriptor, @Nullable PsiElement declaration, @Iconable.IconFlags int flags) { if (declaration != null && !(declaration instanceof KtElement)) { return declaration.getIcon(flags); } Icon result = getBaseIcon(descriptor); if ((flags & Iconable.ICON_FLAG_VISIBILITY) > 0) { RowIcon row...
getIcon
54,670
Icon (@NotNull DeclarationDescriptor descriptor) { if (descriptor instanceof DeclarationDescriptorWithVisibility descriptorWithVisibility) { DescriptorVisibility visibility = descriptorWithVisibility.getVisibility().normalize(); if (visibility == DescriptorVisibilities.PUBLIC) { return PlatformIcons.PUBLIC_ICON; } if (...
getVisibilityIcon
54,671
Modality (@NotNull MemberDescriptor descriptor) { try { return descriptor.getModality(); } catch (InvalidModuleException ex) { return Modality.FINAL; } }
getModalitySafe
54,672
Icon (@NotNull DeclarationDescriptor descriptor) { if (descriptor instanceof PackageFragmentDescriptor || descriptor instanceof PackageViewDescriptor) { return AllIcons.Nodes.Package; } if (descriptor instanceof FunctionDescriptor functionDescriptor) { if (functionDescriptor.getExtensionReceiverParameter() != null) { r...
getBaseIcon
54,673
KotlinType (KtNamedDeclaration declaration) { PsiFile file = declaration.getContainingFile(); if (!(file instanceof KtFile)) return null; DeclarationDescriptor descriptor = ResolutionUtils.unsafeResolveToDescriptor(declaration, BodyResolveMode.FULL); if (!(descriptor instanceof CallableDescriptor)) return null; KotlinT...
getDeclarationReturnType
54,674
KtTypeReference (@NotNull KtNamedDeclaration propertyOrFunction) { if (propertyOrFunction instanceof KtCallableDeclaration) { return ((KtCallableDeclaration) propertyOrFunction).getReceiverTypeReference(); } throw new IllegalArgumentException("Not a callable declaration: " + propertyOrFunction.getClass().getName()); }
getReceiverType
54,675
List<KtParameter> (@NotNull KtNamedDeclaration propertyOrFunction) { if (propertyOrFunction instanceof KtCallableDeclaration) { return ((KtCallableDeclaration) propertyOrFunction).getValueParameters(); } throw new IllegalArgumentException("Not a callable declaration: " + propertyOrFunction.getClass().getName()); }
getValueParameters
54,676
String (@NotNull KtTypeReference typeReference) { KtTypeElement typeElement = typeReference.getTypeElement(); assert typeElement != null; return typeElement.accept(new KtVisitor<String, Void>() { @Override public String visitDeclaration(@NotNull KtDeclaration declaration, Void data) { throw new IllegalStateException("T...
getTypeShortName
54,677
String (@NotNull KtDeclaration declaration, Void data) { throw new IllegalStateException("This visitor shouldn't be invoked for " + declaration.getClass()); }
visitDeclaration
54,678
String (@NotNull KtUserType type, Void data) { KtSimpleNameExpression referenceExpression = type.getReferenceExpression(); assert referenceExpression != null; return referenceExpression.getReferencedName(); }
visitUserType
54,679
String (@NotNull KtFunctionType type, Void data) { return StandardNames.getFunctionName(type.getParameters().size() + (type.getReceiverTypeReference() != null ? 1 : 0)); }
visitFunctionType
54,680
String (@NotNull KtNullableType nullableType, Void data) { KtTypeElement innerType = nullableType.getInnerType(); assert innerType != null : "No inner type: " + nullableType; return innerType.accept(this, null); }
visitNullableType
54,681
String (@NotNull KtDynamicType type, Void data) { return "dynamic"; }
visitDynamicType
54,682
boolean (@NotNull KtTypeReference a, @NotNull KtTypeReference b) { return getTypeShortName(a).equals(getTypeShortName(b)); }
typesHaveSameShortName
54,683
boolean (@NotNull KtNamedDeclaration a, @NotNull KtNamedDeclaration b) { boolean sameReceiverPresence = (getReceiverType(a) == null) == (getReceiverType(b) == null); boolean sameParametersCount = getValueParameters(a).size() == getValueParameters(b).size(); return sameReceiverPresence && sameParametersCount; }
sameReceiverPresenceAndParametersCount
54,684
boolean (@NotNull KtNamedDeclaration a, @NotNull KtNamedDeclaration b) { KtTypeReference aReceiver = getReceiverType(a); KtTypeReference bReceiver = getReceiverType(b); if ((aReceiver == null) != (bReceiver == null)) { return false; } if (aReceiver != null && !typesHaveSameShortName(aReceiver, bReceiver)) { return fals...
receiverAndParametersShortTypesMatch
54,685
JpsVersionItem (@NotNull @Nls String text) { return new JpsVersionItem(null, false, text); }
createLabel
54,686
JpsVersionItem (@NotNull @Nls String rawVersion) { IdeKotlinVersion ideKotlinVersion = IdeKotlinVersion.opt(rawVersion); return new JpsVersionItem(ideKotlinVersion, true, ideKotlinVersion != null ? null : rawVersion); }
createFromRawVersion
54,687
String () { if (myVersion == null) return Objects.requireNonNull(myText); if (myVersion.equals(KotlinJpsPluginSettings.getBundledVersion())) { return KotlinBaseCompilerConfigurationUiBundle.message("configuration.text.bundled.0.jps.version", myVersion); } KotlinVersion kotlinVersion = myVersion.getKotlinVersion(); if (...
getDescription
54,688
String () { return myVersion != null ? myVersion.getRawVersion() : Objects.requireNonNull(myText); }
getRawVersion
54,689
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JpsVersionItem item = (JpsVersionItem) o; return Objects.equals(myVersion, item.myVersion) && Objects.equals(myText, item.myText); }
equals
54,690
int () { return Objects.hash(myVersion); }
hashCode
54,691
void (boolean isMultiEditor) { setupFileChooser(labelForOutputPrefixFile, outputPrefixFile, KotlinBaseCompilerConfigurationUiBundle.message("configuration.title.kotlin.compiler.js.option.output.prefix.browse.title"), true); setupFileChooser(labelForOutputPostfixFile, outputPostfixFile, KotlinBaseCompilerConfigurationUi...
initializeNonCidrSettings
54,692
int (List<String> allNames) { int lengthSoFar = 0; int size = allNames.size(); for (int i = 0; i < size; i++) { lengthSoFar = (i > 0 ? lengthSoFar + 2 : 0) + allNames.get(i).length(); if (lengthSoFar > MAX_WARNING_SIZE) return i; } return size; }
calculateNameCountToShowInWarning
54,693
CharSequence (String s) { return "<strong>" + s + "</strong>"; }
invoke
54,694
void ( @NotNull JLabel label, @NotNull TextFieldWithBrowseButton fileChooser, @NotNull @NlsContexts.DialogTitle String title, boolean forFiles ) { label.setLabelFor(fileChooser); fileChooser.addBrowseFolderListener(title, null, null, new FileChooserDescriptor(forFiles, !forFiles, false, false, false, false), TextCompon...
setupFileChooser
54,695
boolean (@NotNull TextFieldWithBrowseButton chooser, @Nullable String currentValue) { return !StringUtil.equals( StringUtil.nullize(chooser.getText(), true), StringUtil.nullize(currentValue, true)); }
isBrowseFieldModifiedWithNullize
54,696
boolean (@NotNull TextFieldWithBrowseButton chooser, @NotNull String currentValue) { return !StringUtil.equals(chooser.getText(), currentValue); }
isBrowseFieldModified
54,697
void () { if (isEnabled && copyRuntimeFilesCheckBox != null) { outputDirectory.setEnabled(copyRuntimeFilesCheckBox.isSelected()); labelForOutputDirectory.setEnabled(copyRuntimeFilesCheckBox.isSelected()); } }
updateOutputDirEnabled
54,698
boolean (LanguageOrApiVersion version, LanguageOrApiVersion upperBound) { return VersionComparatorUtil.compare(version.getVersionString(), upperBound.getVersionString()) <= 0; }
isLessOrEqual
54,699
void (@Nullable VersionView languageLevel) { if (languageLevel == null) return; restrictAPIVersions(languageLevel); }
onLanguageLevelChanged