am 9f6a426: Merge change 1237 into donut
Merge commit '9f6a4264531682d2911ace24aa5f7ef751bb2b6b' * commit '9f6a4264531682d2911ace24aa5f7ef751bb2b6b': ADT #1715616: "New Android Test Project" wizard.
This commit is contained in:
committed by
The Android Open Source Project
commit
26245919e5
@@ -15,6 +15,11 @@
|
||||
*/
|
||||
package com.android.ide.eclipse.adt.wizards.newproject;
|
||||
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
@@ -26,46 +31,60 @@ public class StubSampleProjectCreationPage extends NewProjectCreationPage {
|
||||
private String mSampleProjectName;
|
||||
private String mOsSdkLocation;
|
||||
|
||||
public StubSampleProjectCreationPage(String pageName,
|
||||
String sampleProjectName, String osSdkLocation) {
|
||||
super(pageName);
|
||||
public StubSampleProjectCreationPage(String sampleProjectName, String osSdkLocation) {
|
||||
super();
|
||||
this.mSampleProjectName = sampleProjectName;
|
||||
this.mOsSdkLocation = osSdkLocation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProjectName() {
|
||||
return mSampleProjectName;
|
||||
}
|
||||
public IMainInfo getMainInfo() {
|
||||
return new IMainInfo() {
|
||||
public String getProjectName() {
|
||||
return mSampleProjectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackageName() {
|
||||
return "com.android.samples";
|
||||
}
|
||||
public String getPackageName() {
|
||||
return "com.android.samples";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActivityName() {
|
||||
return mSampleProjectName;
|
||||
}
|
||||
public String getActivityName() {
|
||||
return mSampleProjectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getApplicationName() {
|
||||
return mSampleProjectName;
|
||||
}
|
||||
public String getApplicationName() {
|
||||
return mSampleProjectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNewProject() {
|
||||
return false;
|
||||
}
|
||||
public boolean isNewProject() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProjectLocation() {
|
||||
return mOsSdkLocation + File.separator + "samples" + File.separator + mSampleProjectName;
|
||||
}
|
||||
public String getSourceFolder() {
|
||||
return "src";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSourceFolder() {
|
||||
return "src";
|
||||
}
|
||||
public IPath getLocationPath() {
|
||||
return new Path(mOsSdkLocation + File.separator +
|
||||
"samples" + File.separator +
|
||||
mSampleProjectName);
|
||||
}
|
||||
|
||||
public String getMinSdkVersion() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public IAndroidTarget getSdkTarget() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isCreateActivity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean useDefaultLocation() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,7 @@ public class StubSampleProjectWizard extends NewProjectWizard {
|
||||
*/
|
||||
@Override
|
||||
protected NewProjectCreationPage createMainPage() {
|
||||
return new StubSampleProjectCreationPage(MAIN_PAGE_NAME,
|
||||
mSampleProjectName, mOsSdkLocation);
|
||||
return new StubSampleProjectCreationPage(mSampleProjectName, mOsSdkLocation);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,8 +67,6 @@ public class EclipseTestCollector {
|
||||
|
||||
/**
|
||||
* Returns true if given class should be added to suite
|
||||
* @param testClass
|
||||
* @return
|
||||
*/
|
||||
protected boolean isTestClass(Class<?> testClass) {
|
||||
return TestCase.class.isAssignableFrom(testClass) &&
|
||||
@@ -78,8 +76,6 @@ public class EclipseTestCollector {
|
||||
|
||||
/**
|
||||
* Returns true if given class has a public constructor
|
||||
* @param testClass
|
||||
* @return
|
||||
*/
|
||||
protected boolean hasPublicConstructor(Class<?> testClass) {
|
||||
try {
|
||||
@@ -94,7 +90,6 @@ public class EclipseTestCollector {
|
||||
* Load the class given by the plugin aka bundle file path
|
||||
* @param filePath - path of class in bundle
|
||||
* @param expectedPackage - expected package of class
|
||||
* @return
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
protected Class<?> getClass(String filePath, String expectedPackage) throws ClassNotFoundException {
|
||||
|
||||
Reference in New Issue
Block a user