use of com.intellij.execution.configurations.RuntimeConfigurationError in project flutter-intellij by flutter.
the class SdkAttachConfig method checkRunnable.
private void checkRunnable(@NotNull Project project) throws RuntimeConfigurationError {
final DartSdk sdk = DartPlugin.getDartSdk(project);
if (sdk == null) {
throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"), () -> DartConfigurable.openDartSettings(project));
}
final MainFile.Result main = MainFile.verify(getFields().getFilePath(), project);
if (!main.canLaunch()) {
throw new RuntimeConfigurationError(main.getError());
}
if (PubRoot.forDirectory(main.get().getAppDir()) == null) {
throw new RuntimeConfigurationError("Entrypoint isn't within a Flutter pub root");
}
}
use of com.intellij.execution.configurations.RuntimeConfigurationError in project flutter-intellij by flutter.
the class BazelTestFields method checkRunnable.
/**
* Reports an error in the run config that the user should correct.
* <p>
* This will be called while the user is typing into a non-template run config.
* (See RunConfiguration.checkConfiguration.)
*
* @throws RuntimeConfigurationError for an error that that the user must correct before running.
*/
void checkRunnable(@NotNull final Project project) throws RuntimeConfigurationError {
// The UI only shows one error message at a time.
// The order we do the checks here determines priority.
final DartSdk sdk = DartPlugin.getDartSdk(project);
if (sdk == null) {
throw new RuntimeConfigurationError(FlutterBundle.message("dart.sdk.is.not.configured"), () -> DartConfigurable.openDartSettings(project));
}
getScope(project).checkRunnable(this, project);
}
Aggregations