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
diff --git a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectWizard.java b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectWizard.java
index 71e64dc..d8989c2 100644
--- a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectWizard.java
+++ b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectWizard.java
@@ -352,9 +352,6 @@
}
final ProjectInfo testData = collectTestPageInfo();
- if (mTestPage != null && testData == null) {
- return false;
- }
// Create a monitored operation to create the actual project
WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
@@ -439,9 +436,12 @@
if (mTestPage == null) {
return null;
}
-
TestInfo info = mTestPage.getTestInfo();
+ if (!info.getCreateTestProject()) {
+ return null;
+ }
+
IWorkspace workspace = ResourcesPlugin.getWorkspace();
final IProject project = workspace.getRoot().getProject(info.getProjectName());
final IProjectDescription description = workspace.newProjectDescription(project.getName());