use of com.intellij.lang.javascript.flex.projectStructure.ui.SelectFlexSdkDialog in project intellij-plugins by JetBrains.
the class FlashBuilderSdkFinder method findSdk.
@Nullable
public Sdk findSdk(final FlashBuilderProject fbProject) {
if (!myInitialized) {
initialize();
myInitialized = true;
}
if (fbProject.isAirSdk() && myAirSdkHome != null) {
return FlexSdkUtils.createOrGetSdk(FlexSdkType2.getInstance(), myAirSdkHome);
}
final String sdkHome = mySdkNameToRootPath.get(fbProject.getSdkName());
if (sdkHome != null)
return FlexSdkUtils.createOrGetSdk(FlexSdkType2.getInstance(), sdkHome);
if (myDialogWasShown)
return mySdk;
final SelectFlexSdkDialog dialog = new SelectFlexSdkDialog(myProject, FlexBundle.message("flash.builder.project.import.title"), FlexBundle.message("sdk.for.imported.projects", myAllProjects.size()));
if (!ApplicationManager.getApplication().isUnitTestMode()) {
dialog.show();
} else {
dialog.close(DialogWrapper.CANCEL_EXIT_CODE);
}
myDialogWasShown = true;
mySdk = dialog.isOK() ? dialog.getSdk() : null;
return mySdk;
}
Aggregations