@Nullable
@Override
public ValidationInfo validate() {
if (getSdkData() == null) {
return new ValidationInfo(GoBundle.message("error.invalid.sdk.path", mySdkPath.getText()));
}
String gaeSdkPath = mySdkPath.getText();
GoAppEngineSdkType goSdk = new GoAppEngineSdkType();
if (!goSdk.isValidSdkHome(gaeSdkPath)) {
return new ValidationInfo(GoBundle.message("error.invalid.sdk.path", mySdkPath.getText()));
}
GoAppEngineSdkData goSdkData = GoSdkUtil.testGoAppEngineSdk(gaeSdkPath);
if (goSdkData == null) {
return new ValidationInfo(GoBundle.message("error.invalid.sdk.path", mySdkPath.getText()));
}
GoGlobalSettings.getInstance().setPaths(GoGlobalSettings.getInstance().getGoRoot(), gaeSdkPath, gopathPath.getText());
labelSdkVersion.setText(goSdkData.VERSION_MAJOR);