aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2010-11-19 13:33:41 -0800
committerRaphael Moll <ralf@android.com>2010-11-19 16:26:31 -0800
commit1834544e4a46d2d4941545d8f8ff4d7503feacfd (patch)
tree925b0aa23731abb2801113c2bc26f9905207e616 /eclipse/plugins/com.android.ide.eclipse.adt/src/com
parent7c0a3af8f4f08a45420745d961783f975a631bc3 (diff)
downloadsdk-1834544e4a46d2d4941545d8f8ff4d7503feacfd.zip
sdk-1834544e4a46d2d4941545d8f8ff4d7503feacfd.tar.gz
sdk-1834544e4a46d2d4941545d8f8ff4d7503feacfd.tar.bz2
GLE: Remove obsolete IGraphicalLayoutEditor interface.
Change-Id: I96f929ce9386e88f80d15195b2ff6a498e374554
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com')
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/IGraphicalLayoutEditor.java119
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java36
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java122
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteComposite.java31
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/RulesEngine.java6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/ViewMetadata.java25
6 files changed, 121 insertions, 218 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/IGraphicalLayoutEditor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/IGraphicalLayoutEditor.java
deleted file mode 100755
index c200e47..0000000
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/IGraphicalLayoutEditor.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/org/documents/epl-v10.php
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.ide.eclipse.adt.internal.editors.layout;
-
-import com.android.ide.common.layoutlib.LayoutLibrary;
-import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
-import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
-import com.android.layoutlib.api.LayoutScene;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.ui.IEditorPart;
-
-import java.util.Set;
-
-/**
- * Interface defining what {@link LayoutEditor} expects from a GraphicalLayoutEditor part.
- *
- * @since GLE2
- */
-public interface IGraphicalLayoutEditor extends IEditorPart {
-
- /**
- * Opens and initialize the editor with a new file.
- * @param file the file being edited.
- */
- abstract void openFile(IFile file);
-
- /**
- * Resets the editor with a replacement file.
- * @param file the replacement file.
- */
- abstract void replaceFile(IFile file);
-
- /**
- * Resets the editor with a replacement file coming from a config change in the config
- * selector.
- * @param file the replacement file.
- */
- abstract void changeFileOnNewConfig(IFile file);
-
- /**
- * Responds to a target change for the project of the edited file
- */
- abstract void onTargetChange();
-
- /**
- * Callback for XML model changed. Only update/recompute the layout if the editor is visible
- */
- abstract void onXmlModelChanged();
-
- /**
- * Responds to a page change that made the Graphical editor page the activated page.
- */
- abstract void activated();
-
- /**
- * Responds to a page change that made the Graphical editor page the deactivated page
- */
- abstract void deactivated();
-
- abstract void reloadPalette();
-
- abstract void recomputeLayout();
-
- abstract UiDocumentNode getModel();
-
- abstract LayoutEditor getLayoutEditor();
-
- /**
- * Returns the {@link LayoutLibrary} associated with this editor, if it has
- * been initialized already. May return null if it has not been initialized (or has
- * not finished initializing).
- *
- * @return The {@link LayoutLibrary}, or null
- */
- abstract LayoutLibrary getLayoutLibrary();
-
- /**
- * Renders the given model, using this editor's theme and screen settings, and returns
- * the result as a {@link LayoutScene}. Any error messages will be written to the
- * editor's error area.
- *
- * @param model the model to be rendered, which can be different than the editor's own
- * {@link #getModel()}.
- * @param width the width to use for the layout, or -1 to use the width of the screen
- * associated with this editor
- * @param height the height to use for the layout, or -1 to use the height of the screen
- * associated with this editor
- * @param explodeNodes a set of nodes to explode, or null for none
- * @param transparentBackground If true, the rendering will <b>not</b> paint the
- * normal background requested by the theme, and it will instead paint the
- * background using a fully transparent background color
- * @return the resulting rendered image wrapped in an {@link LayoutScene}
- */
- abstract LayoutScene render(UiDocumentNode model,
- int width, int height, Set<UiElementNode> explodeNodes, boolean transparentBackground);
-
- /**
- * Returns the current bounds of the Android device screen, in canvas control pixels
- *
- * @return the bounds of the screen, never null
- */
- abstract Rectangle getScreenBounds();
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java
index 41bf099..7dc9169 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java
@@ -69,7 +69,7 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput,
/** Root node of the UI element hierarchy */
private UiDocumentNode mUiRootNode;
- private IGraphicalLayoutEditor mGraphicalEditor;
+ private GraphicalEditorPart mGraphicalEditor;
private int mGraphicalEditorIndex;
/** Implementation of the {@link IContentOutlinePage} for this editor */
private IContentOutlinePage mOutline;
@@ -94,6 +94,15 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput,
}
/**
+ * Returns the {@link RulesEngine} associated with this editor
+ *
+ * @return the {@link RulesEngine} associated with this editor.
+ */
+ public RulesEngine getRulesEngine() {
+ return mGraphicalEditor.getRulesEngine();
+ }
+
+ /**
* @return The root node of the UI element hierarchy
*/
@Override
@@ -291,20 +300,20 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput,
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
- // for the outline, force it to come from the Graphical Editor.
+ // For the outline, force it to come from the Graphical Editor.
// This fixes the case where a layout file is opened in XML view first and the outline
// gets stuck in the XML outline.
if (IContentOutlinePage.class == adapter && mGraphicalEditor != null) {
- if (mOutline == null && mGraphicalEditor instanceof GraphicalEditorPart) {
- mOutline = new OutlinePage2((GraphicalEditorPart) mGraphicalEditor);
+ if (mOutline == null && mGraphicalEditor != null) {
+ mOutline = new OutlinePage2(mGraphicalEditor);
}
return mOutline;
}
if (IPropertySheetPage.class == adapter && mGraphicalEditor != null) {
- if (mPropertyPage == null && mGraphicalEditor instanceof GraphicalEditorPart) {
+ if (mPropertyPage == null) {
mPropertyPage = new PropertySheetPage2();
}
@@ -326,8 +335,8 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput,
int caretOffset = textViewer.getTextWidget().getCaretOffset();
if (caretOffset >= 0) {
Node node = AndroidXmlEditor.getNode(textViewer.getDocument(), caretOffset);
- if (node != null && mGraphicalEditor instanceof GraphicalEditorPart) {
- ((GraphicalEditorPart)mGraphicalEditor).select(node);
+ if (node != null && mGraphicalEditor != null) {
+ mGraphicalEditor.select(node);
}
}
}
@@ -605,17 +614,4 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput,
return null;
}
-
- /**
- * Returns the {@link RulesEngine} associated with this editor
- *
- * @return the {@link RulesEngine} associated with this editor, or null
- */
- public RulesEngine getRulesEngine() {
- if (mGraphicalEditor instanceof GraphicalEditorPart) {
- return ((GraphicalEditorPart) mGraphicalEditor).getRulesEngine();
- }
-
- return null;
- }
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
index d7d71da..55d296d 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
@@ -23,7 +23,6 @@ import com.android.ide.eclipse.adt.AdtPlugin;
import com.android.ide.eclipse.adt.internal.editors.IconFactory;
import com.android.ide.eclipse.adt.internal.editors.layout.ContextPullParser;
import com.android.ide.eclipse.adt.internal.editors.layout.ExplodedRenderingHelper;
-import com.android.ide.eclipse.adt.internal.editors.layout.IGraphicalLayoutEditor;
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutReloadMonitor;
import com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback;
@@ -134,13 +133,9 @@ import java.util.Set;
* outline and property sheet (these are registered by {@link LayoutEditor#getAdapter(Class)}).
*
* @since GLE2
- *
- * TODO List:
- * - display error icon
- * - Completely rethink the property panel
*/
public class GraphicalEditorPart extends EditorPart
- implements IGraphicalLayoutEditor, ISelectionListener, INullSelectionListener {
+ implements ISelectionListener, INullSelectionListener {
/*
* Useful notes:
@@ -933,6 +928,9 @@ public class GraphicalEditorPart extends EditorPart
mConfigComposite.changeFileOnNewConfig(mEditedFile);
}
+ /**
+ * Responds to a target change for the project of the edited file
+ */
public void onTargetChange() {
AndroidTargetData targetData = mConfigComposite.onXmlModelLoaded();
if (targetData != null) {
@@ -943,16 +941,6 @@ public class GraphicalEditorPart extends EditorPart
mConfigListener.onConfigurationChange();
}
- private void setClippingSupport(boolean b) {
- mClippingButton.setEnabled(b);
- if (b) {
- mClippingButton.setToolTipText("Toggles screen clipping on/off");
- } else {
- mClippingButton.setSelection(true);
- mClippingButton.setToolTipText("Non clipped rendering is not supported");
- }
- }
-
public LayoutEditor getLayoutEditor() {
return mLayoutEditor;
}
@@ -1041,6 +1029,78 @@ public class GraphicalEditorPart extends EditorPart
}
}
+ public void reloadPalette() {
+ if (mPalette != null) {
+ mPalette.reloadPalette(mLayoutEditor.getTargetData());
+ }
+ }
+
+ /**
+ * Renders the given model, using this editor's theme and screen settings, and returns
+ * the result as a {@link LayoutScene}. Any error messages will be written to the
+ * editor's error area.
+ *
+ * @param model the model to be rendered, which can be different than the editor's own
+ * {@link #getModel()}.
+ * @param width the width to use for the layout, or -1 to use the width of the screen
+ * associated with this editor
+ * @param height the height to use for the layout, or -1 to use the height of the screen
+ * associated with this editor
+ * @param explodeNodes a set of nodes to explode, or null for none
+ * @param transparentBackground If true, the rendering will <b>not</b> paint the
+ * normal background requested by the theme, and it will instead paint the
+ * background using a fully transparent background color
+ * @return the resulting rendered image wrapped in an {@link LayoutScene}
+ */
+ public LayoutScene render(UiDocumentNode model, int width, int height,
+ Set<UiElementNode> explodeNodes, boolean transparentBackground) {
+ if (!ensureFileValid()) {
+ return null;
+ }
+ if (!ensureModelValid(model)) {
+ return null;
+ }
+ LayoutLibrary layoutLib = getReadyLayoutLib(true /*displayError*/);
+
+ IProject iProject = mEditedFile.getProject();
+ return renderWithBridge(iProject, model, layoutLib, width, height, explodeNodes,
+ transparentBackground);
+ }
+
+ /**
+ * Returns the {@link LayoutLibrary} associated with this editor, if it has
+ * been initialized already. May return null if it has not been initialized (or has
+ * not finished initializing).
+ *
+ * @return The {@link LayoutLibrary}, or null
+ */
+ public LayoutLibrary getLayoutLibrary() {
+ return getReadyLayoutLib(false /*displayError*/);
+ }
+
+ /**
+ * Returns the current bounds of the Android device screen, in canvas control pixels.
+ *
+ * @return the bounds of the screen, never null
+ */
+ public Rectangle getScreenBounds() {
+ return mConfigComposite.getScreenBounds();
+ }
+
+
+
+ // --- private methods ---
+
+ private void setClippingSupport(boolean b) {
+ mClippingButton.setEnabled(b);
+ if (b) {
+ mClippingButton.setToolTipText("Toggles screen clipping on/off");
+ } else {
+ mClippingButton.setSelection(true);
+ mClippingButton.setToolTipText("Non clipped rendering is not supported");
+ }
+ }
+
/**
* Ensure that the file associated with this editor is valid (exists and is
* synchronized). Any reasons why it is not are displayed in the editor's error area.
@@ -1072,7 +1132,6 @@ public class GraphicalEditorPart extends EditorPart
return true;
}
-
/**
* Returns a {@link LayoutLibrary} that is ready for rendering, or null if the bridge
* is not available or not ready yet (due to SDK loading still being in progress etc).
@@ -1225,21 +1284,6 @@ public class GraphicalEditorPart extends EditorPart
model.refreshUi();
}
- public LayoutScene render(UiDocumentNode model, int width, int height,
- Set<UiElementNode> explodeNodes, boolean transparentBackground) {
- if (!ensureFileValid()) {
- return null;
- }
- if (!ensureModelValid(model)) {
- return null;
- }
- LayoutLibrary layoutLib = getReadyLayoutLib(true /*displayError*/);
-
- IProject iProject = mEditedFile.getProject();
- return renderWithBridge(iProject, model, layoutLib, width, height, explodeNodes,
- transparentBackground);
- }
-
private LayoutScene renderWithBridge(IProject iProject, UiDocumentNode model,
LayoutLibrary layoutLib, int width, int height, Set<UiElementNode> explodeNodes,
boolean transparentBackground) {
@@ -1417,16 +1461,6 @@ public class GraphicalEditorPart extends EditorPart
// FIXME: get rid of the current LayoutScene if any.
}
- public Rectangle getScreenBounds() {
- return mConfigComposite.getScreenBounds();
- }
-
- public void reloadPalette() {
- if (mPalette != null) {
- mPalette.reloadPalette(mLayoutEditor.getTargetData());
- }
- }
-
private class ReloadListener implements ILayoutReloadListener {
/*
* Called when the file changes triggered a redraw of the layout
@@ -1500,10 +1534,6 @@ public class GraphicalEditorPart extends EditorPart
}
}
- public LayoutLibrary getLayoutLibrary() {
- return getReadyLayoutLib(false /*displayError*/);
- }
-
// ---- Error handling ----
/**
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteComposite.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteComposite.java
index 6b46688..2b01b1c 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteComposite.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteComposite.java
@@ -24,7 +24,6 @@ import com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils
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.XmlnsAttributeDescriptor;
-import com.android.ide.eclipse.adt.internal.editors.layout.IGraphicalLayoutEditor;
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutConstants;
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors;
@@ -111,14 +110,14 @@ public class PaletteComposite extends Composite {
private ScrollBar mVBar;
private ControlListener mControlListener;
private Listener mScrollbarListener;
- private IGraphicalLayoutEditor mEditor;
+ private GraphicalEditorPart mEditor;
/**
* Create the composite.
* @param parent The parent composite.
* @param editor An editor associated with this palette.
*/
- public PaletteComposite(Composite parent, IGraphicalLayoutEditor editor) {
+ public PaletteComposite(Composite parent, GraphicalEditorPart editor) {
super(parent, SWT.BORDER | SWT.V_SCROLL);
mEditor = editor;
@@ -296,7 +295,7 @@ public class PaletteComposite extends Composite {
}
}
- /* package */ IGraphicalLayoutEditor getEditor() {
+ /* package */ GraphicalEditorPart getEditor() {
return mEditor;
}
@@ -481,7 +480,7 @@ public class PaletteComposite extends Composite {
return mDesc;
}
- /* package */ IGraphicalLayoutEditor getEditor() {
+ /* package */ GraphicalEditorPart getEditor() {
return mPalette.getEditor();
}
@@ -681,7 +680,7 @@ public class PaletteComposite extends Composite {
// Insert our target view's XML into it as a node
ElementDescriptor desc = mItem.getDescriptor();
- IGraphicalLayoutEditor editor = mItem.getEditor();
+ GraphicalEditorPart editor = mItem.getEditor();
LayoutEditor layoutEditor = editor.getLayoutEditor();
String viewName = desc.getXmlLocalName();
@@ -722,17 +721,15 @@ public class PaletteComposite extends Composite {
// Call the create-hooks such that we for example insert mandatory
// children into views like the DialerFilter, apply image source attributes
// to ImageButtons, etc.
- if (editor instanceof GraphicalEditorPart) {
- LayoutCanvas canvas = ((GraphicalEditorPart) editor).getCanvasControl();
- NodeFactory nodeFactory = canvas.getNodeFactory();
- UiElementNode parent = model.getUiRoot();
- UiElementNode child = parent.getUiChildren().get(0);
- if (child instanceof UiViewElementNode) {
- UiViewElementNode childUiNode = (UiViewElementNode) child;
- NodeProxy childNode = nodeFactory.create(childUiNode);
- canvas.getRulesEngine().callCreateHooks(layoutEditor,
- null, childNode, InsertType.CREATE);
- }
+ LayoutCanvas canvas = editor.getCanvasControl();
+ NodeFactory nodeFactory = canvas.getNodeFactory();
+ UiElementNode parent = model.getUiRoot();
+ UiElementNode child = parent.getUiChildren().get(0);
+ if (child instanceof UiViewElementNode) {
+ UiViewElementNode childUiNode = (UiViewElementNode) child;
+ NodeProxy childNode = nodeFactory.create(childUiNode);
+ canvas.getRulesEngine().callCreateHooks(layoutEditor,
+ null, childNode, InsertType.CREATE);
}
boolean hasTransparency = false;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/RulesEngine.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/RulesEngine.java
index a14d812..95f56e1 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/RulesEngine.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/RulesEngine.java
@@ -31,8 +31,8 @@ import com.android.ide.common.layout.ViewRule;
import com.android.ide.eclipse.adt.AdtPlugin;
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.layout.IGraphicalLayoutEditor;
import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor;
+import com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart;
import com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleElement;
import com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode;
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
@@ -92,7 +92,7 @@ public class RulesEngine {
/**
* The editor which owns this {@link RulesEngine}
*/
- private IGraphicalLayoutEditor mEditor;
+ private GraphicalEditorPart mEditor;
/**
* Creates a new {@link RulesEngine} associated with the selected project.
@@ -102,7 +102,7 @@ public class RulesEngine {
* @param editor the editor which owns this {@link RulesEngine}
* @param project A non-null open project.
*/
- public RulesEngine(IGraphicalLayoutEditor editor, IProject project) {
+ public RulesEngine(GraphicalEditorPart editor, IProject project) {
mProject = project;
mEditor = editor;
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/ViewMetadata.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/ViewMetadata.java
index eeebad7..22f1168 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/ViewMetadata.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/ViewMetadata.java
@@ -22,7 +22,6 @@ package com.android.ide.eclipse.adt.internal.editors.layout.gre;
*/
import com.android.ide.common.api.IViewMetadata;
import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor;
-import com.android.ide.eclipse.adt.internal.editors.layout.IGraphicalLayoutEditor;
import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
import java.util.HashMap;
@@ -35,29 +34,29 @@ final class ViewMetadata implements IViewMetadata {
/** The fully qualified class name of the view whose metadata this class represents */
private String mFqcn;
- /** The {@link IGraphicalLayoutEditor} associated with the view we're looking up */
+ /** The {@link LayoutEditor} associated with the view we're looking up */
private LayoutEditor mEditor;
/**
- * A map from class names to {@link FillPreference} which indicates how each view
+ * A map from class names to {@link IViewMetadata.FillPreference} which indicates how each view
* prefers to grow when added in various layout contexts
*/
- private static final Map<String,FillPreference> mFill = new HashMap<String,FillPreference>();
+ private static final Map<String, FillPreference> mFill = new HashMap<String,FillPreference>();
static {
// Hardcoded metadata about fill preferences for various known views. We should
// work to try to get this into the platform as designtime annotations.
- mFill.put("android.widget.EditText", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
+ mFill.put("android.widget.EditText", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
mFill.put("android.widget.DialerFilter", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
- mFill.put("android.widget.SeekBar", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
- mFill.put("android.widget.Spinner", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
+ mFill.put("android.widget.SeekBar", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
+ mFill.put("android.widget.Spinner", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
mFill.put("android.widget.AutoComplete", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
- mFill.put("android.widget.ListView", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
- mFill.put("android.widget.GridView", FillPreference.OPPOSITE); //$NON-NLS-1$
- mFill.put("android.widget.Gallery", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
- mFill.put("android.widget.TabWidget", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
- mFill.put("android.widget.MapView", FillPreference.OPPOSITE); //$NON-NLS-1$
- mFill.put("android.widget.WebView", FillPreference.OPPOSITE); //$NON-NLS-1$
+ mFill.put("android.widget.ListView", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
+ mFill.put("android.widget.GridView", FillPreference.OPPOSITE); //$NON-NLS-1$
+ mFill.put("android.widget.Gallery", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
+ mFill.put("android.widget.TabWidget", FillPreference.WIDTH_IN_VERTICAL); //$NON-NLS-1$
+ mFill.put("android.widget.MapView", FillPreference.OPPOSITE); //$NON-NLS-1$
+ mFill.put("android.widget.WebView", FillPreference.OPPOSITE); //$NON-NLS-1$
// In addition, all layouts are FillPreference.OPPOSITE - these are computed
// lazily rather than enumerating them here