Fix ADT to use the new sdklib API
ManifestConstants got renamed AndroidManifest but I forgot to update ADT. Change-Id: I60d40c63a67968c31789e91f14020c61114907ca
This commit is contained in:
@@ -27,7 +27,7 @@ import com.android.ide.eclipse.adt.internal.sdk.Sdk;
|
|||||||
import com.android.sdklib.AndroidVersion;
|
import com.android.sdklib.AndroidVersion;
|
||||||
import com.android.sdklib.IAndroidTarget;
|
import com.android.sdklib.IAndroidTarget;
|
||||||
import com.android.sdklib.SdkConstants;
|
import com.android.sdklib.SdkConstants;
|
||||||
import com.android.sdklib.xml.ManifestConstants;
|
import com.android.sdklib.xml.AndroidManifest;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
@@ -336,7 +336,7 @@ public class PreCompilerBuilder extends BaseBuilder {
|
|||||||
// integer minSdk when the target is a preview => fatal error
|
// integer minSdk when the target is a preview => fatal error
|
||||||
String msg = String.format(
|
String msg = String.format(
|
||||||
"Platform %1$s is a preview and requires appication manifest to set %2$s to '%1$s'",
|
"Platform %1$s is a preview and requires appication manifest to set %2$s to '%1$s'",
|
||||||
codename, ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION);
|
codename, AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION);
|
||||||
AdtPlugin.printErrorToConsole(project, msg);
|
AdtPlugin.printErrorToConsole(project, msg);
|
||||||
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
||||||
IMarker.SEVERITY_ERROR);
|
IMarker.SEVERITY_ERROR);
|
||||||
@@ -345,7 +345,7 @@ public class PreCompilerBuilder extends BaseBuilder {
|
|||||||
// integer minSdk is not high enough for the target => warning
|
// integer minSdk is not high enough for the target => warning
|
||||||
String msg = String.format(
|
String msg = String.format(
|
||||||
"Attribute %1$s (%2$d) is lower than the project target API level (%3$d)",
|
"Attribute %1$s (%2$d) is lower than the project target API level (%3$d)",
|
||||||
ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION,
|
AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION,
|
||||||
minSdkValue, projectVersion.getApiLevel());
|
minSdkValue, projectVersion.getApiLevel());
|
||||||
AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, project, msg);
|
AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, project, msg);
|
||||||
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
||||||
@@ -354,7 +354,7 @@ public class PreCompilerBuilder extends BaseBuilder {
|
|||||||
// integer minSdk is too high for the target => warning
|
// integer minSdk is too high for the target => warning
|
||||||
String msg = String.format(
|
String msg = String.format(
|
||||||
"Attribute %1$s (%2$d) is higher than the project target API level (%3$d)",
|
"Attribute %1$s (%2$d) is higher than the project target API level (%3$d)",
|
||||||
ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION,
|
AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION,
|
||||||
minSdkValue, projectVersion.getApiLevel());
|
minSdkValue, projectVersion.getApiLevel());
|
||||||
AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, project, msg);
|
AdtPlugin.printBuildToConsole(AdtConstants.BUILD_VERBOSE, project, msg);
|
||||||
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
||||||
@@ -368,7 +368,7 @@ public class PreCompilerBuilder extends BaseBuilder {
|
|||||||
// platform is not a preview => fatal error
|
// platform is not a preview => fatal error
|
||||||
String msg = String.format(
|
String msg = String.format(
|
||||||
"Manifest attribute '%1$s' is set to '%2$s'. Integer is expected.",
|
"Manifest attribute '%1$s' is set to '%2$s'. Integer is expected.",
|
||||||
ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION, minSdkVersion);
|
AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION, minSdkVersion);
|
||||||
AdtPlugin.printErrorToConsole(project, msg);
|
AdtPlugin.printErrorToConsole(project, msg);
|
||||||
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
||||||
IMarker.SEVERITY_ERROR);
|
IMarker.SEVERITY_ERROR);
|
||||||
@@ -377,7 +377,7 @@ public class PreCompilerBuilder extends BaseBuilder {
|
|||||||
// platform and manifest codenames don't match => fatal error.
|
// platform and manifest codenames don't match => fatal error.
|
||||||
String msg = String.format(
|
String msg = String.format(
|
||||||
"Value of manifest attribute '%1$s' does not match platform codename '%2$s'",
|
"Value of manifest attribute '%1$s' does not match platform codename '%2$s'",
|
||||||
ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION, codename);
|
AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION, codename);
|
||||||
AdtPlugin.printErrorToConsole(project, msg);
|
AdtPlugin.printErrorToConsole(project, msg);
|
||||||
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
||||||
IMarker.SEVERITY_ERROR);
|
IMarker.SEVERITY_ERROR);
|
||||||
@@ -390,7 +390,7 @@ public class PreCompilerBuilder extends BaseBuilder {
|
|||||||
String codename = projectTarget.getVersion().getCodename();
|
String codename = projectTarget.getVersion().getCodename();
|
||||||
String msg = String.format(
|
String msg = String.format(
|
||||||
"Platform %1$s is a preview and requires appication manifests to set %2$s to '%1$s'",
|
"Platform %1$s is a preview and requires appication manifests to set %2$s to '%1$s'",
|
||||||
codename, ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION);
|
codename, AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION);
|
||||||
AdtPlugin.printErrorToConsole(project, msg);
|
AdtPlugin.printErrorToConsole(project, msg);
|
||||||
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
|
||||||
IMarker.SEVERITY_ERROR);
|
IMarker.SEVERITY_ERROR);
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.Android
|
|||||||
import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper;
|
import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper;
|
||||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiTextAttributeNode;
|
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiTextAttributeNode;
|
||||||
import com.android.ide.eclipse.adt.internal.project.AndroidManifestParser;
|
|
||||||
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
|
||||||
|
import com.android.sdklib.xml.AndroidManifest;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
@@ -305,7 +305,7 @@ public class UiClassAttributeNode extends UiTextAttributeNode {
|
|||||||
String javaPackage = getManifestPackage();
|
String javaPackage = getManifestPackage();
|
||||||
|
|
||||||
// build the fully qualified name of the class
|
// build the fully qualified name of the class
|
||||||
String className = AndroidManifestParser.combinePackageAndClassName(
|
String className = AndroidManifest.combinePackageAndClassName(
|
||||||
javaPackage, textValue);
|
javaPackage, textValue);
|
||||||
|
|
||||||
// only test the vilibility for activities.
|
// only test the vilibility for activities.
|
||||||
|
|||||||
Reference in New Issue
Block a user