use of com.jetbrains.lang.dart.ide.runner.test.DartTestRunnerParameters in project intellij-plugins by JetBrains.
the class DartTestConfigurationEditorForm method resetEditorFrom.
@Override
protected void resetEditorFrom(@NotNull final DartTestRunConfiguration configuration) {
final DartTestRunnerParameters parameters = configuration.getRunnerParameters();
myScopeCombo.setSelectedItem(parameters.getScope());
String testPath = FileUtil.toSystemDependentName(StringUtil.notNullize(parameters.getFilePath()));
if (parameters.getScope() == FOLDER) {
myDirField.setText(testPath);
myTargetNameField.setText(parameters.getTargetName());
} else {
myFileField.setText(testPath);
}
myTestNameField.setText(parameters.getScope() == GROUP_OR_TEST_BY_NAME ? StringUtil.notNullize(parameters.getTestName()) : "");
myTestRunnerOptionsField.setText(parameters.getTestRunnerOptions());
myEnvironmentVariables.setEnvs(parameters.getEnvs());
myEnvironmentVariables.setPassParentEnvs(parameters.isIncludeParentEnvs());
onScopeChanged();
}
use of com.jetbrains.lang.dart.ide.runner.test.DartTestRunnerParameters 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