am 71f5d130: Merge change 1739 into donut

Merge commit '71f5d130f5d2c512cc811f538b4d0f6613451973'

* commit '71f5d130f5d2c512cc811f538b4d0f6613451973':
  Fix an NPE in the New Project Wizard when no test project is specified
This commit is contained in:
Android (Google) Code Review
2009-05-14 19:43:59 -07:00
committed by The Android Open Source Project

View File

@@ -352,9 +352,6 @@ public class NewProjectWizard extends Wizard implements INewWizard {
} }
final ProjectInfo testData = collectTestPageInfo(); final ProjectInfo testData = collectTestPageInfo();
if (mTestPage != null && testData == null) {
return false;
}
// Create a monitored operation to create the actual project // Create a monitored operation to create the actual project
WorkspaceModifyOperation op = new WorkspaceModifyOperation() { WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
@@ -439,9 +436,12 @@ public class NewProjectWizard extends Wizard implements INewWizard {
if (mTestPage == null) { if (mTestPage == null) {
return null; return null;
} }
TestInfo info = mTestPage.getTestInfo(); TestInfo info = mTestPage.getTestInfo();
if (!info.getCreateTestProject()) {
return null;
}
IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspace workspace = ResourcesPlugin.getWorkspace();
final IProject project = workspace.getRoot().getProject(info.getProjectName()); final IProject project = workspace.getRoot().getProject(info.getProjectName());
final IProjectDescription description = workspace.newProjectDescription(project.getName()); final IProjectDescription description = workspace.newProjectDescription(project.getName());