OSDN Git Service

Rename AndroidConstants -> AdtConstants.
authorXavier Ducrohet <xav@android.com>
Fri, 25 Feb 2011 04:13:52 +0000 (20:13 -0800)
committerXavier Ducrohet <xav@android.com>
Fri, 25 Feb 2011 04:13:52 +0000 (20:13 -0800)
These are constants specific to ADT.

There'll be an AndroidConstants class in common.jar with
more generic android constant values.

Change-Id: I8368920f92c28cbfb87098087bf01f2d2cdee095

65 files changed:
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtConstants.java [moved from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AndroidConstants.java with 99% similarity]
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/actions/ConvertToAndroidAction.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/AaptParser.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/AidlProcessor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/BaseBuilder.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerBuilder.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PostCompilerDeltaVisitor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PreCompilerBuilder.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/PreCompilerDeltaVisitor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/builders/ResourceManagerBuilder.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/DescriptorsUtils.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/export/ExportEditor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutReloadMonitor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ProjectCallback.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/WidgetPullParser.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeFinder.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PlayAnimationMenu.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeLayoutRefactoring.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoring.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/VisualRefactoringAction.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/WrapInRefactoring.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestEditor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/model/UiClassAttributeNode.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/menu/MenuEditor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/resources/ResourcesEditor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/XmlEditor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/JUnitLaunchConfigDelegate.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/LaunchConfigDelegate.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigDelegate.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/InstrumentationRunnerValidator.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/AndroidClasspathContainerInitializer.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/AndroidNature.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/BaseProjectHelper.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ExportHelper.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/FolderDecorator.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectHelper.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/XmlErrorHandler.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactoring/core/AndroidPackageRenameParticipant.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactoring/core/AndroidTypeMoveParticipant.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactoring/core/AndroidTypeRenameParticipant.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringAction.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringInputPage.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/renamepackage/ApplicationPackageNameRefactoring.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/ResourceNameValidator.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/CompiledResourcesMonitor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectClassLoader.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ResourceManager.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/AndroidJarLoader.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/ResourceChooser.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/ResourceExplorerView.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreationPage.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectWizard.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/NewXmlFileCreationPage.java
eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/tests/AdtTestData.java

@@ -43,7 +43,7 @@ import java.util.regex.Pattern;
  * </ul>
  *
  */
-public class AndroidConstants {
+public class AdtConstants {
     /**
      * The old Editors Plugin ID. It is still used in some places for compatibility.
      * Please do not use for new features.
index fd8218c..28244b9 100644 (file)
@@ -354,7 +354,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
     /** Returns the absolute traceview path */
     public static String getOsAbsoluteTraceview() {
         return getOsSdkFolder() + SdkConstants.OS_SDK_TOOLS_FOLDER +
-                AndroidConstants.FN_TRACEVIEW;
+                AdtConstants.FN_TRACEVIEW;
     }
 
     /** Returns the absolute emulator path */
@@ -364,7 +364,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
 
     public static String getOsAbsoluteHprofConv() {
         return getOsSdkFolder() + SdkConstants.OS_SDK_TOOLS_FOLDER +
-                AndroidConstants.FN_HPROF_CONV;
+                AdtConstants.FN_HPROF_CONV;
     }
 
     /** Returns the absolute proguard path */
@@ -377,7 +377,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
      */
     public static String getUrlDoc() {
         return ProjectHelper.getJavaDocPath(
-                getOsSdkFolder() + AndroidConstants.WS_JAVADOC_FOLDER_LEAF);
+                getOsSdkFolder() + AdtConstants.WS_JAVADOC_FOLDER_LEAF);
     }
 
     /**
@@ -778,7 +778,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
     public static InputStream readEmbeddedFileAsStream(String filepath) {
         // attempt to read an embedded file
         try {
-            URL url = getEmbeddedFileUrl(AndroidConstants.WS_SEP + filepath);
+            URL url = getEmbeddedFileUrl(AdtConstants.WS_SEP + filepath);
             if (url != null) {
                 return url.openStream();
             }
@@ -811,8 +811,8 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
 
         // attempt to get a file to one of the template.
         String path = filepath;
-        if (!path.startsWith(AndroidConstants.WS_SEP)) {
-            path = AndroidConstants.WS_SEP + path;
+        if (!path.startsWith(AdtConstants.WS_SEP)) {
+            path = AdtConstants.WS_SEP + path;
         }
 
         URL url = bundle.getEntry(path);
@@ -1416,7 +1416,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
              * @see IFileListener#fileChanged
              */
             public void fileChanged(IFile file, IMarkerDelta[] markerDeltas, int kind) {
-                if (AndroidConstants.EXT_XML.equals(file.getFileExtension())) {
+                if (AdtConstants.EXT_XML.equals(file.getFileExtension())) {
                     // The resources files must have a file path similar to
                     //    project/res/.../*.xml
                     // There is no support for sub folders, so the segment count must be 4
@@ -1454,7 +1454,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
                                 // as the default editor.
                                 IEditorDescriptor desc = IDE.getDefaultEditor(file);
                                 String editorId = desc.getId();
-                                if (editorId.startsWith(AndroidConstants.EDITORS_NAMESPACE)) {
+                                if (editorId.startsWith(AdtConstants.EDITORS_NAMESPACE)) {
                                     // reset the default editor.
                                     IDE.setDefaultEditor(file, null);
                                 }
index 92604fb..cf46192 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.actions;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
 
 import org.eclipse.core.resources.IProject;
@@ -107,7 +107,7 @@ public class ConvertToAndroidAction implements IObjectActionDelegate {
 
                     // check if the project already has the android nature.
                     for (int i = 0; i < natures.length; ++i) {
-                        if (AndroidConstants.NATURE_DEFAULT.equals(natures[i])) {
+                        if (AdtConstants.NATURE_DEFAULT.equals(natures[i])) {
                             // we shouldn't be here as the visibility of the item
                             // is dependent on the project.
                             return new Status(Status.WARNING, AdtPlugin.PLUGIN_ID,
@@ -121,7 +121,7 @@ public class ConvertToAndroidAction implements IObjectActionDelegate {
 
                     String[] newNatures = new String[natures.length + 1];
                     System.arraycopy(natures, 0, newNatures, 1, natures.length);
-                    newNatures[0] = AndroidConstants.NATURE_DEFAULT;
+                    newNatures[0] = AdtConstants.NATURE_DEFAULT;
 
                     // set the new nature list in the project
                     description.setNatureIds(newNatures);
index 504cf0b..acf150a 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.build;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
 
 import org.eclipse.core.resources.IMarker;
@@ -180,7 +180,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(location, lineStr, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
                 continue;
@@ -204,7 +204,7 @@ public final class AaptParser {
 
                 // display the error
                 if (checkAndMark(location, null, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
 
@@ -228,7 +228,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(location, lineStr, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
                 continue;
@@ -242,7 +242,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(location, lineStr, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
 
@@ -266,7 +266,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(location, lineStr, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
 
@@ -282,7 +282,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(location, lineStr, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_WARNING) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_WARNING) == false) {
                     return true;
                 }
 
@@ -298,7 +298,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(location, lineStr, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
 
@@ -313,7 +313,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(location, null, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_COMPILE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
 
@@ -331,7 +331,7 @@ public final class AaptParser {
 
                 // check the values and attempt to mark the file.
                 if (checkAndMark(null /*location*/, null, msg, osRoot, project,
-                        AndroidConstants.MARKER_AAPT_PACKAGE, IMarker.SEVERITY_ERROR) == false) {
+                        AdtConstants.MARKER_AAPT_PACKAGE, IMarker.SEVERITY_ERROR) == false) {
                     return true;
                 }
 
index 9d6a819..e05f8b7 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.build;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.BuildVerbosity;
@@ -81,7 +81,7 @@ public class AidlProcessor extends SourceProcessor {
 
     @Override
     protected String getExtension() {
-        return AndroidConstants.EXT_AIDL;
+        return AdtConstants.EXT_AIDL;
     }
 
     @Override
@@ -111,7 +111,7 @@ public class AidlProcessor extends SourceProcessor {
         boolean verbose = AdtPrefs.getPrefs().getBuildVerbosity() == BuildVerbosity.VERBOSE;
 
         // remove the generic marker from the project
-        builder.removeMarkersFromResource(project, AndroidConstants.MARKER_AIDL);
+        builder.removeMarkersFromResource(project, AdtConstants.MARKER_AIDL);
 
         // loop until we've compile them all
         for (IFile sourceFile : sources) {
@@ -127,7 +127,7 @@ public class AidlProcessor extends SourceProcessor {
             }
 
             // Remove the AIDL error markers from the aidl file
-            builder.removeMarkersFromResource(sourceFile, AndroidConstants.MARKER_AIDL);
+            builder.removeMarkersFromResource(sourceFile, AdtConstants.MARKER_AIDL);
 
             // get the path of the source file.
             IPath sourcePath = sourceFile.getLocation();
@@ -222,7 +222,7 @@ public class AidlProcessor extends SourceProcessor {
                         AdtPlugin.printErrorToConsole(project, results.toArray());
 
                         // mark the project
-                        BaseProjectHelper.markResource(project, AndroidConstants.MARKER_AIDL,
+                        BaseProjectHelper.markResource(project, AdtConstants.MARKER_AIDL,
                                 Messages.Unparsed_AIDL_Errors, IMarker.SEVERITY_ERROR);
                     } else {
                         AdtPlugin.printToConsole(project, results.toArray());
@@ -233,13 +233,13 @@ public class AidlProcessor extends SourceProcessor {
         } catch (IOException e) {
             // mark the project and exit
             String msg = String.format(Messages.AIDL_Exec_Error, command[0]);
-            BaseProjectHelper.markResource(project, AndroidConstants.MARKER_AIDL, msg,
+            BaseProjectHelper.markResource(project, AdtConstants.MARKER_AIDL, msg,
                     IMarker.SEVERITY_ERROR);
             return false;
         } catch (InterruptedException e) {
             // mark the project and exit
             String msg = String.format(Messages.AIDL_Exec_Error, command[0]);
-            BaseProjectHelper.markResource(project, AndroidConstants.MARKER_AIDL, msg,
+            BaseProjectHelper.markResource(project, AdtConstants.MARKER_AIDL, msg,
                     IMarker.SEVERITY_ERROR);
             return false;
         }
@@ -282,7 +282,7 @@ public class AidlProcessor extends SourceProcessor {
                 }
 
                 // mark the file
-                BaseProjectHelper.markResource(file, AndroidConstants.MARKER_AIDL, msg, line,
+                BaseProjectHelper.markResource(file, AdtConstants.MARKER_AIDL, msg, line,
                         IMarker.SEVERITY_ERROR);
 
                 // success, go to the next line
@@ -329,7 +329,7 @@ public class AidlProcessor extends SourceProcessor {
 
             // Build the Java file name from the aidl name.
             String javaName = sourceFile.getName().replaceAll(
-                    AndroidConstants.RE_AIDL_EXT, AndroidConstants.DOT_JAVA);
+                    AdtConstants.RE_AIDL_EXT, AdtConstants.DOT_JAVA);
 
             // get the resource for the java file.
             IFile javaFile = destinationFolder.getFile(javaName);
index 545d0f9..1d6bad3 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.build;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.AndroidPrintStream;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.BuildVerbosity;
@@ -145,10 +145,10 @@ public class BuildHelper {
         // need to figure out some path before we can execute aapt;
 
         // get the resource folder
-        IFolder resFolder = mProject.getFolder(AndroidConstants.WS_RESOURCES);
+        IFolder resFolder = mProject.getFolder(AdtConstants.WS_RESOURCES);
 
         // and the assets folder
-        IFolder assetsFolder = mProject.getFolder(AndroidConstants.WS_ASSETS);
+        IFolder assetsFolder = mProject.getFolder(AdtConstants.WS_ASSETS);
 
         // we need to make sure this one exists.
         if (assetsFolder.exists() == false) {
@@ -747,7 +747,7 @@ public class BuildHelper {
             // (This is to handle the case of reference Android projects in the context of
             // instrumentation projects that need to reference the projects to be tested).
             if (referencedJavaProject.getProject().hasNature(
-                    AndroidConstants.NATURE_DEFAULT) == false) {
+                    AdtConstants.NATURE_DEFAULT) == false) {
                 writeStandardProjectResources(apkBuilder, referencedJavaProject, wsRoot, list);
             }
         }
@@ -842,7 +842,7 @@ public class BuildHelper {
 
                     IResource resource = wsRoot.findMember(path);
                     // case of a jar file (which could be relative to the workspace or a full path)
-                    if (AndroidConstants.EXT_JAR.equalsIgnoreCase(path.getFileExtension())) {
+                    if (AdtConstants.EXT_JAR.equalsIgnoreCase(path.getFileExtension())) {
                         if (resource != null && resource.exists() &&
                                 resource.getType() == IResource.FILE) {
                             oslibraryList.add(resource.getLocation().toOSString());
@@ -908,7 +908,7 @@ public class BuildHelper {
             // only include output from non android referenced project
             // (This is to handle the case of reference Android projects in the context of
             // instrumentation projects that need to reference the projects to be tested).
-            if (javaProject.getProject().hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+            if (javaProject.getProject().hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                 // get the output folder
                 IPath path = null;
                 try {
index 30e3d5c..e1a4fa0 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.build;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.BuildVerbosity;
@@ -70,7 +70,7 @@ public class RenderScriptProcessor extends SourceProcessor {
             boolean r = super.handleGeneratedFile(file, kind);
             if (r == false &&
                     kind == IResourceDelta.REMOVED &&
-                    AndroidConstants.EXT_DEP.equalsIgnoreCase(file.getFileExtension())) {
+                    AdtConstants.EXT_DEP.equalsIgnoreCase(file.getFileExtension())) {
                 // This looks to be an extension file.
                 // For futureproofness let's make sure this dependency file was generated by
                 // this processor even if it's the only processor using them for now.
@@ -85,8 +85,8 @@ public class RenderScriptProcessor extends SourceProcessor {
                 // remove the file name segment
                 relative = relative.removeLastSegments(1);
                 // add the file name of a Renderscript file.
-                relative = relative.append(file.getName().replaceAll(AndroidConstants.RE_DEP_EXT,
-                        AndroidConstants.DOT_RS));
+                relative = relative.append(file.getName().replaceAll(AdtConstants.RE_DEP_EXT,
+                        AdtConstants.DOT_RS));
 
                 // now look for a match in the source folders.
                 List<IPath> sourceFolders = BaseProjectHelper.getSourceClasspaths(
@@ -122,7 +122,7 @@ public class RenderScriptProcessor extends SourceProcessor {
 
     @Override
     protected String getExtension() {
-        return AndroidConstants.EXT_RS;
+        return AdtConstants.EXT_RS;
     }
 
     @Override
@@ -166,7 +166,7 @@ public class RenderScriptProcessor extends SourceProcessor {
         boolean someSuccess = false;
 
         // remove the generic marker from the project
-        builder.removeMarkersFromResource(project, AndroidConstants.MARKER_RENDERSCRIPT);
+        builder.removeMarkersFromResource(project, AdtConstants.MARKER_RENDERSCRIPT);
 
         // loop until we've compile them all
         for (IFile sourceFile : sources) {
@@ -182,11 +182,11 @@ public class RenderScriptProcessor extends SourceProcessor {
             }
 
             // Remove the RS error markers from the source file and the dependencies
-            builder.removeMarkersFromResource(sourceFile, AndroidConstants.MARKER_RENDERSCRIPT);
+            builder.removeMarkersFromResource(sourceFile, AdtConstants.MARKER_RENDERSCRIPT);
             SourceFileData data = getFileData(sourceFile);
             if (data != null) {
                 for (IFile dep : data.getDependencyFiles()) {
-                    builder.removeMarkersFromResource(dep, AndroidConstants.MARKER_RENDERSCRIPT);
+                    builder.removeMarkersFromResource(dep, AdtConstants.MARKER_RENDERSCRIPT);
                 }
             }
 
@@ -254,7 +254,7 @@ public class RenderScriptProcessor extends SourceProcessor {
 
                         // mark the project
                         BaseProjectHelper.markResource(project,
-                                AndroidConstants.MARKER_RENDERSCRIPT,
+                                AdtConstants.MARKER_RENDERSCRIPT,
                                 "Unparsed Renderscript error! Check the console for output.",
                                 IMarker.SEVERITY_ERROR);
                     } else {
@@ -268,7 +268,7 @@ public class RenderScriptProcessor extends SourceProcessor {
             String msg = String.format(
                     "Error executing Renderscript. Please check llvm-rs-cc is present at %1$s",
                     command[0]);
-            BaseProjectHelper.markResource(project, AndroidConstants.MARKER_RENDERSCRIPT, msg,
+            BaseProjectHelper.markResource(project, AdtConstants.MARKER_RENDERSCRIPT, msg,
                     IMarker.SEVERITY_ERROR);
             return false;
         } catch (InterruptedException e) {
@@ -276,7 +276,7 @@ public class RenderScriptProcessor extends SourceProcessor {
             String msg = String.format(
                     "Error executing Renderscript. Please check llvm-rs-cc is present at %1$s",
                     command[0]);
-            BaseProjectHelper.markResource(project, AndroidConstants.MARKER_RENDERSCRIPT, msg,
+            BaseProjectHelper.markResource(project, AdtConstants.MARKER_RENDERSCRIPT, msg,
                     IMarker.SEVERITY_ERROR);
             return false;
         }
@@ -344,7 +344,7 @@ public class RenderScriptProcessor extends SourceProcessor {
                 }
 
                 // mark the file
-                BaseProjectHelper.markResource(f, AndroidConstants.MARKER_RENDERSCRIPT, msg, line,
+                BaseProjectHelper.markResource(f, AdtConstants.MARKER_RENDERSCRIPT, msg, line,
                         IMarker.SEVERITY_ERROR);
 
                 // success, go to the next line
@@ -417,8 +417,8 @@ public class RenderScriptProcessor extends SourceProcessor {
 
     private IFile getDependencyFileFor(IFile sourceFile) {
         IFolder depFolder = getDependencyFolder(sourceFile);
-        return depFolder.getFile(sourceFile.getName().replaceAll(AndroidConstants.RE_RS_EXT,
-                AndroidConstants.DOT_DEP));
+        return depFolder.getFile(sourceFile.getName().replaceAll(AdtConstants.RE_RS_EXT,
+                AdtConstants.DOT_DEP));
     }
 
     /**
index af4d0ab..293b340 100644 (file)
@@ -18,7 +18,7 @@ package com.android.ide.eclipse.adt.internal.build.builders;
 
 import com.android.ide.common.sdk.LoadStatus;
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.BuildHelper;
 import com.android.ide.eclipse.adt.internal.build.Messages;
 import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
@@ -151,7 +151,7 @@ public abstract class BaseBuilder extends IncrementalProjectBuilder {
             IFile file = (IFile)resource;
 
             // remove previous markers
-            removeMarkersFromResource(file, AndroidConstants.MARKER_XML);
+            removeMarkersFromResource(file, AdtConstants.MARKER_XML);
 
             // create  the error handler
             XmlErrorHandler reporter = new XmlErrorHandler(file, visitor);
@@ -309,9 +309,9 @@ public abstract class BaseBuilder extends IncrementalProjectBuilder {
        }
 
         // abort if there are TARGET or ADT type markers
-        stopOnMarker(iProject, AndroidConstants.MARKER_TARGET, IResource.DEPTH_ZERO,
+        stopOnMarker(iProject, AdtConstants.MARKER_TARGET, IResource.DEPTH_ZERO,
                 false /*checkSeverity*/);
-        stopOnMarker(iProject, AndroidConstants.MARKER_ADT, IResource.DEPTH_ZERO,
+        stopOnMarker(iProject, AdtConstants.MARKER_ADT, IResource.DEPTH_ZERO,
                 false /*checkSeverity*/);
     }
 
index 1d3d13b..71c38f8 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.build.builders;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.AndroidPrintStream;
 import com.android.ide.eclipse.adt.internal.build.AaptExecException;
 import com.android.ide.eclipse.adt.internal.build.AaptParser;
@@ -134,7 +134,7 @@ public class PostCompilerBuilder extends BaseBuilder {
                 int type = resource.getType();
                 if (type == IResource.FILE) {
                     String ext = resource.getFileExtension();
-                    if (AndroidConstants.EXT_CLASS.equals(ext)) {
+                    if (AdtConstants.EXT_CLASS.equals(ext)) {
                         mConvertToDex = true;
                     }
                 }
@@ -178,7 +178,7 @@ public class PostCompilerBuilder extends BaseBuilder {
 
     private ResourceMarker mResourceMarker = new ResourceMarker() {
         public void setWarning(IResource resource, String message) {
-            BaseProjectHelper.markResource(resource, AndroidConstants.MARKER_PACKAGING,
+            BaseProjectHelper.markResource(resource, AdtConstants.MARKER_PACKAGING,
                     message, IMarker.SEVERITY_WARNING);
         }
     };
@@ -196,8 +196,8 @@ public class PostCompilerBuilder extends BaseBuilder {
         IProject project = getProject();
 
         // Clear the project of the generic markers
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_AAPT_PACKAGE);
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_PACKAGING);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_AAPT_PACKAGE);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_PACKAGING);
     }
 
     // build() returns a list of project from which this project depends for future compilation.
@@ -332,11 +332,11 @@ public class PostCompilerBuilder extends BaseBuilder {
             }
 
             // remove older packaging markers.
-            removeMarkersFromContainer(javaProject.getProject(), AndroidConstants.MARKER_PACKAGING);
+            removeMarkersFromContainer(javaProject.getProject(), AdtConstants.MARKER_PACKAGING);
 
             if (outputFolder == null) {
                 // mark project and exit
-                markProject(AndroidConstants.MARKER_PACKAGING, Messages.Failed_To_Get_Output,
+                markProject(AdtConstants.MARKER_PACKAGING, Messages.Failed_To_Get_Output,
                         IMarker.SEVERITY_ERROR);
                 return allRefProjects;
             }
@@ -357,7 +357,7 @@ public class PostCompilerBuilder extends BaseBuilder {
 
             if (mPackageResources == false) {
                 // check the full resource package
-                tmp = outputFolder.findMember(AndroidConstants.FN_RESOURCES_AP_);
+                tmp = outputFolder.findMember(AdtConstants.FN_RESOURCES_AP_);
                 if (tmp == null || tmp.exists() == false) {
                     mPackageResources = true;
                     mBuildFinalPackage = true;
@@ -419,13 +419,13 @@ public class PostCompilerBuilder extends BaseBuilder {
                     // mark project and exit
                     String msg = String.format(Messages.s_File_Missing,
                             SdkConstants.FN_ANDROID_MANIFEST_XML);
-                    markProject(AndroidConstants.MARKER_PACKAGING, msg, IMarker.SEVERITY_ERROR);
+                    markProject(AdtConstants.MARKER_PACKAGING, msg, IMarker.SEVERITY_ERROR);
                     return allRefProjects;
                 }
 
                 IPath binLocation = outputFolder.getLocation();
                 if (binLocation == null) {
-                    markProject(AndroidConstants.MARKER_PACKAGING, Messages.Output_Missing,
+                    markProject(AdtConstants.MARKER_PACKAGING, Messages.Output_Missing,
                             IMarker.SEVERITY_ERROR);
                     return allRefProjects;
                 }
@@ -445,14 +445,14 @@ public class PostCompilerBuilder extends BaseBuilder {
                 // first we check if we need to package the resources.
                 if (mPackageResources) {
                     // remove some aapt_package only markers.
-                    removeMarkersFromContainer(project, AndroidConstants.MARKER_AAPT_PACKAGE);
+                    removeMarkersFromContainer(project, AdtConstants.MARKER_AAPT_PACKAGE);
 
                     try {
                         helper.packageResources(manifestFile, libProjects, null /*resfilter*/,
                                 0 /*versionCode */, osBinPath,
-                                AndroidConstants.FN_RESOURCES_AP_);
+                                AdtConstants.FN_RESOURCES_AP_);
                     } catch (AaptExecException e) {
-                        BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING,
+                        BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING,
                                 e.getMessage(), IMarker.SEVERITY_ERROR);
                         return allRefProjects;
                     } catch (AaptResultException e) {
@@ -468,7 +468,7 @@ public class PostCompilerBuilder extends BaseBuilder {
                             // therefore not all files that should have been marked, were marked),
                             // we put a generic marker on the project and abort.
                             BaseProjectHelper.markResource(project,
-                                    AndroidConstants.MARKER_PACKAGING,
+                                    AdtConstants.MARKER_PACKAGING,
                                     Messages.Unparsed_AAPT_Errors,
                                     IMarker.SEVERITY_ERROR);
                         }
@@ -493,7 +493,7 @@ public class PostCompilerBuilder extends BaseBuilder {
                         String message = e.getMessage();
 
                         AdtPlugin.printErrorToConsole(project, message);
-                        BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING,
+                        BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING,
                                 message, IMarker.SEVERITY_ERROR);
 
                         Throwable cause = e.getCause();
@@ -523,7 +523,7 @@ public class PostCompilerBuilder extends BaseBuilder {
                         SdkConstants.FN_APK_CLASSES_DEX;
                 try {
                     helper.finalDebugPackage(
-                        osBinPath + File.separator + AndroidConstants.FN_RESOURCES_AP_,
+                        osBinPath + File.separator + AdtConstants.FN_RESOURCES_AP_,
                         classesDexPath, osFinalPackagePath,
                         javaProject, libProjects, referencedJavaProjects, mResourceMarker);
                 } catch (KeytoolException e) {
@@ -531,7 +531,7 @@ public class PostCompilerBuilder extends BaseBuilder {
 
                     // mark the project with the standard message
                     String msg = String.format(Messages.Final_Archive_Error_s, eMessage);
-                    BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING, msg,
+                    BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING, msg,
                             IMarker.SEVERITY_ERROR);
 
                     // output more info in the console
@@ -547,19 +547,19 @@ public class PostCompilerBuilder extends BaseBuilder {
 
                     // mark the project with the standard message
                     String msg = String.format(Messages.Final_Archive_Error_s, eMessage);
-                    BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING, msg,
+                    BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING, msg,
                             IMarker.SEVERITY_ERROR);
                 } catch (AndroidLocationException e) {
                     String eMessage = e.getMessage();
 
                     // mark the project with the standard message
                     String msg = String.format(Messages.Final_Archive_Error_s, eMessage);
-                    BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING, msg,
+                    BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING, msg,
                             IMarker.SEVERITY_ERROR);
                 } catch (NativeLibInJarException e) {
                     String msg = e.getMessage();
 
-                    BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING,
+                    BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING,
                             msg, IMarker.SEVERITY_ERROR);
 
                     AdtPlugin.printErrorToConsole(project, (Object[]) e.getAdditionalInfo());
@@ -567,7 +567,7 @@ public class PostCompilerBuilder extends BaseBuilder {
                     // mark project and return
                     String msg = String.format(Messages.Final_Archive_Error_s, e.getMessage());
                     AdtPlugin.printErrorToConsole(project, msg);
-                    BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING, msg,
+                    BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING, msg,
                             IMarker.SEVERITY_ERROR);
                 } catch (DuplicateFileException e) {
                     String msg1 = String.format(
@@ -575,7 +575,7 @@ public class PostCompilerBuilder extends BaseBuilder {
                             e.getArchivePath(), e.getFile1(), e.getFile2());
                     String msg2 = String.format(Messages.Final_Archive_Error_s, msg1);
                     AdtPlugin.printErrorToConsole(project, msg2);
-                    BaseProjectHelper.markResource(project, AndroidConstants.MARKER_PACKAGING, msg2,
+                    BaseProjectHelper.markResource(project, AdtConstants.MARKER_PACKAGING, msg2,
                             IMarker.SEVERITY_ERROR);
                 }
 
@@ -618,7 +618,7 @@ public class PostCompilerBuilder extends BaseBuilder {
 
             msg = String.format("Unknown error: %1$s", msg);
             AdtPlugin.logAndPrintError(exception, project.getName(), msg);
-            markProject(AndroidConstants.MARKER_PACKAGING, msg, IMarker.SEVERITY_ERROR);
+            markProject(AdtConstants.MARKER_PACKAGING, msg, IMarker.SEVERITY_ERROR);
         }
 
         return allRefProjects;
@@ -643,13 +643,13 @@ public class PostCompilerBuilder extends BaseBuilder {
 
         // do a (hopefully quick) search for Precompiler type markers. Those are always only
         // errors.
-        stopOnMarker(iProject, AndroidConstants.MARKER_AAPT_COMPILE, IResource.DEPTH_INFINITE,
+        stopOnMarker(iProject, AdtConstants.MARKER_AAPT_COMPILE, IResource.DEPTH_INFINITE,
                 false /*checkSeverity*/);
-        stopOnMarker(iProject, AndroidConstants.MARKER_AIDL, IResource.DEPTH_INFINITE,
+        stopOnMarker(iProject, AdtConstants.MARKER_AIDL, IResource.DEPTH_INFINITE,
                 false /*checkSeverity*/);
-        stopOnMarker(iProject, AndroidConstants.MARKER_RENDERSCRIPT, IResource.DEPTH_INFINITE,
+        stopOnMarker(iProject, AdtConstants.MARKER_RENDERSCRIPT, IResource.DEPTH_INFINITE,
                 false /*checkSeverity*/);
-        stopOnMarker(iProject, AndroidConstants.MARKER_ANDROID, IResource.DEPTH_ZERO,
+        stopOnMarker(iProject, AdtConstants.MARKER_ANDROID, IResource.DEPTH_ZERO,
                 false /*checkSeverity*/);
 
         // do a search for JDT markers. Those can be errors or warnings
index 7df8ef4..7e426fd 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.build.builders;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.BuildHelper;
 import com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.BaseDeltaVisitor;
 import com.android.sdklib.SdkConstants;
@@ -177,7 +177,7 @@ public class PostCompilerDeltaVisitor extends BaseDeltaVisitor
                 // just check this is a .class file. Any modification will
                 // trigger a change in the classes.dex file
                 String ext = resource.getFileExtension();
-                if (AndroidConstants.EXT_CLASS.equalsIgnoreCase(ext)) {
+                if (AdtConstants.EXT_CLASS.equalsIgnoreCase(ext)) {
                     mConvertToDex = true;
                     mMakeFinalPackage = true;
 
@@ -198,8 +198,8 @@ public class PostCompilerDeltaVisitor extends BaseDeltaVisitor
                             mConvertToDex = true;
                             mMakeFinalPackage = true;
                         } else if (resourceName.equalsIgnoreCase(
-                                AndroidConstants.FN_RESOURCES_AP_) ||
-                                AndroidConstants.PATTERN_RESOURCES_S_AP_.matcher(
+                                AdtConstants.FN_RESOURCES_AP_) ||
+                                AdtConstants.PATTERN_RESOURCES_S_AP_.matcher(
                                         resourceName).matches()) {
                             // or if the default resources.ap_ or a configured version
                             // (resources-###.ap_) was removed.
@@ -237,7 +237,7 @@ public class PostCompilerDeltaVisitor extends BaseDeltaVisitor
         } else if (mLibFolder != null && mLibFolder.isPrefixOf(path)) {
             // inside the native library folder. Test if the changed resource is a .so file.
             if (type == IResource.FILE &&
-                    (AndroidConstants.EXT_NATIVE_LIB.equalsIgnoreCase(path.getFileExtension())
+                    (AdtConstants.EXT_NATIVE_LIB.equalsIgnoreCase(path.getFileExtension())
                             || SdkConstants.FN_GDBSERVER.equals(resource.getName()))) {
                 mMakeFinalPackage = true;
                 return false; // return false for file.
index fd3a07d..167f39f 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.build.builders;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.AaptParser;
 import com.android.ide.eclipse.adt.internal.build.AidlProcessor;
 import com.android.ide.eclipse.adt.internal.build.SourceProcessor;
@@ -303,7 +303,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                 String msg = String.format(Messages.s_File_Missing,
                         SdkConstants.FN_ANDROID_MANIFEST_XML);
                 AdtPlugin.printErrorToConsole(project, msg);
-                markProject(AndroidConstants.MARKER_ADT, msg, IMarker.SEVERITY_ERROR);
+                markProject(AdtConstants.MARKER_ADT, msg, IMarker.SEVERITY_ERROR);
 
                 return result;
 
@@ -350,7 +350,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                 AndroidVersion projectVersion = projectTarget.getVersion();
 
                 // remove earlier marker from the manifest
-                removeMarkersFromResource(manifestFile, AndroidConstants.MARKER_ADT);
+                removeMarkersFromResource(manifestFile, AdtConstants.MARKER_ADT);
 
                 if (minSdkValue != -1) {
                     String codename = projectVersion.getCodename();
@@ -360,7 +360,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                                 "Platform %1$s is a preview and requires application manifest to set %2$s to '%1$s'",
                                 codename, AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION);
                         AdtPlugin.printErrorToConsole(project, msg);
-                        BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT,
+                        BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
                                 msg, IMarker.SEVERITY_ERROR);
                         return result;
                     } else if (minSdkValue < projectVersion.getApiLevel()) {
@@ -370,7 +370,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                                 AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION,
                                 minSdkValue, projectVersion.getApiLevel());
                         AdtPlugin.printBuildToConsole(BuildVerbosity.VERBOSE, project, msg);
-                        BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT,
+                        BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
                                 msg, IMarker.SEVERITY_WARNING);
                     } else if (minSdkValue > projectVersion.getApiLevel()) {
                         // integer minSdk is too high for the target => warning
@@ -379,7 +379,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                                 AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION,
                                 minSdkValue, projectVersion.getApiLevel());
                         AdtPlugin.printBuildToConsole(BuildVerbosity.VERBOSE, project, msg);
-                        BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT,
+                        BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
                                 msg, IMarker.SEVERITY_WARNING);
                     }
                 } else {
@@ -392,7 +392,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                                 "Manifest attribute '%1$s' is set to '%2$s'. Integer is expected.",
                                 AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION, minSdkVersion);
                         AdtPlugin.printErrorToConsole(project, msg);
-                        BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT,
+                        BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
                                 msg, IMarker.SEVERITY_ERROR);
                         return result;
                     } else if (codename.equals(minSdkVersion) == false) {
@@ -401,7 +401,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                                 "Value of manifest attribute '%1$s' does not match platform codename '%2$s'",
                                 AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION, codename);
                         AdtPlugin.printErrorToConsole(project, msg);
-                        BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT,
+                        BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
                                 msg, IMarker.SEVERITY_ERROR);
                         return result;
                     }
@@ -414,7 +414,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                         "Platform %1$s is a preview and requires application manifests to set %2$s to '%1$s'",
                         codename, AndroidManifest.ATTRIBUTE_MIN_SDK_VERSION);
                 AdtPlugin.printErrorToConsole(project, msg);
-                BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT, msg,
+                BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT, msg,
                         IMarker.SEVERITY_ERROR);
                 return result;
             }
@@ -424,7 +424,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                 String msg = String.format(Messages.s_Doesnt_Declare_Package_Error,
                         SdkConstants.FN_ANDROID_MANIFEST_XML);
                 AdtPlugin.printErrorToConsole(project, msg);
-                BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT,
+                BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
                         msg, IMarker.SEVERITY_ERROR);
 
                 return result;
@@ -434,7 +434,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                         "Application package '%1$s' must have a minimum of 2 segments.",
                         SdkConstants.FN_ANDROID_MANIFEST_XML);
                 AdtPlugin.printErrorToConsole(project, msg);
-                BaseProjectHelper.markResource(manifestFile, AndroidConstants.MARKER_ADT,
+                BaseProjectHelper.markResource(manifestFile, AdtConstants.MARKER_ADT,
                         msg, IMarker.SEVERITY_ERROR);
 
                 return result;
@@ -530,11 +530,11 @@ public class PreCompilerBuilder extends BaseBuilder {
         }
 
         // Clear the project of the generic markers
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_AAPT_COMPILE);
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_XML);
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_AIDL);
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_RENDERSCRIPT);
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_ANDROID);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_AAPT_COMPILE);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_XML);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_AIDL);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_RENDERSCRIPT);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_ANDROID);
     }
 
     @Override
@@ -576,7 +576,7 @@ public class PreCompilerBuilder extends BaseBuilder {
     private void handleResources(IProject project, String javaPackage, IAndroidTarget projectTarget,
             IFile manifest, List<IProject> libProjects) throws CoreException, AbortBuildException {
         // get the resource folder
-        IFolder resFolder = project.getFolder(AndroidConstants.WS_RESOURCES);
+        IFolder resFolder = project.getFolder(AdtConstants.WS_RESOURCES);
 
         // get the file system path
         IPath outputLocation = mGenFolder.getLocation();
@@ -591,8 +591,8 @@ public class PreCompilerBuilder extends BaseBuilder {
             String osManifestPath = manifestLocation.toOSString();
 
             // remove the aapt markers
-            removeMarkersFromResource(manifest, AndroidConstants.MARKER_AAPT_COMPILE);
-            removeMarkersFromContainer(resFolder, AndroidConstants.MARKER_AAPT_COMPILE);
+            removeMarkersFromResource(manifest, AdtConstants.MARKER_AAPT_COMPILE);
+            removeMarkersFromContainer(resFolder, AdtConstants.MARKER_AAPT_COMPILE);
 
             AdtPlugin.printBuildToConsole(BuildVerbosity.VERBOSE, project,
                     Messages.Preparing_Generated_Files);
@@ -661,7 +661,7 @@ public class PreCompilerBuilder extends BaseBuilder {
         // We actually need to delete the manifest.java as it may become empty and
         // in this case aapt doesn't generate an empty one, but instead doesn't
         // touch it.
-        IFile manifestJavaFile = packageFolder.getFile(AndroidConstants.FN_MANIFEST_CLASS);
+        IFile manifestJavaFile = packageFolder.getFile(AdtConstants.FN_MANIFEST_CLASS);
         manifestJavaFile.getLocation().toFile().delete();
 
         // launch aapt: create the command line
@@ -737,7 +737,7 @@ public class PreCompilerBuilder extends BaseBuilder {
                 // (and therefore not all files that should have been marked,
                 // were marked), we put a generic marker on the project and abort.
                 if (parsingError) {
-                    markProject(AndroidConstants.MARKER_ADT,
+                    markProject(AdtConstants.MARKER_ADT,
                             Messages.Unparsed_AAPT_Errors, IMarker.SEVERITY_ERROR);
                 }
 
@@ -751,7 +751,7 @@ public class PreCompilerBuilder extends BaseBuilder {
             // something happen while executing the process,
             // mark the project and exit
             String msg = String.format(Messages.AAPT_Exec_Error, array.get(0));
-            markProject(AndroidConstants.MARKER_ADT, msg, IMarker.SEVERITY_ERROR);
+            markProject(AdtConstants.MARKER_ADT, msg, IMarker.SEVERITY_ERROR);
 
             // This interrupts the build.
             throw new AbortBuildException();
@@ -759,7 +759,7 @@ public class PreCompilerBuilder extends BaseBuilder {
             // we got interrupted waiting for the process to end...
             // mark the project and exit
             String msg = String.format(Messages.AAPT_Exec_Error, array.get(0));
-            markProject(AndroidConstants.MARKER_ADT, msg, IMarker.SEVERITY_ERROR);
+            markProject(AdtConstants.MARKER_ADT, msg, IMarker.SEVERITY_ERROR);
 
             // This interrupts the build.
             throw new AbortBuildException();
@@ -783,11 +783,11 @@ public class PreCompilerBuilder extends BaseBuilder {
      */
     private IPath getJavaPackagePath(String javaPackageName) {
         // convert the java package into path
-        String[] segments = javaPackageName.split(AndroidConstants.RE_DOT);
+        String[] segments = javaPackageName.split(AdtConstants.RE_DOT);
 
         StringBuilder path = new StringBuilder();
         for (String s : segments) {
-           path.append(AndroidConstants.WS_SEP_CHAR);
+           path.append(AdtConstants.WS_SEP_CHAR);
            path.append(s);
         }
 
index 6660cd2..cd99fbe 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.build.builders;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.SourceChangeHandler;
 import com.android.ide.eclipse.adt.internal.build.SourceProcessor;
 import com.android.ide.eclipse.adt.internal.build.Messages;
@@ -199,9 +199,9 @@ class PreCompilerDeltaVisitor extends BaseDeltaVisitor implements IResourceDelta
                     IFile manifestFile = (IFile)resource;
 
                     if (manifestFile.exists()) {
-                        manifestFile.deleteMarkers(AndroidConstants.MARKER_XML, true,
+                        manifestFile.deleteMarkers(AdtConstants.MARKER_XML, true,
                                 IResource.DEPTH_ZERO);
-                        manifestFile.deleteMarkers(AndroidConstants.MARKER_ANDROID, true,
+                        manifestFile.deleteMarkers(AdtConstants.MARKER_ANDROID, true,
                                 IResource.DEPTH_ZERO);
                     }
 
@@ -262,8 +262,8 @@ class PreCompilerDeltaVisitor extends BaseDeltaVisitor implements IResourceDelta
                 String fileName = resource.getName();
 
                 // Special case of R.java/Manifest.java.
-                if (AndroidConstants.FN_RESOURCE_CLASS.equals(fileName) ||
-                        AndroidConstants.FN_MANIFEST_CLASS.equals(fileName)) {
+                if (AdtConstants.FN_RESOURCE_CLASS.equals(fileName) ||
+                        AdtConstants.FN_MANIFEST_CLASS.equals(fileName)) {
                     // if it was removed, there's a possibility that it was removed due to a
                     // package change, or an aidl that was removed, but the only thing
                     // that will happen is that we'll have an extra build. Not much of a problem.
@@ -324,17 +324,17 @@ class PreCompilerDeltaVisitor extends BaseDeltaVisitor implements IResourceDelta
                 case IResourceDelta.CHANGED:
                     // display verbose message
                     message = String.format(Messages.s_Modified_Recreating_s, p,
-                            AndroidConstants.FN_RESOURCE_CLASS);
+                            AdtConstants.FN_RESOURCE_CLASS);
                     break;
                 case IResourceDelta.ADDED:
                     // display verbose message
                     message = String.format(Messages.Added_s_s_Needs_Updating, p,
-                            AndroidConstants.FN_RESOURCE_CLASS);
+                            AdtConstants.FN_RESOURCE_CLASS);
                     break;
                 case IResourceDelta.REMOVED:
                     // display verbose message
                     message = String.format(Messages.s_Removed_s_Needs_Updating, p,
-                            AndroidConstants.FN_RESOURCE_CLASS);
+                            AdtConstants.FN_RESOURCE_CLASS);
                     break;
             }
             if (message != null) {
@@ -346,7 +346,7 @@ class PreCompilerDeltaVisitor extends BaseDeltaVisitor implements IResourceDelta
                 handler.handleResourceFile((IFile)resource, kind);
             }
 
-            if (AndroidConstants.EXT_XML.equalsIgnoreCase(ext)) {
+            if (AdtConstants.EXT_XML.equalsIgnoreCase(ext)) {
                 if (kind != IResourceDelta.REMOVED) {
                     // check xml Validity
                     mBuilder.checkXML(resource, this);
index 0908260..8c4127e 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.build.builders;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.Messages;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs.BuildVerbosity;
@@ -64,7 +64,7 @@ public class ResourceManagerBuilder extends BaseBuilder {
         IProject project = getProject();
 
         // Clear the project of the generic markers
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_ADT);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_ADT);
     }
 
     // build() returns a list of project from which this project depends for future compilation.
@@ -77,7 +77,7 @@ public class ResourceManagerBuilder extends BaseBuilder {
         IJavaProject javaProject = JavaCore.create(project);
 
         // Clear the project of the generic markers
-        removeMarkersFromContainer(project, AndroidConstants.MARKER_ADT);
+        removeMarkersFromContainer(project, AdtConstants.MARKER_ADT);
 
         // check for existing target marker, in which case we abort.
         // (this means: no SDK, no target, or unresolvable target.)
@@ -104,7 +104,7 @@ public class ResourceManagerBuilder extends BaseBuilder {
         }
 
         if (errorMessage != null) {
-            markProject(AndroidConstants.MARKER_ADT, errorMessage, IMarker.SEVERITY_ERROR);
+            markProject(AdtConstants.MARKER_ADT, errorMessage, IMarker.SEVERITY_ERROR);
             AdtPlugin.printErrorToConsole(project, errorMessage);
 
             return null;
@@ -115,7 +115,7 @@ public class ResourceManagerBuilder extends BaseBuilder {
 
         if (osSdkFolder == null || osSdkFolder.length() == 0) {
             AdtPlugin.printErrorToConsole(project, Messages.No_SDK_Setup_Error);
-            markProject(AndroidConstants.MARKER_ADT, Messages.No_SDK_Setup_Error,
+            markProject(AdtConstants.MARKER_ADT, Messages.No_SDK_Setup_Error,
                     IMarker.SEVERITY_ERROR);
 
             return null;
@@ -166,7 +166,7 @@ public class ResourceManagerBuilder extends BaseBuilder {
             }
 
             AdtPlugin.printErrorToConsole(project, message);
-            markProject(AndroidConstants.MARKER_ADT, message, IMarker.SEVERITY_ERROR);
+            markProject(AdtConstants.MARKER_ADT, message, IMarker.SEVERITY_ERROR);
 
             return null;
         } else if (hasGenSrcFolder == false || genFolderPresent == false) {
@@ -214,12 +214,12 @@ public class ResourceManagerBuilder extends BaseBuilder {
             AdtPlugin.printBuildToConsole(BuildVerbosity.VERBOSE, project, Messages.Refreshing_Res);
 
             // refresh the res folder.
-            IFolder resFolder = project.getFolder(AndroidConstants.WS_RESOURCES);
+            IFolder resFolder = project.getFolder(AdtConstants.WS_RESOURCES);
             resFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);
 
             // Also refresh the assets folder to make sure the ApkBuilder
             // will now it's changed and will force a new resource packaging.
-            IFolder assetsFolder = project.getFolder(AndroidConstants.WS_ASSETS);
+            IFolder assetsFolder = project.getFolder(AdtConstants.WS_ASSETS);
             assetsFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);
         }
 
index 970e93c..1fea25a 100644 (file)
@@ -34,7 +34,7 @@ import static com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT;
 
 import com.android.ide.common.api.IAttributeInfo.Format;
 import com.android.ide.common.resources.platform.AttributeInfo;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
 import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
 import com.android.resources.ResourceType;
@@ -64,7 +64,7 @@ public final class DescriptorsUtils {
      * The path in the online documentation for the manifest description.
      * <p/>
      * This is NOT a complete URL. To be used, it needs to be appended
-     * to {@link AndroidConstants#CODESITE_BASE_URL} or to the local SDK
+     * to {@link AdtConstants#CODESITE_BASE_URL} or to the local SDK
      * documentation.
      */
     public static final String MANIFEST_SDK_URL = "/reference/android/R.styleable.html#";  //$NON-NLS-1$
index 50d9fd8..769f74e 100755 (executable)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.export;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidTextEditor;
 
 import org.eclipse.core.resources.IFile;
@@ -32,7 +32,7 @@ import org.eclipse.ui.part.FileEditorInput;
  */
 public class ExportEditor extends AndroidTextEditor {
 
-    public static final String ID = AndroidConstants.EDITORS_NAMESPACE + ".text.ExportEditor"; //$NON-NLS-1$
+    public static final String ID = AdtConstants.EDITORS_NAMESPACE + ".text.ExportEditor"; //$NON-NLS-1$
 
     private ExportPropertiesPage mExportPropsPage;
 
index 6be764e..aed740f 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.layout;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
@@ -65,7 +65,7 @@ import java.util.Set;
  */
 public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput, IPartListener {
 
-    public static final String ID = AndroidConstants.EDITORS_NAMESPACE + ".layout.LayoutEditor"; //$NON-NLS-1$
+    public static final String ID = AdtConstants.EDITORS_NAMESPACE + ".layout.LayoutEditor"; //$NON-NLS-1$
 
     /** Root node of the UI element hierarchy */
     private UiDocumentNode mUiRootNode;
index a19a4db..81dc818 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.layout;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor;
 import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile;
 import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder;
@@ -173,7 +173,7 @@ public final class LayoutReloadMonitor {
 
             boolean hasAndroidNature = false;
             try {
-                hasAndroidNature = project.hasNature(AndroidConstants.NATURE_DEFAULT);
+                hasAndroidNature = project.hasNature(AdtConstants.NATURE_DEFAULT);
             } catch (CoreException e) {
                 // do nothing if the nature cannot be queried.
                 return;
@@ -191,7 +191,7 @@ public final class LayoutReloadMonitor {
 
                 for (IProject p : referencingProjects) {
                     try {
-                        hasAndroidNature = p.hasNature(AndroidConstants.NATURE_DEFAULT);
+                        hasAndroidNature = p.hasNature(AdtConstants.NATURE_DEFAULT);
                     } catch (CoreException e) {
                         // do nothing if the nature cannot be queried.
                         continue;
@@ -220,7 +220,7 @@ public final class LayoutReloadMonitor {
 
             // here we only care about code change (so change for .class files).
             // Resource changes is handled by the IResourceListener.
-            if (AndroidConstants.EXT_CLASS.equals(file.getFileExtension())) {
+            if (AdtConstants.EXT_CLASS.equals(file.getFileExtension())) {
                 if (file.getName().matches("R[\\$\\.](.*)")) {
                     // this is a R change!
                     if (changeFlags == null) {
index 976dfaf..6ce4d6b 100644 (file)
@@ -20,7 +20,7 @@ import com.android.ide.common.rendering.api.IProjectCallback;
 import com.android.ide.common.rendering.api.LayoutLog;
 import com.android.ide.common.rendering.legacy.LegacyCallback;
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
 import com.android.ide.eclipse.adt.internal.resources.manager.ProjectClassLoader;
 import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
@@ -199,7 +199,7 @@ public final class ProjectCallback extends LegacyCallback {
             ManifestData manifestData = AndroidManifestHelper.parseForData(mProject);
             if (manifestData != null) {
                 String javaPackage = manifestData.getPackage();
-                mNamespace = String.format(AndroidConstants.NS_CUSTOM_RESOURCES, javaPackage);
+                mNamespace = String.format(AdtConstants.NS_CUSTOM_RESOURCES, javaPackage);
             }
         }
 
index 153a2d2..07e6a91 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.layout;
 
 import com.android.ide.common.rendering.api.ILayoutPullParser;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor;
 import com.android.sdklib.SdkConstants;
 
@@ -43,7 +43,7 @@ public class WidgetPullParser extends BasePullParser {
     public WidgetPullParser(ViewElementDescriptor descriptor) {
         mDescriptor = descriptor;
 
-        String[] segments = mDescriptor.getFullClassName().split(AndroidConstants.RE_DOT);
+        String[] segments = mDescriptor.getFullClassName().split(AdtConstants.RE_DOT);
         mAttributes[0][1] = segments[segments.length-1];
     }
 
index aef4bc4..a1a653f 100644 (file)
@@ -19,7 +19,7 @@ package com.android.ide.eclipse.adt.internal.editors.layout.gle2;
 import static com.android.ide.common.layout.LayoutConstants.ANDROID_STRING_PREFIX;
 import static com.android.ide.common.layout.LayoutConstants.SCROLL_VIEW;
 import static com.android.ide.common.layout.LayoutConstants.STRING_PREFIX;
-import static com.android.ide.eclipse.adt.AndroidConstants.ANDROID_PKG;
+import static com.android.ide.eclipse.adt.AdtConstants.ANDROID_PKG;
 
 import com.android.ide.common.rendering.LayoutLibrary;
 import com.android.ide.common.rendering.StaticRenderSession;
@@ -35,7 +35,7 @@ import com.android.ide.common.rendering.api.SessionParams.RenderingMode;
 import com.android.ide.common.resources.ResourceResolver;
 import com.android.ide.common.sdk.LoadStatus;
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.IPageImageProvider;
 import com.android.ide.eclipse.adt.internal.editors.IconFactory;
 import com.android.ide.eclipse.adt.internal.editors.layout.ContextPullParser;
@@ -1821,7 +1821,7 @@ public class GraphicalEditorPart extends EditorPart
                             if (severity == IMarker.SEVERITY_ERROR) {
                                 hasJavaErrors = true;
                             }
-                        } else if (markerType.equals(AndroidConstants.MARKER_AAPT_COMPILE)) {
+                        } else if (markerType.equals(AdtConstants.MARKER_AAPT_COMPILE)) {
                             int severity = marker.getAttribute(IMarker.SEVERITY, -1);
                             if (severity == IMarker.SEVERITY_ERROR) {
                                 hasAaptErrors = true;
index bec5945..080afce 100644 (file)
@@ -16,9 +16,9 @@
 
 package com.android.ide.eclipse.adt.internal.editors.layout.gle2;
 
-import static com.android.ide.eclipse.adt.AndroidConstants.EXT_XML;
-import static com.android.ide.eclipse.adt.AndroidConstants.WS_LAYOUTS;
-import static com.android.ide.eclipse.adt.AndroidConstants.WS_SEP;
+import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.WS_LAYOUTS;
+import static com.android.ide.eclipse.adt.AdtConstants.WS_SEP;
 import static com.android.sdklib.SdkConstants.FD_LAYOUT;
 
 import static org.eclipse.core.resources.IResourceDelta.ADDED;
index 3fcae86..58ae8ff 100644 (file)
@@ -15,7 +15,7 @@
  */
 package com.android.ide.eclipse.adt.internal.editors.layout.gle2;
 
-import static com.android.ide.eclipse.adt.AndroidConstants.WS_SEP;
+import static com.android.ide.eclipse.adt.AdtConstants.WS_SEP;
 import static com.android.sdklib.SdkConstants.FD_ANIMATOR;
 import static com.android.sdklib.SdkConstants.FD_RESOURCES;
 
index 1b48c7c..e8b4fba 100644 (file)
@@ -17,8 +17,8 @@
 package com.android.ide.eclipse.adt.internal.editors.layout.gle2;
 
 import static com.android.ide.common.layout.LayoutConstants.ANDROID_URI;
-import static com.android.ide.eclipse.adt.AndroidConstants.DOT_PNG;
-import static com.android.ide.eclipse.adt.AndroidConstants.DOT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.DOT_PNG;
+import static com.android.ide.eclipse.adt.AdtConstants.DOT_XML;
 
 import com.android.ide.common.rendering.LayoutLibrary;
 import com.android.ide.common.rendering.api.Capability;
index c49e13d..a83d41f 100644 (file)
@@ -29,7 +29,7 @@ import static com.android.ide.common.layout.LayoutConstants.LINEAR_LAYOUT;
 import static com.android.ide.common.layout.LayoutConstants.TABLE_ROW;
 import static com.android.ide.common.layout.LayoutConstants.VALUE_FALSE;
 import static com.android.ide.common.layout.LayoutConstants.VALUE_VERTICAL;
-import static com.android.ide.eclipse.adt.AndroidConstants.EXT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML;
 
 import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
index 21779dc..fcd6ff6 100644 (file)
@@ -24,15 +24,15 @@ import static com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH;
 import static com.android.ide.common.layout.LayoutConstants.ID_PREFIX;
 import static com.android.ide.common.layout.LayoutConstants.NEW_ID_PREFIX;
 import static com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT;
-import static com.android.ide.eclipse.adt.AndroidConstants.DOT_XML;
-import static com.android.ide.eclipse.adt.AndroidConstants.EXT_XML;
-import static com.android.ide.eclipse.adt.AndroidConstants.WS_SEP;
+import static com.android.ide.eclipse.adt.AdtConstants.DOT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.WS_SEP;
 import static com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor.XMLNS;
 import static com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor.XMLNS_COLON;
 import static com.android.resources.ResourceType.LAYOUT;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
 import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors;
 import com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo;
@@ -260,7 +260,7 @@ public class ExtractIncludeRefactoring extends VisualRefactoring {
         IPath parentPath = parent.getProjectRelativePath();
         final IFile file = project.getFile(new Path(parentPath + WS_SEP + newFileName));
         TextFileChange addFile = new TextFileChange("Create new separate layout", file);
-        addFile.setTextType(AndroidConstants.EXT_XML);
+        addFile.setTextType(AdtConstants.EXT_XML);
         changes.add(addFile);
         addFile.setEdit(new InsertEdit(0, sb.toString()));
 
index e175da2..627f1b1 100644 (file)
@@ -16,7 +16,7 @@
 package com.android.ide.eclipse.adt.internal.editors.layout.refactoring;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
 import com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo;
 
@@ -136,7 +136,7 @@ abstract class VisualRefactoringAction implements IWorkbenchWindowActionDelegate
                 if (file.exists()) {
                     IProject proj = file.getProject();
                     try {
-                        if (proj != null && proj.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+                        if (proj != null && proj.hasNature(AdtConstants.NATURE_DEFAULT)) {
                             return file;
                         }
                     } catch (CoreException e) {
index 0aea363..4a73361 100644 (file)
@@ -22,7 +22,7 @@ import static com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH;
 import static com.android.ide.common.layout.LayoutConstants.VALUE_FILL_PARENT;
 import static com.android.ide.common.layout.LayoutConstants.VALUE_MATCH_PARENT;
 import static com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT;
-import static com.android.ide.eclipse.adt.AndroidConstants.EXT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML;
 
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
index fb742a7..ac9d83d 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.manifest;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.AndroidManifestDescriptors;
@@ -56,7 +56,7 @@ import javax.xml.xpath.XPathExpressionException;
  */
 public final class ManifestEditor extends AndroidXmlEditor {
 
-    public static final String ID = AndroidConstants.EDITORS_NAMESPACE + ".manifest.ManifestEditor"; //$NON-NLS-1$
+    public static final String ID = AdtConstants.EDITORS_NAMESPACE + ".manifest.ManifestEditor"; //$NON-NLS-1$
 
     private final static String EMPTY = ""; //$NON-NLS-1$
 
@@ -256,7 +256,7 @@ public final class ManifestEditor extends AndroidXmlEditor {
         try {
             // get the markers for the file
             IMarker[] markers = inputFile.findMarkers(
-                    AndroidConstants.MARKER_ANDROID, true, IResource.DEPTH_ZERO);
+                    AdtConstants.MARKER_ANDROID, true, IResource.DEPTH_ZERO);
 
             AndroidManifestDescriptors desc = getManifestDescriptors();
             if (desc != null) {
@@ -304,12 +304,12 @@ public final class ManifestEditor extends AndroidXmlEditor {
      */
     private void processMarker(IMarker marker, List<UiElementNode> nodeList, int kind) {
         // get the data from the marker
-        String nodeType = marker.getAttribute(AndroidConstants.MARKER_ATTR_TYPE, EMPTY);
+        String nodeType = marker.getAttribute(AdtConstants.MARKER_ATTR_TYPE, EMPTY);
         if (nodeType == EMPTY) {
             return;
         }
 
-        String className = marker.getAttribute(AndroidConstants.MARKER_ATTR_CLASS, EMPTY);
+        String className = marker.getAttribute(AdtConstants.MARKER_ATTR_CLASS, EMPTY);
         if (className == EMPTY) {
             return;
         }
index 348e0a3..7b1f4fa 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.manifest.model;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor;
@@ -394,7 +394,7 @@ public class UiClassAttributeNode extends UiTextAttributeNode {
             if (className.startsWith(".")) { //$NON-NLS-1$
                 fullClassName = packageName + className;
             } else {
-                String[] segments = className.split(AndroidConstants.RE_DOT);
+                String[] segments = className.split(AdtConstants.RE_DOT);
                 if (segments.length == 1) {
                     fullClassName = packageName + "." + className; //$NON-NLS-1$
                 }
@@ -503,7 +503,7 @@ public class UiClassAttributeNode extends UiTextAttributeNode {
             // look for how many segments we have left.
             // if one, just write it that way.
             // if more than one, write it with a leading dot.
-            String[] packages = name.split(AndroidConstants.RE_DOT);
+            String[] packages = name.split(AdtConstants.RE_DOT);
             if (packages.length == 1) {
                 text.setText(name);
             } else {
index 4ddb1e9..a06d7be 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.menu;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor.Mandatory;
@@ -42,7 +42,7 @@ import javax.xml.xpath.XPathExpressionException;
  */
 public class MenuEditor extends AndroidXmlEditor {
 
-    public static final String ID = AndroidConstants.EDITORS_NAMESPACE + ".menu.MenuEditor"; //$NON-NLS-1$
+    public static final String ID = AdtConstants.EDITORS_NAMESPACE + ".menu.MenuEditor"; //$NON-NLS-1$
 
     /** Root node of the UI element hierarchy */
     private UiElementNode mUiRootNode;
index 79d11ed..53ea513 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.resources;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.resources.descriptors.ResourcesDescriptors;
@@ -42,7 +42,7 @@ import javax.xml.xpath.XPathExpressionException;
  */
 public class ResourcesEditor extends AndroidXmlEditor {
 
-    public static final String ID = AndroidConstants.EDITORS_NAMESPACE + ".resources.ResourcesEditor"; //$NON-NLS-1$
+    public static final String ID = AdtConstants.EDITORS_NAMESPACE + ".resources.ResourcesEditor"; //$NON-NLS-1$
 
     /** Root node of the UI element hierarchy */
     private UiElementNode mUiResourcesNode;
index 469d184..1456b47 100644 (file)
@@ -21,10 +21,10 @@ import static com.android.ide.common.layout.LayoutConstants.ATTR_CLASS;
 import static com.android.ide.common.layout.LayoutConstants.ATTR_ON_CLICK;
 import static com.android.ide.common.layout.LayoutConstants.NEW_ID_PREFIX;
 import static com.android.ide.common.layout.LayoutConstants.VIEW;
-import static com.android.ide.eclipse.adt.AndroidConstants.ANDROID_PKG;
-import static com.android.ide.eclipse.adt.AndroidConstants.EXT_XML;
-import static com.android.ide.eclipse.adt.AndroidConstants.FN_RESOURCE_BASE;
-import static com.android.ide.eclipse.adt.AndroidConstants.FN_RESOURCE_CLASS;
+import static com.android.ide.eclipse.adt.AdtConstants.ANDROID_PKG;
+import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.FN_RESOURCE_BASE;
+import static com.android.ide.eclipse.adt.AdtConstants.FN_RESOURCE_CLASS;
 import static com.android.ide.eclipse.adt.internal.editors.resources.descriptors.ResourcesDescriptors.NAME_ATTR;
 import static com.android.ide.eclipse.adt.internal.editors.resources.descriptors.ResourcesDescriptors.ROOT_ELEMENT;
 import static com.android.sdklib.SdkConstants.FD_DOCS;
index 177cb14..6ec52f1 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.editors.xml;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.FirstElementParser;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor;
@@ -41,7 +41,7 @@ import org.w3c.dom.Document;
  */
 public class XmlEditor extends AndroidXmlEditor {
 
-    public static final String ID = AndroidConstants.EDITORS_NAMESPACE + ".xml.XmlEditor"; //$NON-NLS-1$
+    public static final String ID = AdtConstants.EDITORS_NAMESPACE + ".xml.XmlEditor"; //$NON-NLS-1$
 
     /** Root node of the UI element hierarchy */
     private UiDocumentNode mUiRootNode;
index cbfcb24..442d356 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.launch;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.runtime.CoreException;
@@ -149,7 +149,7 @@ public class JUnitLaunchConfigDelegate extends JUnitLaunchConfigurationDelegate
         if (bundle == null) {
             throw new IOException("Cannot find org.junit bundle");
         }
-        URL jarUrl = bundle.getEntry(AndroidConstants.WS_SEP + JUNIT_JAR);
+        URL jarUrl = bundle.getEntry(AdtConstants.WS_SEP + JUNIT_JAR);
         return FileLocator.resolve(jarUrl).getFile();
     }
 }
index e747e7e..6364dcd 100644 (file)
@@ -18,7 +18,7 @@ package com.android.ide.eclipse.adt.internal.launch;
 
 import com.android.ddmlib.AndroidDebugBridge;
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode;
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
 import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
@@ -380,7 +380,7 @@ public class LaunchConfigDelegate extends LaunchConfigurationDelegate {
             return false;
         }
 
-        if (project.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+        if (project.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
             String msg = String.format("%1$s is not an Android project!", project.getName());
             AdtPlugin.displayError("Android Launch", msg);
             return false;
index 1f14605..2384f3b 100755 (executable)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.launch.junit;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.launch.AndroidLaunch;
 import com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration;
 import com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController;
@@ -188,7 +188,7 @@ public class AndroidJUnitLaunchConfigDelegate extends LaunchConfigDelegate {
                     LaunchMessages.AndroidJUnitDelegate_NoRunnerConsoleMsg_4s,
                     project.getName(),
                     SdkConstants.CLASS_INSTRUMENTATION_RUNNER,
-                    AndroidConstants.LIBRARY_TEST_RUNNER,
+                    AdtConstants.LIBRARY_TEST_RUNNER,
                     SdkConstants.FN_ANDROID_MANIFEST_XML));
             return null;
         } catch (CoreException e) {
index e5957d7..51db066 100644 (file)
@@ -16,7 +16,7 @@
 package com.android.ide.eclipse.adt.internal.launch.junit;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.IconFactory;
 import com.android.ide.eclipse.adt.internal.launch.LaunchMessages;
 import com.android.ide.eclipse.adt.internal.launch.MainLaunchConfigTab;
@@ -659,7 +659,7 @@ public class AndroidJUnitLaunchConfigurationTab extends AbstractLaunchConfigurat
         validateJavaProject(javaProject);
 
         try {
-            if (!project.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+            if (!project.hasNature(AdtConstants.NATURE_DEFAULT)) {
                 setErrorMessage(
                         LaunchMessages.NonAndroidProjectError);
                 return;
index bb75bcc..3234b38 100644 (file)
@@ -15,7 +15,7 @@
  */
 package com.android.ide.eclipse.adt.internal.launch.junit;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.launch.LaunchMessages;
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
 import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
@@ -88,7 +88,7 @@ class InstrumentationRunnerValidator {
      */
     private boolean hasTestRunnerLibrary(ManifestData manifestData) {
        for (UsesLibrary lib : manifestData.getUsesLibraries()) {
-           if (AndroidConstants.LIBRARY_TEST_RUNNER.equals(lib.getName())) {
+           if (AdtConstants.LIBRARY_TEST_RUNNER.equals(lib.getName())) {
                return true;
            }
        }
@@ -130,7 +130,7 @@ class InstrumentationRunnerValidator {
     String validateInstrumentationRunner(String instrumentation) {
         if (!mHasRunnerLibrary) {
             return String.format(LaunchMessages.InstrValidator_NoTestLibMsg_s,
-                    AndroidConstants.LIBRARY_TEST_RUNNER);
+                    AdtConstants.LIBRARY_TEST_RUNNER);
         }
         // check if this instrumentation is the standard test runner
         if (!instrumentation.equals(SdkConstants.CLASS_INSTRUMENTATION_RUNNER)) {
index c5f1fff..9ae60c0 100644 (file)
@@ -18,7 +18,7 @@ package com.android.ide.eclipse.adt.internal.project;
 
 import com.android.ide.common.sdk.LoadStatus;
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.sdk.ProjectState;
 import com.android.ide.eclipse.adt.internal.sdk.Sdk;
 import com.android.sdklib.AndroidVersion;
@@ -295,7 +295,7 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
                 }
 
                 try {
-                    BaseProjectHelper.markProject(iProject, AndroidConstants.MARKER_TARGET,
+                    BaseProjectHelper.markProject(iProject, AdtConstants.MARKER_TARGET,
                             markerMessage, IMarker.SEVERITY_ERROR, IMarker.PRIORITY_HIGH);
                 } catch (CoreException e) {
                     // In some cases, the workspace may be locked for modification when we
@@ -307,7 +307,7 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
                         protected IStatus run(IProgressMonitor monitor) {
                             try {
                                 BaseProjectHelper.markProject(iProject,
-                                        AndroidConstants.MARKER_TARGET,
+                                        AdtConstants.MARKER_TARGET,
                                         fmessage, IMarker.SEVERITY_ERROR,
                                         IMarker.PRIORITY_HIGH);
                             } catch (CoreException e2) {
@@ -326,7 +326,7 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
                 // no error, remove potential MARKER_TARGETs.
                 try {
                     if (iProject.exists()) {
-                        iProject.deleteMarkers(AndroidConstants.MARKER_TARGET, true,
+                        iProject.deleteMarkers(AdtConstants.MARKER_TARGET, true,
                                 IResource.DEPTH_INFINITE);
                     }
                 } catch (CoreException ce) {
@@ -336,7 +336,7 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
                         @Override
                         protected IStatus run(IProgressMonitor monitor) {
                             try {
-                                iProject.deleteMarkers(AndroidConstants.MARKER_TARGET, true,
+                                iProject.deleteMarkers(AdtConstants.MARKER_TARGET, true,
                                         IResource.DEPTH_INFINITE);
                             } catch (CoreException e2) {
                                 return e2.getStatus();
index 5e05c99..dddc7a0 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.project;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder;
 import com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder;
 import com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder;
@@ -127,7 +127,7 @@ public class AndroidNature implements IProjectNature {
         // Adding the java nature after the android one, would place the java builder before the
         // android builders.
         addNatureToProjectDescription(project, JavaCore.NATURE_ID, monitor);
-        addNatureToProjectDescription(project, AndroidConstants.NATURE_DEFAULT, monitor);
+        addNatureToProjectDescription(project, AdtConstants.NATURE_DEFAULT, monitor);
     }
 
     /**
@@ -151,7 +151,7 @@ public class AndroidNature implements IProjectNature {
             String[] newNatures = new String[natures.length + 1];
 
             // Android natures always come first.
-            if (natureId.equals(AndroidConstants.NATURE_DEFAULT)) {
+            if (natureId.equals(AdtConstants.NATURE_DEFAULT)) {
                 System.arraycopy(natures, 0, newNatures, 1, natures.length);
                 newNatures[0] = natureId;
             } else {
index 6485f96..7d00830 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.project;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IMarker;
@@ -402,7 +402,7 @@ public final class BaseProjectHelper {
 
             // check if it's an android project based on its nature
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT)) {
                     if (filter == null || filter.accept(project)) {
                         androidProjectList.add(javaProject);
                     }
index 3b0622a..3d0e088 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.project;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.AndroidPrintStream;
 import com.android.ide.eclipse.adt.internal.build.BuildHelper;
 import com.android.ide.eclipse.adt.internal.build.DexException;
@@ -124,7 +124,7 @@ public final class ExportHelper {
 
             // tmp file for the packaged resource file. To not disturb the incremental builders
             // output, all intermediary files are created in tmp files.
-            File resourceFile = File.createTempFile(TEMP_PREFIX, AndroidConstants.DOT_RES);
+            File resourceFile = File.createTempFile(TEMP_PREFIX, AdtConstants.DOT_RES);
             resourceFile.deleteOnExit();
 
             // package the resources.
@@ -139,7 +139,7 @@ public final class ExportHelper {
             // Step 2. Convert the byte code to Dalvik bytecode
 
             // tmp file for the packaged resource file.
-            File dexFile = File.createTempFile(TEMP_PREFIX, AndroidConstants.DOT_DEX);
+            File dexFile = File.createTempFile(TEMP_PREFIX, AdtConstants.DOT_DEX);
             dexFile.deleteOnExit();
 
             ProjectState state = Sdk.getProjectState(project);
@@ -163,7 +163,7 @@ public final class ExportHelper {
                 String[] projectOutputs = helper.getProjectOutputs();
 
                 // create a jar from the output of these projects
-                File inputJar = File.createTempFile(TEMP_PREFIX, AndroidConstants.DOT_JAR);
+                File inputJar = File.createTempFile(TEMP_PREFIX, AdtConstants.DOT_JAR);
                 inputJar.deleteOnExit();
 
                 JarOutputStream jos = new JarOutputStream(new FileOutputStream(inputJar));
@@ -180,7 +180,7 @@ public final class ExportHelper {
                         null /*resourceMarker*/);
 
                 // destination file for proguard
-                File obfuscatedJar = File.createTempFile(TEMP_PREFIX, AndroidConstants.DOT_JAR);
+                File obfuscatedJar = File.createTempFile(TEMP_PREFIX, AdtConstants.DOT_JAR);
                 obfuscatedJar.deleteOnExit();
 
                 // run proguard
@@ -274,7 +274,7 @@ public final class ExportHelper {
             IPath binLocation = outputFolder.getLocation();
 
             // make the full path to the package
-            String fileName = project.getName() + AndroidConstants.DOT_ANDROID_PACKAGE;
+            String fileName = project.getName() + AdtConstants.DOT_ANDROID_PACKAGE;
 
             File file = new File(binLocation.toOSString() + File.separator + fileName);
 
@@ -348,7 +348,7 @@ public final class ExportHelper {
         } else if (file.isFile()) {
             // check the extension
             String name = file.getName();
-            if (name.toLowerCase().endsWith(AndroidConstants.DOT_CLASS) == false) {
+            if (name.toLowerCase().endsWith(AdtConstants.DOT_CLASS) == false) {
                 return;
             }
 
index 7ca244c..394338b 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.project;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.sdk.Sdk;
 import com.android.sdklib.SdkConstants;
 
@@ -54,7 +54,7 @@ public class FolderDecorator implements ILightweightLabelDecorator {
             }
 
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT)) {
                     // check the folder is directly under the project.
                     if (folder.getParent().getType() == IResource.PROJECT) {
                         String name = folder.getName();
index 91e2380..ca988a2 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.project;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.sdklib.SdkConstants;
 import com.android.sdklib.xml.ManifestData;
 
@@ -116,11 +116,11 @@ public final class ProjectHelper {
     public static String getJavaDocPath(String javaDocOSLocation) {
         // first thing we do is convert the \ into /
         String javaDoc = javaDocOSLocation.replaceAll("\\\\", //$NON-NLS-1$
-                AndroidConstants.WS_SEP);
+                AdtConstants.WS_SEP);
 
         // then we add file: at the beginning for unix path, and file:/ for non
         // unix path
-        if (javaDoc.startsWith(AndroidConstants.WS_SEP)) {
+        if (javaDoc.startsWith(AdtConstants.WS_SEP)) {
             return "file:" + javaDoc; //$NON-NLS-1$
         }
 
@@ -365,11 +365,11 @@ public final class ProjectHelper {
         if (checkCompilerCompliance(javaProject) != COMPILER_COMPLIANCE_OK) {
             // setup the preferred compiler compliance level.
             javaProject.setOption(JavaCore.COMPILER_COMPLIANCE,
-                    AndroidConstants.COMPILER_COMPLIANCE_PREFERRED);
+                    AdtConstants.COMPILER_COMPLIANCE_PREFERRED);
             javaProject.setOption(JavaCore.COMPILER_SOURCE,
-                    AndroidConstants.COMPILER_COMPLIANCE_PREFERRED);
+                    AdtConstants.COMPILER_COMPLIANCE_PREFERRED);
             javaProject.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM,
-                    AndroidConstants.COMPILER_COMPLIANCE_PREFERRED);
+                    AdtConstants.COMPILER_COMPLIANCE_PREFERRED);
 
             // clean the project to make sure we recompile
             try {
@@ -402,7 +402,7 @@ public final class ProjectHelper {
         for (IProject p : projects) {
             if (p.isOpen()) {
                 try {
-                    if (p.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                    if (p.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                         // ignore non android projects
                         continue;
                     }
@@ -451,16 +451,16 @@ public final class ProjectHelper {
         String[] natures = description.getNatureIds();
 
         // if the android nature is not the first one, we reorder them
-        if (AndroidConstants.NATURE_DEFAULT.equals(natures[0]) == false) {
+        if (AdtConstants.NATURE_DEFAULT.equals(natures[0]) == false) {
             // look for the index
             for (int i = 0 ; i < natures.length ; i++) {
-                if (AndroidConstants.NATURE_DEFAULT.equals(natures[i])) {
+                if (AdtConstants.NATURE_DEFAULT.equals(natures[i])) {
                     // if we try to just reorder the array in one pass, this doesn't do
                     // anything. I guess JDT check that we are actually adding/removing nature.
                     // So, first we'll remove the android nature, and then add it back.
 
                     // remove the android nature
-                    removeNature(project, AndroidConstants.NATURE_DEFAULT);
+                    removeNature(project, AdtConstants.NATURE_DEFAULT);
 
                     // now add it back at the first index.
                     description = project.getDescription();
@@ -469,7 +469,7 @@ public final class ProjectHelper {
                     String[] newNatures = new String[natures.length + 1];
 
                     // first one is android
-                    newNatures[0] = AndroidConstants.NATURE_DEFAULT;
+                    newNatures[0] = AdtConstants.NATURE_DEFAULT;
 
                     // next the rest that was before the android nature
                     System.arraycopy(natures, 0, newNatures, 1, natures.length);
@@ -675,7 +675,7 @@ public final class ProjectHelper {
      * @return true if the option value is supproted.
      */
     private static boolean checkCompliance(String optionValue) {
-        for (String s : AndroidConstants.COMPILER_COMPLIANCE) {
+        for (String s : AdtConstants.COMPILER_COMPLIANCE) {
             if (s != null && s.equals(optionValue)) {
                 return true;
             }
@@ -691,10 +691,10 @@ public final class ProjectHelper {
      */
     public static String getApkFilename(IProject project, String config) {
         if (config != null) {
-            return project.getName() + "-" + config + AndroidConstants.DOT_ANDROID_PACKAGE; //$NON-NLS-1$
+            return project.getName() + "-" + config + AdtConstants.DOT_ANDROID_PACKAGE; //$NON-NLS-1$
         }
 
-        return project.getName() + AndroidConstants.DOT_ANDROID_PACKAGE;
+        return project.getName() + AdtConstants.DOT_ANDROID_PACKAGE;
     }
 
     /**
@@ -718,7 +718,7 @@ public final class ProjectHelper {
 
             //Verify that the project has also the Android Nature
             try {
-                if (!androidJavaProject.getProject().hasNature(AndroidConstants.NATURE_DEFAULT)) {
+                if (!androidJavaProject.getProject().hasNature(AdtConstants.NATURE_DEFAULT)) {
                     continue;
                 }
             } catch (CoreException e) {
@@ -750,7 +750,7 @@ public final class ProjectHelper {
 
 
         // get the package path
-        String packageName = project.getName() + AndroidConstants.DOT_ANDROID_PACKAGE;
+        String packageName = project.getName() + AdtConstants.DOT_ANDROID_PACKAGE;
         IResource r = outputLocation.findMember(packageName);
 
         // check the package is present
@@ -772,7 +772,7 @@ public final class ProjectHelper {
      *         is missing.
      */
     public static IFile getManifest(IProject project) {
-        IResource r = project.findMember(AndroidConstants.WS_SEP
+        IResource r = project.findMember(AdtConstants.WS_SEP
                 + SdkConstants.FN_ANDROID_MANIFEST_XML);
 
         if (r == null || r.exists() == false || (r instanceof IFile) == false) {
index d5f6f15..7cd0161 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.project;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.sdklib.xml.AndroidManifestParser.ManifestErrorHandler;
 
 import org.eclipse.core.resources.IFile;
@@ -97,7 +97,7 @@ public class XmlErrorHandler extends DefaultHandler implements ManifestErrorHand
     public void warning(SAXParseException exception) throws SAXException {
         if (mFile != null) {
             BaseProjectHelper.markResource(mFile,
-                    AndroidConstants.MARKER_XML,
+                    AdtConstants.MARKER_XML,
                     exception.getMessage(),
                     exception.getLineNumber(),
                     IMarker.SEVERITY_WARNING);
@@ -125,7 +125,7 @@ public class XmlErrorHandler extends DefaultHandler implements ManifestErrorHand
 
         if (mFile != null) {
             BaseProjectHelper.markResource(mFile,
-                    AndroidConstants.MARKER_XML,
+                    AdtConstants.MARKER_XML,
                     message,
                     lineNumber,
                     IMarker.SEVERITY_ERROR);
@@ -156,14 +156,14 @@ public class XmlErrorHandler extends DefaultHandler implements ManifestErrorHand
 
             // mark the file
             IMarker marker = BaseProjectHelper.markResource(getFile(),
-                    AndroidConstants.MARKER_ANDROID, result, line, IMarker.SEVERITY_ERROR);
+                    AdtConstants.MARKER_ANDROID, result, line, IMarker.SEVERITY_ERROR);
 
             // add custom attributes to be used by the manifest editor.
             if (marker != null) {
                 try {
-                    marker.setAttribute(AndroidConstants.MARKER_ATTR_TYPE,
-                            AndroidConstants.MARKER_ATTR_TYPE_ACTIVITY);
-                    marker.setAttribute(AndroidConstants.MARKER_ATTR_CLASS, className);
+                    marker.setAttribute(AdtConstants.MARKER_ATTR_TYPE,
+                            AdtConstants.MARKER_ATTR_TYPE_ACTIVITY);
+                    marker.setAttribute(AdtConstants.MARKER_ATTR_CLASS, className);
                 } catch (CoreException e) {
                 }
             }
index 43cb09d..2fbb4a3 100755 (executable)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.refactoring.core;\r
 \r
 import com.android.ide.common.layout.LayoutConstants;\r
-import com.android.ide.eclipse.adt.AndroidConstants;\r
+import com.android.ide.eclipse.adt.AdtConstants;\r
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;\r
 import com.android.ide.eclipse.adt.internal.refactoring.changes.AndroidLayoutChange;\r
 import com.android.ide.eclipse.adt.internal.refactoring.changes.AndroidLayoutChangeDescription;\r
@@ -203,7 +203,7 @@ public class AndroidPackageRenameParticipant extends AndroidRenameParticipant {
                 IJavaProject javaProject = (IJavaProject) mPackageFragment\r
                         .getAncestor(IJavaElement.JAVA_PROJECT);\r
                 IProject project = javaProject.getProject();\r
-                IResource manifestResource = project.findMember(AndroidConstants.WS_SEP\r
+                IResource manifestResource = project.findMember(AdtConstants.WS_SEP\r
                         + SdkConstants.FN_ANDROID_MANIFEST_XML);\r
 \r
                 if (manifestResource == null || !manifestResource.exists()\r
index e7c3e1a..48da579 100755 (executable)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.refactoring.core;\r
 \r
 import com.android.ide.common.layout.LayoutConstants;\r
-import com.android.ide.eclipse.adt.AndroidConstants;\r
+import com.android.ide.eclipse.adt.AdtConstants;\r
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;\r
 import com.android.ide.eclipse.adt.internal.refactoring.changes.AndroidLayoutChange;\r
 import com.android.ide.eclipse.adt.internal.refactoring.changes.AndroidLayoutChangeDescription;\r
@@ -174,7 +174,7 @@ public class AndroidTypeMoveParticipant extends MoveParticipant {
             IType type = (IType) element;\r
             IJavaProject javaProject = (IJavaProject) type.getAncestor(IJavaElement.JAVA_PROJECT);\r
             IProject project = javaProject.getProject();\r
-            IResource manifestResource = project.findMember(AndroidConstants.WS_SEP\r
+            IResource manifestResource = project.findMember(AdtConstants.WS_SEP\r
                     + SdkConstants.FN_ANDROID_MANIFEST_XML);\r
 \r
             if (manifestResource == null || !manifestResource.exists()\r
index dc393e3..53c941a 100755 (executable)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.refactoring.core;\r
 \r
 import com.android.ide.common.layout.LayoutConstants;\r
-import com.android.ide.eclipse.adt.AndroidConstants;\r
+import com.android.ide.eclipse.adt.AdtConstants;\r
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;\r
 import com.android.ide.eclipse.adt.internal.refactoring.changes.AndroidLayoutChange;\r
 import com.android.ide.eclipse.adt.internal.refactoring.changes.AndroidLayoutChangeDescription;\r
@@ -129,7 +129,7 @@ public class AndroidTypeRenameParticipant extends AndroidRenameParticipant {
             IType type = (IType) element;\r
             IJavaProject javaProject = (IJavaProject) type.getAncestor(IJavaElement.JAVA_PROJECT);\r
             IProject project = javaProject.getProject();\r
-            IResource manifestResource = project.findMember(AndroidConstants.WS_SEP\r
+            IResource manifestResource = project.findMember(AdtConstants.WS_SEP\r
                     + SdkConstants.FN_ANDROID_MANIFEST_XML);\r
 \r
             if (manifestResource == null || !manifestResource.exists()\r
index ffa4089..e005f1c 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.refactorings.extractstring;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -165,7 +165,7 @@ public class ExtractStringAction implements IWorkbenchWindowActionDelegate {
                 if (file.exists()) {
                     IProject proj = file.getProject();
                     try {
-                        if (proj != null && proj.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+                        if (proj != null && proj.hasNature(AdtConstants.NATURE_DEFAULT)) {
                             return file;
                         }
                     } catch (CoreException e) {
index 8dab07e..1c5c56c 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.refactorings.extractstring;
 
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration;
 import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType;
 import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector;
@@ -83,10 +83,10 @@ class ExtractStringInputPage extends UserInputWizardPage implements IWizardPage
                                      "/res/[a-z][a-zA-Z0-9_-]+/[^.]+\\.xml");  //$NON-NLS-1$
     /** Absolute destination folder root, e.g. "/res/" */
     private static final String RES_FOLDER_ABS =
-        AndroidConstants.WS_RESOURCES + AndroidConstants.WS_SEP;
+        AdtConstants.WS_RESOURCES + AdtConstants.WS_SEP;
     /** Relative destination folder root, e.g. "res/" */
     private static final String RES_FOLDER_REL =
-        SdkConstants.FD_RESOURCES + AndroidConstants.WS_SEP;
+        SdkConstants.FD_RESOURCES + AdtConstants.WS_SEP;
 
     private static final String DEFAULT_RES_FILE_PATH = "/res/values/strings.xml";  //$NON-NLS-1$
 
@@ -470,7 +470,7 @@ class ExtractStringInputPage extends UserInputWizardPage implements IWizardPage
             mConfigSelector.getConfiguration(mTempConfig);
             StringBuffer sb = new StringBuffer(RES_FOLDER_ABS);
             sb.append(mTempConfig.getFolderName(ResourceFolderType.VALUES));
-            sb.append(AndroidConstants.WS_SEP);
+            sb.append(AdtConstants.WS_SEP);
 
             String newPath = sb.toString();
 
@@ -571,7 +571,7 @@ class ExtractStringInputPage extends UserInputWizardPage implements IWizardPage
             if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {
                 wsFolderPath = wsFolderPath.substring(RES_FOLDER_ABS.length());
 
-                int pos = wsFolderPath.indexOf(AndroidConstants.WS_SEP_CHAR);
+                int pos = wsFolderPath.indexOf(AdtConstants.WS_SEP_CHAR);
                 if (pos >= 0) {
                     wsFolderPath = wsFolderPath.substring(0, pos);
                 }
index 1a41caf..48a0544 100644 (file)
@@ -18,7 +18,7 @@ package com.android.ide.eclipse.adt.internal.refactorings.extractstring;
 
 import static com.android.ide.common.layout.LayoutConstants.STRING_PREFIX;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.ReferenceAttributeDescriptor;
@@ -424,7 +424,7 @@ public class ExtractStringRefactoring extends Refactoring {
             }
 
             // Check this a Layout XML file and get the selection and its context.
-            if (mFile != null && AndroidConstants.EXT_XML.equals(mFile.getFileExtension())) {
+            if (mFile != null && AdtConstants.EXT_XML.equals(mFile.getFileExtension())) {
 
                 // Currently we only support Android resource XML files, so they must have a path
                 // similar to
@@ -1016,7 +1016,7 @@ public class ExtractStringRefactoring extends Refactoring {
                         // Add all /res folders (technically we don't need to process /res/values
                         // XML files that contain resources/string elements, but it's easier to
                         // not filter them out.)
-                        IFolder f = mProject.getFolder(AndroidConstants.WS_RESOURCES);
+                        IFolder f = mProject.getFolder(AdtConstants.WS_RESOURCES);
                         if (f.exists()) {
                             try {
                                 mFolders.addAll(
@@ -1055,7 +1055,7 @@ public class ExtractStringRefactoring extends Refactoring {
                             if (res.exists() && !res.isDerived() && res instanceof IFile) {
                                 IFile file = (IFile) res;
                                 // Must have an XML extension
-                                if (AndroidConstants.EXT_XML.equals(file.getFileExtension())) {
+                                if (AdtConstants.EXT_XML.equals(file.getFileExtension())) {
                                     IPath p = file.getFullPath();
                                     // And not be either paths we want to filter out
                                     if ((mFilterPath1 != null && mFilterPath1.equals(p)) ||
@@ -1101,7 +1101,7 @@ public class ExtractStringRefactoring extends Refactoring {
             SubMonitor monitor) {
 
         TextFileChange xmlChange = new TextFileChange(getName(), targetXml);
-        xmlChange.setTextType(AndroidConstants.EXT_XML);
+        xmlChange.setTextType(AdtConstants.EXT_XML);
 
         String error = "";                  //$NON-NLS-1$
         TextEdit edit = null;
@@ -1478,7 +1478,7 @@ public class ExtractStringRefactoring extends Refactoring {
         HashSet<IFile> files = new HashSet<IFile>();
         files.add(sourceFile);
 
-        if (allConfigurations && AndroidConstants.EXT_XML.equals(sourceFile.getFileExtension())) {
+        if (allConfigurations && AdtConstants.EXT_XML.equals(sourceFile.getFileExtension())) {
             IPath path = sourceFile.getFullPath();
             if (path.segmentCount() == 4 && path.segment(1).equals(SdkConstants.FD_RESOURCES)) {
                 IProject project = sourceFile.getProject();
index 9097f97..3df35bc 100755 (executable)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.refactorings.renamepackage;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor;
 import com.android.sdklib.SdkConstants;
 import com.android.sdklib.xml.AndroidManifest;
@@ -153,7 +153,7 @@ class ApplicationPackageNameRefactoring extends Refactoring {
 
             ImportRewrite irw = ImportRewrite.create(cu, true);
             irw.addImport(mNewPackageName.getFullyQualifiedName() + '.'
-                    + AndroidConstants.FN_RESOURCE_BASE);
+                    + AdtConstants.FN_RESOURCE_BASE);
 
             try {
                 rewrittenImports.addChild( irw.rewriteImports(null) );
@@ -210,14 +210,14 @@ class ApplicationPackageNameRefactoring extends Refactoring {
         }
 
         TextFileChange xmlChange = new TextFileChange("XML resource file edit", file);
-        xmlChange.setTextType(AndroidConstants.EXT_XML);
+        xmlChange.setTextType(AdtConstants.EXT_XML);
 
         MultiTextEdit multiEdit = new MultiTextEdit();
         ArrayList<TextEditGroup> editGroups = new ArrayList<TextEditGroup>();
 
-        final String oldAppNamespaceString = String.format(AndroidConstants.NS_CUSTOM_RESOURCES,
+        final String oldAppNamespaceString = String.format(AdtConstants.NS_CUSTOM_RESOURCES,
                 mOldPackageName.getFullyQualifiedName());
-        final String newAppNamespaceString = String.format(AndroidConstants.NS_CUSTOM_RESOURCES,
+        final String newAppNamespaceString = String.format(AdtConstants.NS_CUSTOM_RESOURCES,
                 mNewPackageName.getFullyQualifiedName());
 
         // Prepare the change set
@@ -301,7 +301,7 @@ class ApplicationPackageNameRefactoring extends Refactoring {
         }
 
         TextFileChange xmlChange = new TextFileChange("Make Manifest edits", file);
-        xmlChange.setTextType(AndroidConstants.EXT_XML);
+        xmlChange.setTextType(AdtConstants.EXT_XML);
 
         MultiTextEdit multiEdit = new MultiTextEdit();
         ArrayList<TextEditGroup> editGroups = new ArrayList<TextEditGroup>();
@@ -417,7 +417,7 @@ class ApplicationPackageNameRefactoring extends Refactoring {
         public boolean visit(IResource resource) throws CoreException {
             if (resource instanceof IFile) {
                 IFile file = (IFile) resource;
-                if (AndroidConstants.EXT_JAVA.equals(file.getFileExtension())) {
+                if (AdtConstants.EXT_JAVA.equals(file.getFileExtension())) {
 
                     ICompilationUnit icu = JavaCore.createCompilationUnitFrom(file);
 
@@ -430,7 +430,7 @@ class ApplicationPackageNameRefactoring extends Refactoring {
                         edit.addChild(text_edit);
 
                         TextFileChange text_file_change = new TextFileChange(file.getName(), file);
-                        text_file_change.setTextType(AndroidConstants.EXT_JAVA);
+                        text_file_change.setTextType(AdtConstants.EXT_JAVA);
                         text_file_change.setEdit(edit);
                         mChanges.add(text_file_change);
                     }
@@ -438,7 +438,7 @@ class ApplicationPackageNameRefactoring extends Refactoring {
                     // XXX Partially taken from ExtractStringRefactoring.java
                     // Check this a Layout XML file and get the selection and
                     // its context.
-                } else if (AndroidConstants.EXT_XML.equals(file.getFileExtension())) {
+                } else if (AdtConstants.EXT_XML.equals(file.getFileExtension())) {
 
                     if (SdkConstants.FN_ANDROID_MANIFEST_XML.equals(file.getName())) {
 
@@ -510,7 +510,7 @@ class ApplicationPackageNameRefactoring extends Refactoring {
                 QualifiedName qualifiedImportName = (QualifiedName) importName;
 
                 if (qualifiedImportName.getName().getIdentifier()
-                        .equals(AndroidConstants.FN_RESOURCE_BASE)) {
+                        .equals(AdtConstants.FN_RESOURCE_BASE)) {
                     mRewriter.replace(qualifiedImportName.getQualifier(), mNewPackageName,
                             null);
                 }
index 2ef0beb..fd8ad9e 100644 (file)
 
 package com.android.ide.eclipse.adt.internal.resources;
 
-import static com.android.ide.eclipse.adt.AndroidConstants.DOT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.DOT_XML;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship;
 import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem;
 import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
@@ -70,7 +70,7 @@ public class ResourceNameValidator implements IInputValidator {
                 newText = newText.substring(0, newText.length() - DOT_XML.length());
             }
 
-            if (newText.indexOf('.') != -1 && !newText.endsWith(AndroidConstants.DOT_XML)) {
+            if (newText.indexOf('.') != -1 && !newText.endsWith(AdtConstants.DOT_XML)) {
                 return String.format("The filename must end with %1$s.", DOT_XML);
             }
 
index 295fd4c..467fad0 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.resources.manager;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
 import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
 import com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor.IFileListener;
@@ -77,7 +77,7 @@ public final class CompiledResourcesMonitor implements IFileListener, IProjectLi
      * @see IFileListener#fileChanged
      */
     public void fileChanged(IFile file, IMarkerDelta[] markerDeltas, int kind) {
-        if (file.getName().equals(AndroidConstants.FN_COMPILED_RESOURCE_CLASS)) {
+        if (file.getName().equals(AdtConstants.FN_COMPILED_RESOURCE_CLASS)) {
             loadAndParseRClass(file.getProject());
         }
     }
@@ -115,7 +115,7 @@ public final class CompiledResourcesMonitor implements IFileListener, IProjectLi
     public void projectOpenedWithWorkspace(IProject project) {
         try {
             // check this is an android project
-            if (project.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+            if (project.hasNature(AdtConstants.NATURE_DEFAULT)) {
                 loadAndParseRClass(project);
             }
         } catch (CoreException e) {
index 0deb89c..dc543b8 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.resources.manager;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.BuildHelper;
 import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
 
@@ -262,7 +262,7 @@ public final class ProjectClassLoader extends ClassLoader {
                     IPath path = e.getPath();
 
                     // check the name ends with .jar
-                    if (AndroidConstants.EXT_JAR.equalsIgnoreCase(path.getFileExtension())) {
+                    if (AdtConstants.EXT_JAR.equalsIgnoreCase(path.getFileExtension())) {
                         boolean local = false;
                         IResource resource = wsRoot.findMember(path);
                         if (resource != null && resource.exists() &&
index 8037d7a..9293f33 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.resources.manager;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration;
 import com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier;
 import com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor.IFileListener;
@@ -167,7 +167,7 @@ public final class ResourceManager {
             final IProject project = folder.getProject();
 
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                     return;
                 }
             } catch (CoreException e) {
@@ -256,7 +256,7 @@ public final class ResourceManager {
             final IProject project = file.getProject();
 
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                     return;
                 }
             } catch (CoreException e) {
@@ -481,7 +481,7 @@ public final class ResourceManager {
     private void createProject(IProject project) {
         if (project.isOpen()) {
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                     return;
                 }
             } catch (CoreException e1) {
index 3bb125a..807acfc 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.sdk;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SubMonitor;
@@ -155,7 +155,7 @@ public class AndroidJarLoader extends ClassLoader implements IAndroidClassLoader
             // get the name of the entry.
             String entryPath = entry.getName();
             
-            if (!entryPath.endsWith(AndroidConstants.DOT_CLASS)) {
+            if (!entryPath.endsWith(AdtConstants.DOT_CLASS)) {
                 // only accept class files
                 continue;
             }
@@ -219,7 +219,7 @@ public class AndroidJarLoader extends ClassLoader implements IAndroidClassLoader
         while ((entry = zis.getNextEntry()) != null) {
             // get the name of the entry and convert to a class binary name
             String entryPath = entry.getName();
-            if (!entryPath.endsWith(AndroidConstants.DOT_CLASS)) {
+            if (!entryPath.endsWith(AdtConstants.DOT_CLASS)) {
                 // only accept class files
                 continue;
             }
@@ -341,7 +341,7 @@ public class AndroidJarLoader extends ClassLoader implements IAndroidClassLoader
         
         // The name is a binary name. Something like "android.R", or "android.R$id".
         // Make a path out of it.
-        String entryName = className.replaceAll("\\.", "/") + AndroidConstants.DOT_CLASS; //$NON-NLS-1$ //$NON-NLS-2$
+        String entryName = className.replaceAll("\\.", "/") + AdtConstants.DOT_CLASS; //$NON-NLS-1$ //$NON-NLS-2$
 
        // create streams to read the intermediary archive
         FileInputStream fis = new FileInputStream(mOsFrameworkLocation);
index aa22ff4..8d3ee7b 100644 (file)
@@ -20,7 +20,7 @@ import com.android.ddmlib.IDevice;
 import com.android.ide.common.rendering.LayoutLibrary;
 import com.android.ide.common.sdk.LoadStatus;
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.build.DexWrapper;
 import com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer;
 import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
@@ -743,7 +743,7 @@ public final class Sdk  {
 
         private void onProjectRemoved(IProject project, boolean deleted) {
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                     return;
                 }
             } catch (CoreException e) {
@@ -830,7 +830,7 @@ public final class Sdk  {
 
         private void onProjectOpened(final IProject openedProject) {
             try {
-                if (openedProject.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                if (openedProject.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                     return;
                 }
             } catch (CoreException e) {
@@ -897,7 +897,7 @@ public final class Sdk  {
 
         public void projectRenamed(IProject project, IPath from) {
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                     return;
                 }
             } catch (CoreException e) {
@@ -964,7 +964,7 @@ public final class Sdk  {
                     // the target.
                     IProject iProject = file.getProject();
 
-                    if (iProject.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                    if (iProject.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                         return;
                     }
 
index e27ea5b..2c0ac44 100644 (file)
@@ -16,8 +16,8 @@
 
 package com.android.ide.eclipse.adt.internal.ui;
 
-import static com.android.ide.eclipse.adt.AndroidConstants.EXT_XML;
-import static com.android.ide.eclipse.adt.AndroidConstants.WS_SEP;
+import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML;
+import static com.android.ide.eclipse.adt.AdtConstants.WS_SEP;
 import static com.android.ide.eclipse.adt.internal.editors.resources.descriptors.ResourcesDescriptors.NAME_ATTR;
 import static com.android.sdklib.SdkConstants.FD_RESOURCES;
 import static com.android.sdklib.SdkConstants.FD_VALUES;
index 45880ca..081b6b6 100644 (file)
@@ -17,7 +17,7 @@
 package com.android.ide.eclipse.adt.internal.ui;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem;
 import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
 import com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile;
@@ -76,9 +76,9 @@ public class ResourceExplorerView extends ViewPart implements ISelectionListener
     // Note: keep using the obsolete AndroidConstants.EDITORS_NAMESPACE (which used
     // to be the Editors Plugin ID) to keep existing preferences functional.
     private final static String PREFS_COLUMN_RES =
-        AndroidConstants.EDITORS_NAMESPACE + "ResourceExplorer.Col1"; //$NON-NLS-1$
+        AdtConstants.EDITORS_NAMESPACE + "ResourceExplorer.Col1"; //$NON-NLS-1$
     private final static String PREFS_COLUMN_2 =
-        AndroidConstants.EDITORS_NAMESPACE + "ResourceExplorer.Col2"; //$NON-NLS-1$
+        AdtConstants.EDITORS_NAMESPACE + "ResourceExplorer.Col2"; //$NON-NLS-1$
 
     private Tree mTree;
     private TreeViewer mTreeViewer;
@@ -240,7 +240,7 @@ public class ResourceExplorerView extends ViewPart implements ISelectionListener
         try {
             // if it's an android project, then we get its resources, and feed them
             // to the tree viewer.
-            if (project.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+            if (project.hasNature(AdtConstants.NATURE_DEFAULT)) {
                 if (mCurrentProject != project) {
                     ProjectResources projRes = ResourceManager.getInstance().getProjectResources(
                             project);
index 052fc50..3326c6f 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.ide.eclipse.adt.internal.wizards.export;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.IconFactory;
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
 import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
@@ -160,7 +160,7 @@ final class ProjectCheckPage extends ExportWizardPage {
             mHasMessage = true;
         } else {
             try {
-                if (project.hasNature(AndroidConstants.NATURE_DEFAULT) == false) {
+                if (project.hasNature(AdtConstants.NATURE_DEFAULT) == false) {
                     addError(mErrorComposite, "Project is not an Android project.");
                 } else {
                     // check for errors
@@ -173,7 +173,7 @@ final class ProjectCheckPage extends ExportWizardPage {
                     if (outputIFolder != null) {
                         String outputOsPath =  outputIFolder.getLocation().toOSString();
                         String apkFilePath =  outputOsPath + File.separator + project.getName() +
-                                AndroidConstants.DOT_ANDROID_PACKAGE;
+                                AdtConstants.DOT_ANDROID_PACKAGE;
 
                         File f = new File(apkFilePath);
                         if (f.isFile() == false) {
@@ -181,7 +181,7 @@ final class ProjectCheckPage extends ExportWizardPage {
                                     String.format("%1$s/%2$s/%1$s%3$s does not exists!",
                                             project.getName(),
                                             outputIFolder.getName(),
-                                            AndroidConstants.DOT_ANDROID_PACKAGE));
+                                            AdtConstants.DOT_ANDROID_PACKAGE));
                         }
                     } else {
                         addError(mErrorComposite,
index 027b94e..195c41f 100644 (file)
@@ -23,7 +23,7 @@
 package com.android.ide.eclipse.adt.internal.wizards.newproject;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
 import com.android.ide.eclipse.adt.internal.sdk.Sdk;
 import com.android.ide.eclipse.adt.internal.sdk.Sdk.ITargetChangeListener;
@@ -1063,7 +1063,7 @@ public class NewProjectCreationPage extends WizardPage {
             // name as a default. If the activity name has dots, it's a part of a
             // package specification and only the last identifier must be used.
             if (activityName.indexOf('.') != -1) {
-                String[] ids = activityName.split(AndroidConstants.RE_DOT);
+                String[] ids = activityName.split(AdtConstants.RE_DOT);
                 activityName = ids[ids.length - 1];
             }
             if (mProjectNameField.getText().length() == 0 || !mProjectNameModifiedByUser) {
@@ -1611,7 +1611,7 @@ public class NewProjectCreationPage extends WizardPage {
         } else if (osTarget.indexOf('.') == 0) {
             osTarget = mInfo.getPackageName() + osTarget;
         }
-        osTarget = osTarget.replace('.', File.separatorChar) + AndroidConstants.DOT_JAVA;
+        osTarget = osTarget.replace('.', File.separatorChar) + AdtConstants.DOT_JAVA;
 
         String projectPath = getProjectLocation();
         File projectDir = new File(projectPath);
index 19118dd..ebccf25 100644 (file)
@@ -18,7 +18,7 @@ package com.android.ide.eclipse.adt.internal.wizards.newproject;
 
 import com.android.ide.common.layout.LayoutConstants;
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.project.AndroidNature;
 import com.android.ide.eclipse.adt.internal.project.ProjectHelper;
 import com.android.ide.eclipse.adt.internal.sdk.Sdk;
@@ -134,25 +134,25 @@ public class NewProjectWizard extends Wizard implements INewWizard {
     private static final String PH_TEST_INSTRUMENTATION = "TEST-INSTRUMENTATION";   //$NON-NLS-1$
 
     private static final String BIN_DIRECTORY =
-        SdkConstants.FD_OUTPUT + AndroidConstants.WS_SEP;
+        SdkConstants.FD_OUTPUT + AdtConstants.WS_SEP;
     private static final String RES_DIRECTORY =
-        SdkConstants.FD_RESOURCES + AndroidConstants.WS_SEP;
+        SdkConstants.FD_RESOURCES + AdtConstants.WS_SEP;
     private static final String ASSETS_DIRECTORY =
-        SdkConstants.FD_ASSETS + AndroidConstants.WS_SEP;
+        SdkConstants.FD_ASSETS + AdtConstants.WS_SEP;
     private static final String DRAWABLE_DIRECTORY =
-        SdkConstants.FD_DRAWABLE + AndroidConstants.WS_SEP;
+        SdkConstants.FD_DRAWABLE + AdtConstants.WS_SEP;
     private static final String DRAWABLE_HDPI_DIRECTORY =
-        SdkConstants.FD_DRAWABLE + "-" + Density.HIGH.getResourceValue() + AndroidConstants.WS_SEP;   //$NON-NLS-1$
+        SdkConstants.FD_DRAWABLE + "-" + Density.HIGH.getResourceValue() + AdtConstants.WS_SEP;   //$NON-NLS-1$
     private static final String DRAWABLE_MDPI_DIRECTORY =
-        SdkConstants.FD_DRAWABLE + "-" + Density.MEDIUM.getResourceValue() + AndroidConstants.WS_SEP; //$NON-NLS-1$
+        SdkConstants.FD_DRAWABLE + "-" + Density.MEDIUM.getResourceValue() + AdtConstants.WS_SEP; //$NON-NLS-1$
     private static final String DRAWABLE_LDPI_DIRECTORY =
-        SdkConstants.FD_DRAWABLE + "-" + Density.LOW.getResourceValue() + AndroidConstants.WS_SEP;    //$NON-NLS-1$
+        SdkConstants.FD_DRAWABLE + "-" + Density.LOW.getResourceValue() + AdtConstants.WS_SEP;    //$NON-NLS-1$
     private static final String LAYOUT_DIRECTORY =
-        SdkConstants.FD_LAYOUT + AndroidConstants.WS_SEP;
+        SdkConstants.FD_LAYOUT + AdtConstants.WS_SEP;
     private static final String VALUES_DIRECTORY =
-        SdkConstants.FD_VALUES + AndroidConstants.WS_SEP;
+        SdkConstants.FD_VALUES + AdtConstants.WS_SEP;
     private static final String GEN_SRC_DIRECTORY =
-        SdkConstants.FD_GEN_SOURCES + AndroidConstants.WS_SEP;
+        SdkConstants.FD_GEN_SOURCES + AdtConstants.WS_SEP;
 
     private static final String TEMPLATES_DIRECTORY = "templates/"; //$NON-NLS-1$
     private static final String TEMPLATE_MANIFEST = TEMPLATES_DIRECTORY
@@ -661,12 +661,12 @@ public class NewProjectWizard extends Wizard implements INewWizard {
         AndroidNature.setupProjectNatures(project, monitor);
 
         // Create folders in the project if they don't already exist
-        addDefaultDirectories(project, AndroidConstants.WS_ROOT, DEFAULT_DIRECTORIES, monitor);
+        addDefaultDirectories(project, AdtConstants.WS_ROOT, DEFAULT_DIRECTORIES, monitor);
         String[] sourceFolders = new String[] {
                     (String) parameters.get(PARAM_SRC_FOLDER),
                     GEN_SRC_DIRECTORY
                 };
-        addDefaultDirectories(project, AndroidConstants.WS_ROOT, sourceFolders, monitor);
+        addDefaultDirectories(project, AdtConstants.WS_ROOT, sourceFolders, monitor);
 
         // Create the resource folders in the project if they don't already exist.
         if (legacy) {
@@ -891,8 +891,8 @@ public class NewProjectWizard extends Wizard implements INewWizard {
             throws CoreException, IOException {
 
         // create the IFile object and check if the file doesn't already exist.
-        IFile file = project.getFile(RES_DIRECTORY + AndroidConstants.WS_SEP
-                                     + VALUES_DIRECTORY + AndroidConstants.WS_SEP + STRINGS_FILE);
+        IFile file = project.getFile(RES_DIRECTORY + AdtConstants.WS_SEP
+                                     + VALUES_DIRECTORY + AdtConstants.WS_SEP + STRINGS_FILE);
         if (!file.exists()) {
             // get the Strings.xml template
             String stringDefinitionTemplate = AdtPlugin.readEmbeddedTextFile(TEMPLATE_STRINGS);
@@ -944,8 +944,8 @@ public class NewProjectWizard extends Wizard implements INewWizard {
             throws CoreException {
         if (legacy) { // density support
             // do medium density icon only, in the default drawable folder.
-            IFile file = project.getFile(RES_DIRECTORY + AndroidConstants.WS_SEP
-                    + DRAWABLE_DIRECTORY + AndroidConstants.WS_SEP + PROJECT_ICON);
+            IFile file = project.getFile(RES_DIRECTORY + AdtConstants.WS_SEP
+                    + DRAWABLE_DIRECTORY + AdtConstants.WS_SEP + PROJECT_ICON);
             if (!file.exists()) {
                 addFile(file, AdtPlugin.readEmbeddedFile(TEMPLATES_DIRECTORY + ICON_MDPI), monitor);
             }
@@ -954,22 +954,22 @@ public class NewProjectWizard extends Wizard implements INewWizard {
             IFile file;
 
             // high density
-            file = project.getFile(RES_DIRECTORY + AndroidConstants.WS_SEP
-                    + DRAWABLE_HDPI_DIRECTORY + AndroidConstants.WS_SEP + PROJECT_ICON);
+            file = project.getFile(RES_DIRECTORY + AdtConstants.WS_SEP
+                    + DRAWABLE_HDPI_DIRECTORY + AdtConstants.WS_SEP + PROJECT_ICON);
             if (!file.exists()) {
                 addFile(file, AdtPlugin.readEmbeddedFile(TEMPLATES_DIRECTORY + ICON_HDPI), monitor);
             }
 
             // medium density
-            file = project.getFile(RES_DIRECTORY + AndroidConstants.WS_SEP
-                    + DRAWABLE_MDPI_DIRECTORY + AndroidConstants.WS_SEP + PROJECT_ICON);
+            file = project.getFile(RES_DIRECTORY + AdtConstants.WS_SEP
+                    + DRAWABLE_MDPI_DIRECTORY + AdtConstants.WS_SEP + PROJECT_ICON);
             if (!file.exists()) {
                 addFile(file, AdtPlugin.readEmbeddedFile(TEMPLATES_DIRECTORY + ICON_MDPI), monitor);
             }
 
             // low density
-            file = project.getFile(RES_DIRECTORY + AndroidConstants.WS_SEP
-                    + DRAWABLE_LDPI_DIRECTORY + AndroidConstants.WS_SEP + PROJECT_ICON);
+            file = project.getFile(RES_DIRECTORY + AdtConstants.WS_SEP
+                    + DRAWABLE_LDPI_DIRECTORY + AdtConstants.WS_SEP + PROJECT_ICON);
             if (!file.exists()) {
                 addFile(file, AdtPlugin.readEmbeddedFile(TEMPLATES_DIRECTORY + ICON_LDPI), monitor);
             }
@@ -1029,7 +1029,7 @@ public class NewProjectWizard extends Wizard implements INewWizard {
 
                 // Resource class
                 if (lastDotIndex > 0) {
-                    resourcePackageClass = packageName + "." + AndroidConstants.FN_RESOURCE_BASE; //$NON-NLS-1$
+                    resourcePackageClass = packageName + "." + AdtConstants.FN_RESOURCE_BASE; //$NON-NLS-1$
                 }
 
                 // Package name
@@ -1051,7 +1051,7 @@ public class NewProjectWizard extends Wizard implements INewWizard {
             }
         }
 
-        String[] components = packageName.split(AndroidConstants.RE_DOT);
+        String[] components = packageName.split(AdtConstants.RE_DOT);
         for (String component : components) {
             pkgFolder = pkgFolder.getFolder(component);
             if (!pkgFolder.exists()) {
@@ -1062,7 +1062,7 @@ public class NewProjectWizard extends Wizard implements INewWizard {
 
         if (activityName != null) {
             // create the main activity Java file
-            String activityJava = activityName + AndroidConstants.DOT_JAVA;
+            String activityJava = activityName + AdtConstants.DOT_JAVA;
             IFile file = pkgFolder.getFile(activityJava);
             if (!file.exists()) {
                 copyFile(JAVA_ACTIVITY_TEMPLATE, file, java_activity_parameters, monitor);
index aea01b9..1cf41fd 100644 (file)
@@ -18,7 +18,7 @@
 package com.android.ide.eclipse.adt.internal.wizards.newxmlfile;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
 import com.android.ide.eclipse.adt.internal.editors.descriptors.IDescriptorProvider;
@@ -313,9 +313,9 @@ class NewXmlFileCreationPage extends WizardPage {
     final static int NUM_COL = 4;
 
     /** Absolute destination folder root, e.g. "/res/" */
-    private static final String RES_FOLDER_ABS = AndroidConstants.WS_RESOURCES + AndroidConstants.WS_SEP;
+    private static final String RES_FOLDER_ABS = AdtConstants.WS_RESOURCES + AdtConstants.WS_SEP;
     /** Relative destination folder root, e.g. "res/" */
-    private static final String RES_FOLDER_REL = SdkConstants.FD_RESOURCES + AndroidConstants.WS_SEP;
+    private static final String RES_FOLDER_REL = SdkConstants.FD_RESOURCES + AdtConstants.WS_SEP;
 
     private IProject mProject;
     private Text mProjectTextField;
@@ -433,7 +433,7 @@ class NewXmlFileCreationPage extends WizardPage {
         } else {
             fileName = mFileNameTextField.getText().trim();
             if (fileName.length() > 0 && fileName.indexOf('.') == -1) {
-                fileName = fileName + AndroidConstants.DOT_XML;
+                fileName = fileName + AdtConstants.DOT_XML;
             }
         }
 
@@ -755,7 +755,7 @@ class NewXmlFileCreationPage extends WizardPage {
 
                 // Is this an Android project?
                 try {
-                    if (project == null || !project.hasNature(AndroidConstants.NATURE_DEFAULT)) {
+                    if (project == null || !project.hasNature(AdtConstants.NATURE_DEFAULT)) {
                         continue;
                     }
                 } catch (CoreException e) {
@@ -1018,7 +1018,7 @@ class NewXmlFileCreationPage extends WizardPage {
         if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {
             wsFolderPath = wsFolderPath.substring(RES_FOLDER_ABS.length());
 
-            int pos = wsFolderPath.indexOf(AndroidConstants.WS_SEP_CHAR);
+            int pos = wsFolderPath.indexOf(AdtConstants.WS_SEP_CHAR);
             if (pos >= 0) {
                 wsFolderPath = wsFolderPath.substring(0, pos);
             }
index 281170e..6ff02ea 100644 (file)
@@ -15,7 +15,7 @@
  */
 package com.android.ide.eclipse.tests;
 
-import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.AdtConstants;
 
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Platform;
@@ -64,7 +64,7 @@ public class AdtTestData {
             }
         }
 
-        if (mOsRootDataPath.equals(AndroidConstants.WS_SEP)) {
+        if (mOsRootDataPath.equals(AdtConstants.WS_SEP)) {
             sLogger.warning("Resource data not found using class loader!, Defaulting to no path");
         }