[project] pruning FileChooserDescriptor overrides (IJPL-150176 prerequisite)

`BrowseFolderRunnable` and `*WithBrowseButton` family: getting rid of separate "title" and "description" parameters in favor of the chooser descriptor object, to avoid cloning the latter down the road.

GitOrigin-RevId: 33ec5968a1db953c60848974135055c288accf85
This commit is contained in:
Roman Shevchenko
2024-09-04 11:16:12 +02:00
committed by intellij-monorepo-bot
parent 5656c23f5c
commit a5666abead
162 changed files with 1161 additions and 1515 deletions

View File

@@ -45,12 +45,10 @@ class EclipseCompilerConfigurableUi(project: Project) {
}
.bottomGap(BottomGap.SMALL)
row {
pathToEcjField = textFieldWithBrowseButton(
JavaCompilerBundle.message("path.to.ecj.compiler.tool"), project,
object : FileChooserDescriptor(true, false, true, true, false, false) {}.withFileFilter { file ->
FileTypeRegistry.getInstance().isFileOfType(file, ArchiveFileType.INSTANCE)
}
)
val descriptor = object : FileChooserDescriptor(true, false, true, true, false, false) {}
.withTitle(JavaCompilerBundle.message("path.to.ecj.compiler.tool"))
.withFileFilter { file -> FileTypeRegistry.getInstance().isFileOfType(file, ArchiveFileType.INSTANCE) }
pathToEcjField = textFieldWithBrowseButton(descriptor, project)
.align(AlignX.FILL)
.label(JavaCompilerBundle.message("eclipse.compiler.path.label"), LabelPosition.TOP)
.comment(JavaCompilerBundle.message("eclipse.compiler.path.comment"))

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.packaging.impl.artifacts;
import com.intellij.openapi.compiler.JavaCompilerBundle;
@@ -61,7 +61,7 @@ public class JarArtifactFromModulesDialog extends DialogWrapper {
myCopyJarsRadioButton.addActionListener(actionListener);
updateManifestDirField();
myManifestDirField.addBrowseFolderListener(null, null, project, ManifestFileUtil.createDescriptorForManifestDirectory());
myManifestDirField.addBrowseFolderListener(project, ManifestFileUtil.createDescriptorForManifestDirectory());
setupModulesCombobox(context);
init();