diff options
author | Xavier Ducrohet <xav@android.com> | 2013-04-11 04:11:12 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-04-11 04:11:13 +0000 |
commit | 3acbdd3770ccb9cc27174fc52419208463ff480a (patch) | |
tree | b14149edb447008859a8046e6b2a8078ed5745eb /eclipse/plugins | |
parent | 9dd6537e72f54a004bfddcd7d64330f8b63619ae (diff) | |
parent | 30b328462ef1f767a940542db23761d6e5b87c0d (diff) | |
download | sdk-3acbdd3770ccb9cc27174fc52419208463ff480a.zip sdk-3acbdd3770ccb9cc27174fc52419208463ff480a.tar.gz sdk-3acbdd3770ccb9cc27174fc52419208463ff480a.tar.bz2 |
Merge "Update plugin with refactored sdk-common API."
Diffstat (limited to 'eclipse/plugins')
7 files changed, 16 insertions, 12 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java index c77c853..f304065 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ContextPullParser.java @@ -34,7 +34,7 @@ import static com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutMet import com.android.SdkConstants; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.IProjectCallback; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutMetadata; import com.google.common.collect.Maps; @@ -159,7 +159,7 @@ public class ContextPullParser extends KXmlParser implements ILayoutPullParser { } // Handle unicode escapes etc - value = ValueResourceParser.unescapeResourceString(value, false, false); + value = ValueXmlHelper.unescapeResourceString(value, false, false); return value; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java index e8e0d79..8581568 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java @@ -36,7 +36,7 @@ import static com.android.SdkConstants.VIEW_INCLUDE; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.ViewInfo; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors; import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.FragmentMenu; @@ -399,7 +399,7 @@ public class UiElementPullParser extends BasePullParser { } // Handle unicode escapes etc - value = ValueResourceParser.unescapeResourceString(value, false, false); + value = ValueXmlHelper.unescapeResourceString(value, false, false); return value; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java index 7d0f926..db0b096 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/ExtractStringRefactoring.java @@ -20,7 +20,7 @@ import static com.android.SdkConstants.QUOT_ENTITY; import static com.android.SdkConstants.STRING_PREFIX; import com.android.SdkConstants; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.common.xml.ManifestData; import com.android.ide.eclipse.adt.AdtConstants; import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor; @@ -1217,7 +1217,7 @@ public class ExtractStringRefactoring extends Refactoring { IStructuredModel smodel = null; // Single and double quotes must be escaped in the <string>value</string> declaration - tokenString = ValueResourceParser.escapeResourceString(tokenString); + tokenString = ValueXmlHelper.escapeResourceString(tokenString); try { IStructuredDocument sdoc = null; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java index eea9d36..8c8fa29 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewProjectCreator.java @@ -18,12 +18,13 @@ package com.android.ide.eclipse.adt.internal.wizards.newproject; import static com.android.SdkConstants.FN_PROJECT_PROPERTIES; import static com.android.sdklib.internal.project.ProjectProperties.PROPERTY_LIBRARY; + import static org.eclipse.core.resources.IResource.DEPTH_ZERO; import com.android.SdkConstants; import com.android.annotations.NonNull; import com.android.annotations.Nullable; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.common.xml.ManifestData; import com.android.ide.common.xml.XmlFormatStyle; import com.android.ide.eclipse.adt.AdtConstants; @@ -1058,7 +1059,7 @@ public class NewProjectCreator { String value = strings.get(key); // Escape values if necessary - value = ValueResourceParser.escapeResourceString(value); + value = ValueXmlHelper.escapeResourceString(value); // place them in the template String stringDef = stringTemplate.replace(PARAM_STRING_NAME, key); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java index f4f6361..0be37cf 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java @@ -20,8 +20,8 @@ import static com.android.SdkConstants.FD_RES_VALUES; import static com.android.SdkConstants.RES_QUALIFIER_SEP; import com.android.ide.common.rendering.api.ResourceValue; +import com.android.ide.common.res2.ValueXmlHelper; import com.android.ide.common.resources.ResourceItem; -import com.android.ide.common.resources.ValueResourceParser; import com.android.ide.common.resources.configuration.FolderConfiguration; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.AdtUtils; @@ -385,7 +385,7 @@ public class AddTranslationDialog extends Dialog implements ControlListener, Sel sb.append(" <string name=\""); //$NON-NLS-1$ sb.append(key); sb.append("\">"); //$NON-NLS-1$ - sb.append(ValueResourceParser.escapeResourceString(value)); + sb.append(ValueXmlHelper.escapeResourceString(value)); sb.append("</string>\n"); //$NON-NLS-1$ } sb.append("\n</resources>"); //$NON-NLS-1$ diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java index ffcfa3e..2255653 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethod.java @@ -15,7 +15,7 @@ */ package com.android.ide.eclipse.adt.internal.wizards.templates; -import com.android.ide.common.resources.ValueResourceParser; +import com.android.ide.common.res2.ValueXmlHelper; import freemarker.template.SimpleScalar; import freemarker.template.TemplateMethodModel; @@ -38,6 +38,6 @@ public class FmEscapeXmlStringMethod implements TemplateMethodModel { throw new TemplateModelException("Wrong arguments"); } String string = args.get(0).toString(); - return new SimpleScalar(ValueResourceParser.escapeResourceString(string)); + return new SimpleScalar(ValueXmlHelper.escapeResourceString(string)); } }
\ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF index 4d42a1a..fc7fd5c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF @@ -28,9 +28,12 @@ Export-Package: com.android, com.android.annotations, com.android.annotations.concurrency, com.android.dvlib, + com.android.ide.common.internal, + com.android.ide.common.packaging, com.android.ide.common.rendering, com.android.ide.common.rendering.api, com.android.ide.common.rendering.legacy, + com.android.ide.common.res2, com.android.ide.common.resources, com.android.ide.common.resources.configuration, com.android.ide.common.sdk, |