From ac94b5115f07d079af021cb3f113410e0ffa6541 Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Mon, 26 Mar 2012 08:50:27 -0700 Subject: Use different names for the application and test projects. This patch fixes the bug where the test project & application projects were both using the same name if they were created outside the workspace. Change-Id: I0fa83ef62346ee39c6ec942d9bcd59e5f14cf0e7 --- .../ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'eclipse/plugins') diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java index ab34f92..5b557ac 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java @@ -395,7 +395,10 @@ public class NewProjectCreator { final HashMap dictionary = new HashMap(); dictionary.put(STRING_APP_NAME, mValues.testApplicationName); + // Use the same logic to determine test project location as in + // ApplicationInfoPage#validateTestProjectLocation IPath path = new Path(mValues.projectLocation.getPath()); + path = path.removeLastSegments(1).append(mValues.testProjectName); IPath defaultLocation = Platform.getLocation(); if ((!mValues.useDefaultLocation || mValues.useExisting) && !path.equals(defaultLocation)) { -- cgit v1.1