Skip to content

Commit ff599f5

Browse files
authored
[CQ] API: migrate TestForm from removed addBrowseFolderListener API (#8071)
Another unsafe `addBrowseFolderListener` migration, as in #8070. See: #7718 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
1 parent befca2c commit ff599f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flutter-idea/src/io/flutter/run/test/TestForm.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.intellij.openapi.options.ConfigurationException;
1010
import com.intellij.openapi.options.SettingsEditor;
1111
import com.intellij.openapi.project.Project;
12+
import com.intellij.openapi.ui.TextComponentAccessor;
1213
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
1314
import com.intellij.ui.ListCellRendererWrapper;
1415
import io.flutter.run.test.TestFields.Scope;
@@ -64,8 +65,8 @@ public void customize(final JList list,
6465
});
6566

6667
initDartFileTextWithBrowse(project, testFile);
67-
testDir.addBrowseFolderListener("Test Directory", null, project,
68-
FileChooserDescriptorFactory.createSingleFolderDescriptor());
68+
testDir.addBrowseFolderListener(project, FileChooserDescriptorFactory.createSingleFolderDescriptor()
69+
.withTitle("Test Directory"));
6970
}
7071

7172
@NotNull

0 commit comments

Comments
 (0)