@Nullable
 public static Sdk getNewProjectJdk(WizardContext context) {
   if (context.getProjectJdk() != null) {
     return context.getProjectJdk();
   }
   final Project project =
       context.getProject() == null
           ? ProjectManager.getInstance().getDefaultProject()
           : context.getProject();
   final Sdk projectJdk = ProjectRootManager.getInstance(project).getProjectSdk();
   if (projectJdk != null) {
     return projectJdk;
   }
   if (context.getProject() == null) {
     @Nullable final ProjectBuilder projectBuilder = context.getProjectBuilder();
     return ProjectJdkTable.getInstance()
         .findMostRecentSdk(
             new Condition<Sdk>() {
               public boolean value(Sdk sdk) {
                 return projectBuilder == null || projectBuilder.isSuitableSdk(sdk);
               }
             });
   }
   return null;
 }
示例#2
0
 private boolean isFrameworksMode() {
   return FRAMEWORKS_CARD.equals(myCurrentCard)
       && getSelectedBuilder().equals(myContext.getProjectBuilder());
 }
 public ProjectBuilder getProjectBuilder() {
   return myWizardContext.getProjectBuilder();
 }