use of com.jetbrains.lang.dart.ide.runner.test.DartTestRunnerParameters.Scope in project intellij-plugins by JetBrains.
the class DartTestConfigurationEditorForm method onScopeChanged.
private void onScopeChanged() {
final DartTestRunnerParameters.Scope scope = (DartTestRunnerParameters.Scope) myScopeCombo.getSelectedItem();
myTestNameLabel.setVisible(scope == GROUP_OR_TEST_BY_NAME);
myTestNameField.setVisible(scope == GROUP_OR_TEST_BY_NAME);
boolean folderMode = scope == FOLDER;
boolean projectWithoutPubspec = Registry.is("dart.projects.without.pubspec", false);
myFileField.setVisible(!folderMode);
myTestFileLabel.setVisible(!folderMode);
myDirField.setVisible(folderMode);
myDirLabel.setVisible(folderMode);
myTargetNameField.setVisible(folderMode && projectWithoutPubspec);
myTargetNameLabel.setVisible(folderMode && projectWithoutPubspec);
}
use of com.jetbrains.lang.dart.ide.runner.test.DartTestRunnerParameters.Scope in project intellij-plugins by JetBrains.
the class DartTestConfigurationEditorForm method applyEditorTo.
@Override
protected void applyEditorTo(@NotNull final DartTestRunConfiguration configuration) throws ConfigurationException {
final DartTestRunnerParameters parameters = configuration.getRunnerParameters();
final DartTestRunnerParameters.Scope scope = (DartTestRunnerParameters.Scope) myScopeCombo.getSelectedItem();
parameters.setScope(scope);
TextFieldWithBrowseButton pathSource = scope == FOLDER ? myDirField : myFileField;
parameters.setFilePath(StringUtil.nullize(FileUtil.toSystemIndependentName(pathSource.getText().trim())));
parameters.setTestName(scope == GROUP_OR_TEST_BY_NAME ? StringUtil.nullize(myTestNameField.getText().trim()) : null);
parameters.setTargetName(scope == FOLDER ? StringUtil.nullize(myTargetNameField.getText().trim()) : null);
parameters.setTestRunnerOptions(StringUtil.nullize(myTestRunnerOptionsField.getText().trim()));
parameters.setEnvs(myEnvironmentVariables.getEnvs());
parameters.setIncludeParentEnvs(myEnvironmentVariables.isPassParentEnvs());
}
Aggregations