diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2015-04-02 21:39:19 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-02 21:39:19 +0000 |
commit | 8f178abd2019be9ad86ccfa386d4954d0f30c928 (patch) | |
tree | e371eaaf17dbdae8d37775d49380a41bad79de15 | |
parent | b258ed266c215d3fa665fb5bee0c9112e6cf6e08 (diff) | |
parent | e5ffd50658fa8ded32def4f76ac63e3d65f1dfeb (diff) | |
download | sdk-8f178abd2019be9ad86ccfa386d4954d0f30c928.zip sdk-8f178abd2019be9ad86ccfa386d4954d0f30c928.tar.gz sdk-8f178abd2019be9ad86ccfa386d4954d0f30c928.tar.bz2 |
am e5ffd506: am e6aac48c: Merge "Move to the new LayoutlibCallback." into studio-1.3-dev automerge: 80e3ce8 automerge: bd79a42
* commit 'e5ffd50658fa8ded32def4f76ac63e3d65f1dfeb':
Move to the new LayoutlibCallback.
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ProjectCallback.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ProjectCallback.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ProjectCallback.java index 6b842ed..020c666 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ProjectCallback.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ProjectCallback.java @@ -34,13 +34,14 @@ import com.android.ide.common.rendering.RenderSecurityManager; import com.android.ide.common.rendering.api.ActionBarCallback; import com.android.ide.common.rendering.api.AdapterBinding; import com.android.ide.common.rendering.api.DataBindingItem; +import com.android.ide.common.rendering.api.Features; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.IProjectCallback; +import com.android.ide.common.rendering.api.LayoutlibCallback; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.ResourceReference; import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.Result; -import com.android.ide.common.rendering.legacy.LegacyCallback; import com.android.ide.common.resources.ResourceResolver; import com.android.ide.common.xml.ManifestData; import com.android.ide.eclipse.adt.AdtConstants; @@ -76,9 +77,9 @@ import java.util.TreeSet; /** * Loader for Android Project class in order to use them in the layout editor. * <p/>This implements {@link IProjectCallback} for the old and new API through - * {@link LegacyCallback} + * {@link LayoutlibCallback} */ -public final class ProjectCallback extends LegacyCallback { +public final class ProjectCallback extends LayoutlibCallback { private final HashMap<String, Class<?>> mLoadedClasses = new HashMap<String, Class<?>>(); private final Set<String> mMissingClasses = new TreeSet<String>(); private final Set<String> mBrokenClasses = new TreeSet<String>(); @@ -151,7 +152,7 @@ public final class ProjectCallback extends LegacyCallback { @SuppressWarnings("unchecked") public Object loadView(String className, Class[] constructorSignature, Object[] constructorParameters) - throws ClassNotFoundException, Exception { + throws Exception { mUsed = true; if (className == null) { @@ -684,4 +685,9 @@ public final class ProjectCallback extends LegacyCallback { public ActionBarCallback getActionBarCallback() { return new ActionBarHandler(mEditor); } + + @Override + public boolean supports(int feature) { + return feature <= Features.LAST_CAPABILITY; + } } |