|
11 | 11 | import com.intellij.openapi.ui.TextComponentAccessor;
|
12 | 12 | import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
13 | 13 | import com.intellij.openapi.util.text.StringUtil;
|
| 14 | +import com.intellij.plugin.powershell.ide.MessagesBundle; |
14 | 15 | import com.intellij.plugin.powershell.lang.lsp.ide.settings.PowerShellExecutableChooserPanel;
|
15 | 16 | import com.intellij.ui.components.fields.ExtendableTextField;
|
16 | 17 | import org.jetbrains.annotations.NotNull;
|
17 |
| -import org.jetbrains.annotations.Nullable; |
18 | 18 |
|
19 | 19 | import javax.swing.*;
|
20 | 20 | import java.io.File;
|
@@ -95,15 +95,16 @@ protected JComponent createEditor() {
|
95 | 95 | return mainPanel;
|
96 | 96 | }
|
97 | 97 |
|
98 |
| - @Nullable |
99 |
| - public String getScriptName() { |
100 |
| - return runConfiguration.getScriptPath(); |
101 |
| - } |
102 |
| - |
103 | 98 | private void createUIComponents() {
|
104 | 99 | workingDirectoryTextField = new ExtendableTextField();
|
105 | 100 | workingDirectoryTextFieldWithBrowseBtn = new TextFieldWithBrowseButton(workingDirectoryTextField);
|
106 |
| - workingDirectoryTextFieldWithBrowseBtn.addBrowseFolderListener("Choose directory", null, runConfiguration.getProject(), BrowseFilesListener.SINGLE_DIRECTORY_DESCRIPTOR, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT); |
| 101 | + workingDirectoryTextFieldWithBrowseBtn.addBrowseFolderListener( |
| 102 | + MessagesBundle.message("run-configuration-editor.choose-directory.title"), |
| 103 | + null, |
| 104 | + runConfiguration.getProject(), |
| 105 | + BrowseFilesListener.SINGLE_DIRECTORY_DESCRIPTOR, |
| 106 | + TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT |
| 107 | + ); |
107 | 108 | JTextField textField = workingDirectoryTextFieldWithBrowseBtn.getChildComponent();
|
108 | 109 | FileChooserFactory.getInstance().installFileCompletion(textField, BrowseFilesListener.SINGLE_DIRECTORY_DESCRIPTOR, true, null);
|
109 | 110 | MacrosDialog.addMacroSupport(workingDirectoryTextField, MacrosDialog.Filters.ALL, () -> false);
|
|
0 commit comments