aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2010-11-29 15:54:33 -0800
committerTor Norbye <tnorbye@google.com>2010-11-29 16:12:06 -0800
commitdc040487da0fed1b5f366c5435bdff3638bc37b6 (patch)
treea3fcdaf7e902a36ff14879e0d9226cd973edea10 /eclipse/plugins/com.android.ide.eclipse.adt/src/com
parent84fe98990992bfd57d327c05839dff6f8ec585cc (diff)
downloadsdk-dc040487da0fed1b5f366c5435bdff3638bc37b6.zip
sdk-dc040487da0fed1b5f366c5435bdff3638bc37b6.tar.gz
sdk-dc040487da0fed1b5f366c5435bdff3638bc37b6.tar.bz2
Rename some layout editor classes
This changeset contains only renaming of some classes (and a couple of >100 column adjustments), no semantic changes. The name changes are: BaseView => BaseViewRule BaseLayout => BaseLayoutRule ScaleInfo => CanvasTransform CanvasSelection => SelectionItem PropertySheetPage2 => PropertySheetPage OutlinePage2 => OutlinePage Change-Id: I14d8c711b12154f4fcb2169129fd553e31fdab84
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/AbsoluteLayoutRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseLayoutRule.java (renamed from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseLayout.java)4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java (renamed from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseView.java)6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/DialerFilterRule.java2
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/FrameLayoutRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/HorizontalScrollViewRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/IgnoredLayoutRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageButtonRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageViewRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LinearLayoutRule.java2
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ListViewRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/MapViewRule.java2
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/RelativeLayoutRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ScrollViewRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java2
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ViewRule.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java8
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasTransform.java (renamed from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ScaleInfo.java)6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ClipboardSupport.java18
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/EmptyViewsOverlay.java13
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java16
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GlobalCanvasDragInfo.java8
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/HoverOverlay.java10
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageOverlay.java10
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java42
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MoveGesture.java4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlineOverlay.java13
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlinePage.java (renamed from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlinePage2.java)4
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteComposite.java4
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java (renamed from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage2.java)5
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionItem.java (renamed from eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasSelection.java)14
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionManager.java48
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionOverlay.java4
35 files changed, 140 insertions, 135 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/AbsoluteLayoutRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/AbsoluteLayoutRule.java
index 348d6cf..ffa43d9 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/AbsoluteLayoutRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/AbsoluteLayoutRule.java
@@ -35,7 +35,7 @@ import java.util.Map;
* An {@link IViewRule} for android.widget.AbsoluteLayout and all its derived
* classes.
*/
-public class AbsoluteLayoutRule extends BaseLayout {
+public class AbsoluteLayoutRule extends BaseLayoutRule {
// ==== Drag'n'drop support ====
// The AbsoluteLayout accepts any drag'n'drop anywhere on its surface.
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseLayout.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseLayoutRule.java
index 979a4a2..2425ca6 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseLayout.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseLayoutRule.java
@@ -39,7 +39,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-public class BaseLayout extends BaseView {
+public class BaseLayoutRule extends BaseViewRule {
@Override
public boolean onInitialize(String fqcn, IClientRulesEngine engine) {
@@ -258,7 +258,7 @@ public class BaseLayout extends BaseView {
}
/**
- * For use by {@link BaseLayout#addAttributes} A filter should return a
+ * For use by {@link BaseLayoutRule#addAttributes} A filter should return a
* valid replacement string.
*/
public static interface AttributeFilter {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseView.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java
index 4bcf069..983560f 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseView.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java
@@ -48,7 +48,7 @@ import java.util.Set;
/**
* Common IViewRule processing to all view and layout classes.
*/
-public class BaseView implements IViewRule {
+public class BaseViewRule implements IViewRule {
protected IClientRulesEngine mRulesEngine;
// Cache of attributes. Key is FQCN of a node mixed with its view hierarchy
@@ -418,8 +418,8 @@ public class BaseView implements IViewRule {
String parentFqcn = parent.getFqcn();
IViewRule parentRule = mRulesEngine.loadRule(parentFqcn);
- if (parentRule instanceof BaseLayout) {
- ((BaseLayout) parentRule).onPasteBeforeChild(parent, targetNode, elements);
+ if (parentRule instanceof BaseLayoutRule) {
+ ((BaseLayoutRule) parentRule).onPasteBeforeChild(parent, targetNode, elements);
}
}
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/DialerFilterRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/DialerFilterRule.java
index 311af84..4c1af19 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/DialerFilterRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/DialerFilterRule.java
@@ -31,7 +31,7 @@ import com.android.ide.common.api.InsertType;
/**
* An {@link IViewRule} for android.widget.DialerFilterRule.
*/
-public class DialerFilterRule extends BaseView {
+public class DialerFilterRule extends BaseViewRule {
@Override
public void onCreate(INode node, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/FrameLayoutRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/FrameLayoutRule.java
index 16b477b..46b3bb7 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/FrameLayoutRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/FrameLayoutRule.java
@@ -33,7 +33,7 @@ import java.util.Map;
* An {@link IViewRule} for android.widget.FrameLayout and all its derived
* classes.
*/
-public class FrameLayoutRule extends BaseLayout {
+public class FrameLayoutRule extends BaseLayoutRule {
// ==== Drag'n'drop support ====
// The FrameLayout accepts any drag'n'drop anywhere on its surface.
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/HorizontalScrollViewRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/HorizontalScrollViewRule.java
index 6ae6872..cceee78 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/HorizontalScrollViewRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/HorizontalScrollViewRule.java
@@ -31,7 +31,7 @@ import com.android.ide.common.api.InsertType;
/**
* An {@link IViewRule} for android.widget.HorizontalScrollView.
*/
-public class HorizontalScrollViewRule extends BaseView {
+public class HorizontalScrollViewRule extends BaseViewRule {
@Override
public void onChildInserted(INode child, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/IgnoredLayoutRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/IgnoredLayoutRule.java
index af92c71..a0b56d2 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/IgnoredLayoutRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/IgnoredLayoutRule.java
@@ -30,7 +30,7 @@ import com.android.ide.common.api.INode;
* LinearLayout even though it extends it. Our ZoomControls rule is therefore a
* subclass of this {@link IgnoredLayoutRule} class.
*/
-public abstract class IgnoredLayoutRule extends BaseLayout {
+public abstract class IgnoredLayoutRule extends BaseLayoutRule {
@Override
public DropFeedback onDropEnter(INode targetNode, IDragElement[] elements) {
// Do nothing; this layout rule corresponds to a layout that
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageButtonRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageButtonRule.java
index 9ea5dc2..4338a9a 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageButtonRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageButtonRule.java
@@ -26,7 +26,7 @@ import com.android.ide.common.api.InsertType;
/**
* An {@link IViewRule} for android.widget.ImageButtonRule.
*/
-public class ImageButtonRule extends BaseView {
+public class ImageButtonRule extends BaseViewRule {
@Override
public void onCreate(INode node, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageViewRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageViewRule.java
index 9b1eac3..9d26e75 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageViewRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ImageViewRule.java
@@ -26,7 +26,7 @@ import com.android.ide.common.api.InsertType;
/**
* An {@link IViewRule} for android.widget.ImageViewRule.
*/
-public class ImageViewRule extends BaseView {
+public class ImageViewRule extends BaseViewRule {
@Override
public void onCreate(INode node, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LinearLayoutRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LinearLayoutRule.java
index 77e6d54..d797677 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LinearLayoutRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LinearLayoutRule.java
@@ -48,7 +48,7 @@ import java.util.Map;
* An {@link IViewRule} for android.widget.LinearLayout and all its derived
* classes.
*/
-public class LinearLayoutRule extends BaseLayout {
+public class LinearLayoutRule extends BaseLayoutRule {
/**
* Add an explicit Orientation toggle to the context menu.
*/
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ListViewRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ListViewRule.java
index d3d226c..c83e294 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ListViewRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ListViewRule.java
@@ -29,7 +29,7 @@ import com.android.ide.common.api.InsertType;
* This is the "root" rule, that is used whenever there is not more specific
* rule to apply.
*/
-public class ListViewRule extends BaseView {
+public class ListViewRule extends BaseViewRule {
@Override
public void onCreate(INode node, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/MapViewRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/MapViewRule.java
index b8ddedd..301385a 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/MapViewRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/MapViewRule.java
@@ -28,7 +28,7 @@ import com.android.ide.common.api.InsertType;
* TODO: This class should be pulled out of the ADT and bundled with the add ons
* (not the core jar but an optional tool jar)
*/
-public class MapViewRule extends BaseView {
+public class MapViewRule extends BaseViewRule {
@Override
public void onCreate(INode node, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/RelativeLayoutRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/RelativeLayoutRule.java
index 04629b2..bf708a3 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/RelativeLayoutRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/RelativeLayoutRule.java
@@ -45,7 +45,7 @@ import java.util.Set;
* An {@link IViewRule} for android.widget.RelativeLayout and all its derived
* classes.
*/
-public class RelativeLayoutRule extends BaseLayout {
+public class RelativeLayoutRule extends BaseLayoutRule {
// ==== Selection ====
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ScrollViewRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ScrollViewRule.java
index 5324278..0d3af83 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ScrollViewRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ScrollViewRule.java
@@ -29,7 +29,7 @@ import com.android.ide.common.api.InsertType;
/**
* An {@link IViewRule} for android.widget.ScrollView.
*/
-public class ScrollViewRule extends BaseView {
+public class ScrollViewRule extends BaseViewRule {
@Override
public void onChildInserted(INode child, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
index 727d231..40fb608 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/SeekBarRule.java
@@ -27,7 +27,7 @@ import com.android.ide.common.api.InsertType;
/**
* An {@link IViewRule} for android.widget.SeekBar
*/
-public class SeekBarRule extends BaseView {
+public class SeekBarRule extends BaseViewRule {
@Override
public void onCreate(INode node, INode parent, InsertType insertType) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ViewRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ViewRule.java
index d645364..470b6a4 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ViewRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ViewRule.java
@@ -26,6 +26,6 @@ import com.android.ide.common.api.IViewRule;
* There is no customization here, everything that is common to all views is
* simply implemented in BaseView.
*/
-public class ViewRule extends BaseView {
+public class ViewRule extends BaseViewRule {
}
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 74e86a0..2124aae 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
@@ -26,8 +26,8 @@ import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.CustomVie
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.GraphicalEditorPart;
-import com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage2;
-import com.android.ide.eclipse.adt.internal.editors.layout.gle2.PropertySheetPage2;
+import com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage;
+import com.android.ide.eclipse.adt.internal.editors.layout.gle2.PropertySheetPage;
import com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine;
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
@@ -315,7 +315,7 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput,
if (IContentOutlinePage.class == adapter && mGraphicalEditor != null) {
if (mOutline == null && mGraphicalEditor != null) {
- mOutline = new OutlinePage2(mGraphicalEditor);
+ mOutline = new OutlinePage(mGraphicalEditor);
}
return mOutline;
@@ -323,7 +323,7 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput,
if (IPropertySheetPage.class == adapter && mGraphicalEditor != null) {
if (mPropertyPage == null) {
- mPropertyPage = new PropertySheetPage2();
+ mPropertyPage = new PropertySheetPage();
}
return mPropertyPage;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ScaleInfo.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasTransform.java
index 0565549..8a4ebc6 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ScaleInfo.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasTransform.java
@@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.ScrollBar;
* Helper class to convert between control pixel coordinates and canvas coordinates.
* Takes care of the zooming and offset of the canvas.
*/
-public class ScaleInfo implements ICanvasTransform {
+public class CanvasTransform implements ICanvasTransform {
/**
* The canvas which controls the zooming.
*/
@@ -44,7 +44,7 @@ public class ScaleInfo implements ICanvasTransform {
/** Scrollbar widget. */
private ScrollBar mScrollbar;
- public ScaleInfo(LayoutCanvas layoutCanvas, ScrollBar scrollbar) {
+ public CanvasTransform(LayoutCanvas layoutCanvas, ScrollBar scrollbar) {
mCanvas = layoutCanvas;
mScrollbar = scrollbar;
mScale = 1.0;
@@ -55,7 +55,7 @@ public class ScaleInfo implements ICanvasTransform {
public void widgetSelected(SelectionEvent e) {
// User requested scrolling. Changes translation and redraw canvas.
mTranslate = mScrollbar.getSelection();
- ScaleInfo.this.mCanvas.redraw();
+ CanvasTransform.this.mCanvas.redraw();
}
});
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ClipboardSupport.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ClipboardSupport.java
index 680c12e..540aedb 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ClipboardSupport.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ClipboardSupport.java
@@ -83,7 +83,7 @@ public class ClipboardSupport {
* <b>this should be a copy already - this method will not make a
* copy</b>
*/
- public void copySelectionToClipboard(List<CanvasSelection> selection) {
+ public void copySelectionToClipboard(List<SelectionItem> selection) {
SelectionManager.sanitize(selection);
if (selection.isEmpty()) {
@@ -91,8 +91,8 @@ public class ClipboardSupport {
}
Object[] data = new Object[] {
- CanvasSelection.getAsElements(selection),
- CanvasSelection.getAsText(mCanvas, selection)
+ SelectionItem.getAsElements(selection),
+ SelectionItem.getAsText(mCanvas, selection)
};
Transfer[] types = new Transfer[] {
@@ -116,7 +116,7 @@ public class ClipboardSupport {
* <b>this should be a copy already - this method will not make a
* copy</b>
*/
- public void cutSelectionToClipboard(List<CanvasSelection> selection) {
+ public void cutSelectionToClipboard(List<SelectionItem> selection) {
copySelectionToClipboard(selection);
deleteSelection(
mCanvas.getCutLabel(),
@@ -134,7 +134,7 @@ public class ClipboardSupport {
* case nothing happens. The selection list will be sanitized so
* the caller should pass in a copy.
*/
- public void deleteSelection(String verb, final List<CanvasSelection> selection) {
+ public void deleteSelection(String verb, final List<SelectionItem> selection) {
SelectionManager.sanitize(selection);
if (selection.isEmpty()) {
@@ -143,7 +143,7 @@ public class ClipboardSupport {
// If all selected items have the same *kind* of parent, display that in the undo title.
String title = null;
- for (CanvasSelection cs : selection) {
+ for (SelectionItem cs : selection) {
CanvasViewInfo vi = cs.getViewInfo();
if (vi != null && vi.getParent() != null) {
if (title == null) {
@@ -180,7 +180,7 @@ public class ClipboardSupport {
// resetting the selection.
mCanvas.getLayoutEditor().wrapUndoEditXmlModel(title, new Runnable() {
public void run() {
- for (CanvasSelection cs : selection) {
+ for (SelectionItem cs : selection) {
CanvasViewInfo vi = cs.getViewInfo();
// You can't delete the root element
if (vi != null && !vi.isRoot()) {
@@ -202,7 +202,7 @@ public class ClipboardSupport {
* <b>this should be a copy already - this method will not make a
* copy</b>
*/
- public void pasteSelection(List<CanvasSelection> selection) {
+ public void pasteSelection(List<SelectionItem> selection) {
SimpleXmlTransfer sxt = SimpleXmlTransfer.getInstance();
SimpleElement[] pasted = (SimpleElement[]) mClipboard.getContents(sxt);
@@ -224,7 +224,7 @@ public class ClipboardSupport {
SelectionManager.sanitize(selection);
CanvasViewInfo target = lastRoot;
if (selection.size() > 0) {
- CanvasSelection cs = selection.get(0);
+ SelectionItem cs = selection.get(0);
target = cs.getViewInfo();
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java
index a514447..ca08209 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java
@@ -51,7 +51,7 @@ import java.util.regex.Pattern;
* This class is tied to a specific {@link LayoutCanvas} instance and a root {@link MenuManager}.
* <p/>
* Two instances of this are used: one created by {@link LayoutCanvas} and the other one
- * created by {@link OutlinePage2}. Different root {@link MenuManager}s are populated, however
+ * created by {@link OutlinePage}. Different root {@link MenuManager}s are populated, however
* they are both linked to the current selection state of the {@link LayoutCanvas}.
*/
/* package */ class DynamicContextMenu {
@@ -74,7 +74,7 @@ import java.util.regex.Pattern;
* @param canvas The {@link LayoutCanvas} providing the selection, the node factory and
* the rules engine.
* @param rootMenu The root of the context menu displayed. In practice this may be the
- * context menu manager of the {@link LayoutCanvas} or the one from {@link OutlinePage2}.
+ * context menu manager of the {@link LayoutCanvas} or the one from {@link OutlinePage}.
*/
public DynamicContextMenu(LayoutEditor editor, LayoutCanvas canvas, MenuManager rootMenu) {
mEditor = editor;
@@ -218,7 +218,7 @@ import java.util.regex.Pattern;
final TreeMap<String, ArrayList<MenuAction>> outActionsMap,
final TreeMap<String, MenuAction.Group> outGroupsMap) {
int maxMenuSelection = 0;
- for (CanvasSelection selection : mCanvas.getSelectionManager().getSelections()) {
+ for (SelectionItem selection : mCanvas.getSelectionManager().getSelections()) {
List<MenuAction> viewActions = null;
if (selection != null) {
CanvasViewInfo vi = selection.getViewInfo();
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/EmptyViewsOverlay.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/EmptyViewsOverlay.java
index 946c381..8df6c58 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/EmptyViewsOverlay.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/EmptyViewsOverlay.java
@@ -33,21 +33,24 @@ public class EmptyViewsOverlay extends Overlay {
private Color mBorderColor;
/** Vertical scaling & scrollbar information. */
- private ScaleInfo mVScale;
+ private CanvasTransform mVScale;
/** Horizontal scaling & scrollbar information. */
- private ScaleInfo mHScale;
+ private CanvasTransform mHScale;
/**
* Constructs a new {@link EmptyViewsOverlay} linked to the given view hierarchy.
*
* @param viewHierarchy The {@link ViewHierarchy} to render.
- * @param hScale The {@link ScaleInfo} to use to transfer horizontal layout
+ * @param hScale The {@link CanvasTransform} to use to transfer horizontal layout
* coordinates to screen coordinates.
- * @param vScale The {@link ScaleInfo} to use to transfer vertical layout coordinates
+ * @param vScale The {@link CanvasTransform} to use to transfer vertical layout coordinates
* to screen coordinates.
*/
- public EmptyViewsOverlay(ViewHierarchy viewHierarchy, ScaleInfo hScale, ScaleInfo vScale) {
+ public EmptyViewsOverlay(
+ ViewHierarchy viewHierarchy,
+ CanvasTransform hScale,
+ CanvasTransform vScale) {
super();
this.mViewHierarchy = viewHierarchy;
this.mHScale = hScale;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java
index 2c7bd73..d3a7820 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java
@@ -476,7 +476,7 @@ public class GestureManager {
* canvas selection due to the "sanitize" pass. Can be empty but never
* null.
*/
- private final ArrayList<CanvasSelection> mDragSelection = new ArrayList<CanvasSelection>();
+ private final ArrayList<SelectionItem> mDragSelection = new ArrayList<SelectionItem>();
private SimpleElement[] mDragElements;
@@ -497,14 +497,14 @@ public class GestureManager {
// element, *change* the selection to match the element under the
// cursor and use that. If nothing can be selected, abort the drag
// operation.
- List<CanvasSelection> selections = mCanvas.getSelectionManager().getSelections();
+ List<SelectionItem> selections = mCanvas.getSelectionManager().getSelections();
mDragSelection.clear();
if (!selections.isEmpty()) {
// Is the cursor on top of a selected element?
boolean insideSelection = false;
- for (CanvasSelection cs : selections) {
+ for (SelectionItem cs : selections) {
if (!cs.isRoot() && cs.getRect().contains(p.x, p.y)) {
insideSelection = true;
break;
@@ -532,7 +532,7 @@ public class GestureManager {
mDragSelection.addAll(selections);
} else {
// Only drag non-root items.
- for (CanvasSelection cs : selections) {
+ for (SelectionItem cs : selections) {
if (!cs.isRoot()) {
mDragSelection.add(cs);
}
@@ -555,9 +555,9 @@ public class GestureManager {
e.doit = !mDragSelection.isEmpty();
int imageCount = mDragSelection.size();
if (e.doit) {
- mDragElements = CanvasSelection.getAsElements(mDragSelection);
+ mDragElements = SelectionItem.getAsElements(mDragSelection);
GlobalCanvasDragInfo.getInstance().startDrag(mDragElements,
- mDragSelection.toArray(new CanvasSelection[imageCount]),
+ mDragSelection.toArray(new SelectionItem[imageCount]),
mCanvas, new Runnable() {
public void run() {
mCanvas.getClipboardSupport().deleteSelection("Remove",
@@ -593,7 +593,7 @@ public class GestureManager {
if (imageCount > 0) {
ImageData data = image.getImageData();
Rectangle imageRectangle = new Rectangle(0, 0, data.width, data.height);
- for (CanvasSelection item : mDragSelection) {
+ for (SelectionItem item : mDragSelection) {
Rectangle bounds = item.getRect();
// Some bounds can be outside the rendered rectangle (for
// example, in an absolute layout, you can have negative
@@ -630,7 +630,7 @@ public class GestureManager {
*/
public void dragSetData(DragSourceEvent e) {
if (TextTransfer.getInstance().isSupportedType(e.dataType)) {
- e.data = CanvasSelection.getAsText(mCanvas, mDragSelection);
+ e.data = SelectionItem.getAsText(mCanvas, mDragSelection);
return;
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GlobalCanvasDragInfo.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GlobalCanvasDragInfo.java
index 7aee9bc..3fd98a3 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GlobalCanvasDragInfo.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GlobalCanvasDragInfo.java
@@ -40,7 +40,7 @@ final class GlobalCanvasDragInfo {
private static final GlobalCanvasDragInfo sInstance = new GlobalCanvasDragInfo();
private SimpleElement[] mCurrentElements = null;
- private CanvasSelection[] mCurrentSelection;
+ private SelectionItem[] mCurrentSelection;
private Object mSourceCanvas = null;
private Runnable mRemoveSourceHandler;
@@ -66,7 +66,7 @@ final class GlobalCanvasDragInfo {
* source. It should only be invoked if the drag operation is a
* move, not a copy.
*/
- public void startDrag(SimpleElement[] elements, CanvasSelection[] selection,
+ public void startDrag(SimpleElement[] elements, SelectionItem[] selection,
Object sourceCanvas, Runnable removeSourceHandler) {
mCurrentElements = elements;
mCurrentSelection = selection;
@@ -89,12 +89,12 @@ final class GlobalCanvasDragInfo {
/** Returns the selection originally dragged.
* Can be null if the drag did not start in a canvas.
*/
- public CanvasSelection[] getCurrentSelection() {
+ public SelectionItem[] getCurrentSelection() {
return mCurrentSelection;
}
/**
- * Returns the object that call {@link #startDrag(SimpleElement[], CanvasSelection[], Object)}.
+ * Returns the object that call {@link #startDrag(SimpleElement[], SelectionItem[], Object)}.
* Can be null.
* This is not meant to access the object indirectly, it is just meant to compare if the
* source and the destination of the drag'n'drop are the same, so object identity
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/HoverOverlay.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/HoverOverlay.java
index 9a39427..27a6024 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/HoverOverlay.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/HoverOverlay.java
@@ -33,10 +33,10 @@ public class HoverOverlay extends Overlay {
private Color mHoverFillColor;
/** Vertical scaling & scrollbar information. */
- private ScaleInfo mVScale;
+ private CanvasTransform mVScale;
/** Horizontal scaling & scrollbar information. */
- private ScaleInfo mHScale;
+ private CanvasTransform mHScale;
/**
* Current mouse hover border rectangle. Null when there's no mouse hover.
@@ -48,12 +48,12 @@ public class HoverOverlay extends Overlay {
/**
* Constructs a new {@link HoverOverlay} linked to the given view hierarchy.
*
- * @param hScale The {@link ScaleInfo} to use to transfer horizontal layout
+ * @param hScale The {@link CanvasTransform} to use to transfer horizontal layout
* coordinates to screen coordinates.
- * @param vScale The {@link ScaleInfo} to use to transfer vertical layout
+ * @param vScale The {@link CanvasTransform} to use to transfer vertical layout
* coordinates to screen coordinates.
*/
- public HoverOverlay(ScaleInfo hScale, ScaleInfo vScale) {
+ public HoverOverlay(CanvasTransform hScale, CanvasTransform vScale) {
super();
this.mHScale = hScale;
this.mVScale = vScale;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageOverlay.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageOverlay.java
index b920607..893ed8f 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageOverlay.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageOverlay.java
@@ -35,10 +35,10 @@ public class ImageOverlay extends Overlay {
private LayoutCanvas mCanvas;
/** Vertical scaling & scrollbar information. */
- private ScaleInfo mVScale;
+ private CanvasTransform mVScale;
/** Horizontal scaling & scrollbar information. */
- private ScaleInfo mHScale;
+ private CanvasTransform mHScale;
/**
* Constructs an {@link ImageOverlay} tied to the given canvas.
@@ -47,7 +47,7 @@ public class ImageOverlay extends Overlay {
* @param hScale The horizontal scale information.
* @param vScale The vertical scale information.
*/
- public ImageOverlay(LayoutCanvas canvas, ScaleInfo hScale, ScaleInfo vScale) {
+ public ImageOverlay(LayoutCanvas canvas, CanvasTransform hScale, CanvasTransform vScale) {
this.mCanvas = canvas;
this.mHScale = hScale;
this.mVScale = vScale;
@@ -107,8 +107,8 @@ public class ImageOverlay extends Overlay {
gc_setAlpha(gc, 128); // half-transparent
}
- ScaleInfo hi = mHScale;
- ScaleInfo vi = mVScale;
+ CanvasTransform hi = mHScale;
+ CanvasTransform vi = mVScale;
// we only anti-alias when reducing the image size.
int oldAlias = -2;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java
index 89eb9a4..4782204 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java
@@ -141,10 +141,10 @@ class LayoutCanvas extends Canvas {
private final NodeFactory mNodeFactory = new NodeFactory();
/** Vertical scaling & scrollbar information. */
- private ScaleInfo mVScale;
+ private CanvasTransform mVScale;
/** Horizontal scaling & scrollbar information. */
- private ScaleInfo mHScale;
+ private CanvasTransform mHScale;
/** Drag source associated with this canvas. */
private DragSource mDragSource;
@@ -156,7 +156,7 @@ class LayoutCanvas extends Canvas {
* when page's widget is already disposed.
* Added the DisposeListener to OutlinePage2 in order to correctly dispose this page.
**/
- private OutlinePage2 mOutlinePage;
+ private OutlinePage mOutlinePage;
/** Delete action for the Edit or context menu. */
private Action mDeleteAction;
@@ -217,8 +217,8 @@ class LayoutCanvas extends Canvas {
mRulesEngine = rulesEngine;
mClipboardSupport = new ClipboardSupport(this, parent);
- mHScale = new ScaleInfo(this, getHorizontalBar());
- mVScale = new ScaleInfo(this, getVerticalBar());
+ mHScale = new CanvasTransform(this, getHorizontalBar());
+ mVScale = new CanvasTransform(this, getVerticalBar());
mGCWrapper = new GCWrapper(mHScale, mVScale);
@@ -286,8 +286,8 @@ class LayoutCanvas extends Canvas {
// --- setup outline ---
// Get the outline associated with this editor, if any and of the right type.
Object outline = layoutEditor.getAdapter(IContentOutlinePage.class);
- if (outline instanceof OutlinePage2) {
- mOutlinePage = (OutlinePage2) outline;
+ if (outline instanceof OutlinePage) {
+ mOutlinePage = (OutlinePage) outline;
}
}
@@ -368,7 +368,7 @@ class LayoutCanvas extends Canvas {
/**
* Returns our {@link DragSourceListener}.
- * This is used by {@link OutlinePage2} to delegate drag source events.
+ * This is used by {@link OutlinePage} to delegate drag source events.
*/
/* package */ DragSourceListener getDragListener() {
return mGestureManager.getDragSourceListener();
@@ -376,7 +376,7 @@ class LayoutCanvas extends Canvas {
/**
* Returns our {@link DropTargetListener}.
- * This is used by {@link OutlinePage2} to delegate drop target events.
+ * This is used by {@link OutlinePage} to delegate drop target events.
*/
/* package */ DropTargetListener getDropListener() {
return mGestureManager.getDropTargetListener();
@@ -408,24 +408,24 @@ class LayoutCanvas extends Canvas {
}
/**
- * Returns the horizontal {@link ScaleInfo} transform object, which can map
+ * Returns the horizontal {@link CanvasTransform} transform object, which can map
* a layout point into a control point.
*
- * @return A {@link ScaleInfo} for mapping between layout and control
+ * @return A {@link CanvasTransform} for mapping between layout and control
* coordinates in the horizontal dimension.
*/
- /* package */ ScaleInfo getHorizontalTransform() {
+ /* package */ CanvasTransform getHorizontalTransform() {
return mHScale;
}
/**
- * Returns the vertical {@link ScaleInfo} transform object, which can map a
+ * Returns the vertical {@link CanvasTransform} transform object, which can map a
* layout point into a control point.
*
- * @return A {@link ScaleInfo} for mapping between layout and control
+ * @return A {@link CanvasTransform} for mapping between layout and control
* coordinates in the vertical dimension.
*/
- /* package */ ScaleInfo getVerticalTransform() {
+ /* package */ CanvasTransform getVerticalTransform() {
return mVScale;
}
@@ -632,11 +632,11 @@ class LayoutCanvas extends Canvas {
// see if any of the selected items are among the invisible nodes, and if so
// add them to a lazily constructed set which we pass back for rendering.
Set<UiElementNode> result = null;
- List<CanvasSelection> selections = mSelectionManager.getSelections();
+ List<SelectionItem> selections = mSelectionManager.getSelections();
if (selections.size() > 0) {
List<CanvasViewInfo> invisibleParents = mViewHierarchy.getInvisibleViews();
if (invisibleParents.size() > 0) {
- for (CanvasSelection item : selections) {
+ for (SelectionItem item : selections) {
CanvasViewInfo viewInfo = item.getViewInfo();
// O(n^2) here, but both the selection size and especially the
// invisibleParents size are expected to be small
@@ -809,7 +809,7 @@ class LayoutCanvas extends Canvas {
/**
* Helper to create the drag source for the given control.
* <p/>
- * This is static with package-access so that {@link OutlinePage2} can also
+ * This is static with package-access so that {@link OutlinePage} can also
* create an exact copy of the source with the same attributes.
*/
/* package */static DragSource createDragSource(Control control) {
@@ -824,7 +824,7 @@ class LayoutCanvas extends Canvas {
/**
* Helper to create the drop target for the given control.
* <p/>
- * This is static with package-access so that {@link OutlinePage2} can also
+ * This is static with package-access so that {@link OutlinePage} can also
* create an exact copy of the drop target with the same attributes.
*/
/* package */static DropTarget createDropTarget(Control control) {
@@ -1007,8 +1007,8 @@ class LayoutCanvas extends Canvas {
manager.add(new Action("Run My Test", IAction.AS_PUSH_BUTTON) {
@Override
public void run() {
- List<CanvasSelection> selection = mSelectionManager.getSelections();
- CanvasSelection canvasSelection = selection.get(0);
+ List<SelectionItem> selection = mSelectionManager.getSelections();
+ SelectionItem canvasSelection = selection.get(0);
CanvasViewInfo info = canvasSelection.getViewInfo();
Object viewObject = info.getViewObject();
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java
index f9c91f4..c374b0e 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MarqueeGesture.java
@@ -53,9 +53,9 @@ public class MarqueeGesture extends Gesture {
this.mCanvas = canvas;
if (toggle) {
- List<CanvasSelection> selection = canvas.getSelectionManager().getSelections();
+ List<SelectionItem> selection = canvas.getSelectionManager().getSelections();
mInitialSelection = new ArrayList<CanvasViewInfo>(selection.size());
- for (CanvasSelection item : selection) {
+ for (SelectionItem item : selection) {
mInitialSelection.add(item.getViewInfo());
}
} else {
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MoveGesture.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MoveGesture.java
index d36b96c..f047cbc 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MoveGesture.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/MoveGesture.java
@@ -572,9 +572,9 @@ public class MoveGesture extends DropGesture {
// layout itself: a copy would be ok but not a move operation of the
// layout into himself.
- CanvasSelection[] selection = mGlobalDragInfo.getCurrentSelection();
+ SelectionItem[] selection = mGlobalDragInfo.getCurrentSelection();
if (selection != null) {
- for (CanvasSelection cs : selection) {
+ for (SelectionItem cs : selection) {
if (cs.getViewInfo() == targetVi) {
// The node that responded is one of the selection roots.
// Simply invalidate the drop feedback and move on the
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlineOverlay.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlineOverlay.java
index 942da2b..a2c533e 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlineOverlay.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlineOverlay.java
@@ -33,22 +33,25 @@ public class OutlineOverlay extends Overlay {
private Color mOutlineColor;
/** Vertical scaling & scrollbar information. */
- private ScaleInfo mVScale;
+ private CanvasTransform mVScale;
/** Horizontal scaling & scrollbar information. */
- private ScaleInfo mHScale;
+ private CanvasTransform mHScale;
/**
* Constructs a new {@link OutlineOverlay} linked to the given view
* hierarchy.
*
* @param viewHierarchy The {@link ViewHierarchy} to render
- * @param hScale The {@link ScaleInfo} to use to transfer horizontal layout
+ * @param hScale The {@link CanvasTransform} to use to transfer horizontal layout
* coordinates to screen coordinates
- * @param vScale The {@link ScaleInfo} to use to transfer vertical layout
+ * @param vScale The {@link CanvasTransform} to use to transfer vertical layout
* coordinates to screen coordinates
*/
- public OutlineOverlay(ViewHierarchy viewHierarchy, ScaleInfo hScale, ScaleInfo vScale) {
+ public OutlineOverlay(
+ ViewHierarchy viewHierarchy,
+ CanvasTransform hScale,
+ CanvasTransform vScale) {
super();
this.mViewHierarchy = viewHierarchy;
this.mHScale = hScale;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlinePage2.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlinePage.java
index 198e507..939d1f4 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlinePage2.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlinePage.java
@@ -76,7 +76,7 @@ import java.util.ArrayList;
*
* @since GLE2
*/
-public class OutlinePage2 extends ContentOutlinePage
+public class OutlinePage extends ContentOutlinePage
implements ISelectionListener, INullSelectionListener {
/**
@@ -108,7 +108,7 @@ public class OutlinePage2 extends ContentOutlinePage
*/
private DropTarget mDropTarget;
- public OutlinePage2(GraphicalEditorPart graphicalEditorPart) {
+ public OutlinePage(GraphicalEditorPart graphicalEditorPart) {
super();
mGraphicalEditorPart = graphicalEditorPart;
}
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 ba7b7b5..fc4d5d1 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
@@ -700,7 +700,7 @@ public class PaletteComposite extends Composite {
AndroidTargetData data = layoutEditor.getTargetData();
DocumentDescriptor documentDescriptor;
if (data == null) {
- documentDescriptor = new DocumentDescriptor("temp", null /*children*/); //$NON-NLS-1$
+ documentDescriptor = new DocumentDescriptor("temp", null/*children*/);//$NON-NLS-1$
} else {
documentDescriptor = data.getLayoutDescriptors().getDescriptor();
}
@@ -793,7 +793,7 @@ public class PaletteComposite extends Composite {
&& !ImageUtils.containsDarkPixels(cropped);
cropped = ImageUtils.createDropShadow(cropped,
hasTransparency ? 3 : 5 /* shadowSize */,
- !hasTransparency ? 0.6f : needsContrast ? 0.8f : 0.7f /* alpha */,
+ !hasTransparency ? 0.6f : needsContrast ? 0.8f : 0.7f/*alpha*/,
0x000000 /* shadowRgb */);
Display display = getControl().getDisplay();
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage2.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java
index 1259e65..dadba56 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage2.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java
@@ -29,7 +29,6 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.views.properties.PropertySheetEntry;
-import org.eclipse.ui.views.properties.PropertySheetPage;
/**
* A customized property sheet page for the graphical layout editor v2.
@@ -45,10 +44,10 @@ import org.eclipse.ui.views.properties.PropertySheetPage;
*
* @since GLE2
*/
-public class PropertySheetPage2 extends PropertySheetPage {
+public class PropertySheetPage extends org.eclipse.ui.views.properties.PropertySheetPage {
- public PropertySheetPage2() {
+ public PropertySheetPage() {
super();
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasSelection.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionItem.java
index de9abe9..f830cb9 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasSelection.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionItem.java
@@ -32,7 +32,7 @@ import java.util.List;
/**
* Represents one selection in {@link LayoutCanvas}.
*/
-/* package */ class CanvasSelection {
+/* package */ class SelectionItem {
/** Current selected view info. Can be null. */
private final CanvasViewInfo mCanvasViewInfo;
@@ -47,12 +47,12 @@ import java.util.List;
private final String mName;
/**
- * Creates a new {@link CanvasSelection} object.
+ * Creates a new {@link SelectionItem} object.
* @param canvasViewInfo The view info being selected. Must not be null.
* @param gre the rules engine
* @param nodeFactory the node factory
*/
- public CanvasSelection(CanvasViewInfo canvasViewInfo,
+ public SelectionItem(CanvasViewInfo canvasViewInfo,
RulesEngine gre,
NodeFactory nodeFactory) {
@@ -160,11 +160,11 @@ import java.util.List;
* Gets the XML text from the given selection for a text transfer.
* The returned string can be empty but not null.
*/
- /* package */ static String getAsText(LayoutCanvas canvas, List<CanvasSelection> selection) {
+ /* package */ static String getAsText(LayoutCanvas canvas, List<SelectionItem> selection) {
StringBuilder sb = new StringBuilder();
LayoutEditor layoutEditor = canvas.getLayoutEditor();
- for (CanvasSelection cs : selection) {
+ for (SelectionItem cs : selection) {
CanvasViewInfo vi = cs.getViewInfo();
UiViewElementNode key = vi.getUiViewNode();
Node node = key.getXmlNode();
@@ -186,10 +186,10 @@ import java.util.List;
* @param items Items to wrap in elements
* @return An array of wrapper elements. Never null.
*/
- /* package */ static SimpleElement[] getAsElements(List<CanvasSelection> items) {
+ /* package */ static SimpleElement[] getAsElements(List<SelectionItem> items) {
ArrayList<SimpleElement> elements = new ArrayList<SimpleElement>();
- for (CanvasSelection cs : items) {
+ for (SelectionItem cs : items) {
CanvasViewInfo vi = cs.getViewInfo();
SimpleElement e = vi.toSimpleElement();
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionManager.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionManager.java
index 136414e..5e93adb 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionManager.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionManager.java
@@ -60,10 +60,10 @@ public class SelectionManager implements ISelectionProvider {
private LayoutCanvas mCanvas;
/** The current selection list. The list is never null, however it can be empty. */
- private final LinkedList<CanvasSelection> mSelections = new LinkedList<CanvasSelection>();
+ private final LinkedList<SelectionItem> mSelections = new LinkedList<SelectionItem>();
/** An unmodifiable view of {@link #mSelections}. */
- private final List<CanvasSelection> mUnmodifiableSelection =
+ private final List<SelectionItem> mUnmodifiableSelection =
Collections.unmodifiableList(mSelections);
/** Barrier set when updating the selection to prevent from recursively
@@ -98,13 +98,13 @@ public class SelectionManager implements ISelectionProvider {
}
/**
- * Returns the native {@link CanvasSelection} list.
+ * Returns the native {@link SelectionItem} list.
*
- * @return An immutable list of {@link CanvasSelection}. Can be empty but not null.
+ * @return An immutable list of {@link SelectionItem}. Can be empty but not null.
* @see #getSelection() {@link #getSelection()} to retrieve a {@link TreeViewer}
* compatible {@link ISelection}.
*/
- /* package */ List<CanvasSelection> getSelections() {
+ /* package */ List<SelectionItem> getSelections() {
return mUnmodifiableSelection;
}
@@ -114,8 +114,8 @@ public class SelectionManager implements ISelectionProvider {
*
* @return A copy of the current selection. Never null.
*/
- /* package */ List<CanvasSelection> getSnapshot() {
- return new ArrayList<CanvasSelection>(mSelections);
+ /* package */ List<SelectionItem> getSnapshot() {
+ return new ArrayList<SelectionItem>(mSelections);
}
/**
@@ -129,7 +129,7 @@ public class SelectionManager implements ISelectionProvider {
ArrayList<TreePath> paths = new ArrayList<TreePath>();
- for (CanvasSelection cs : mSelections) {
+ for (SelectionItem cs : mSelections) {
CanvasViewInfo vi = cs.getViewInfo();
if (vi != null) {
ArrayList<Object> segments = new ArrayList<Object>();
@@ -184,7 +184,7 @@ public class SelectionManager implements ISelectionProvider {
// Create a list of all currently selected view infos
Set<CanvasViewInfo> oldSelected = new HashSet<CanvasViewInfo>();
- for (CanvasSelection cs : mSelections) {
+ for (SelectionItem cs : mSelections) {
oldSelected.add(cs.getViewInfo());
}
@@ -263,7 +263,7 @@ public class SelectionManager implements ISelectionProvider {
// Otherwise we select the item under the cursor.
if (!isCycleClick && !isMultiClick) {
- for (CanvasSelection cs : mSelections) {
+ for (SelectionItem cs : mSelections) {
if (cs.getRect().contains(p.x, p.y)) {
// The cursor is inside the selection. Don't change anything.
return;
@@ -395,7 +395,7 @@ public class SelectionManager implements ISelectionProvider {
/** Returns true if the view hierarchy is showing exploded items. */
private boolean hasExplodedItems() {
- for (CanvasSelection item : mSelections) {
+ for (SelectionItem item : mSelections) {
if (item.getViewInfo().isExploded()) {
return true;
}
@@ -528,8 +528,8 @@ public class SelectionManager implements ISelectionProvider {
return false;
}
- for (ListIterator<CanvasSelection> it = mSelections.listIterator(); it.hasNext(); ) {
- CanvasSelection s = it.next();
+ for (ListIterator<SelectionItem> it = mSelections.listIterator(); it.hasNext(); ) {
+ SelectionItem s = it.next();
if (canvasViewInfo == s.getViewInfo()) {
it.remove();
return true;
@@ -544,8 +544,8 @@ public class SelectionManager implements ISelectionProvider {
* Callers are responsible for calling redraw() and updateOulineSelection() after.
*/
private void deselectAll(List<CanvasViewInfo> canvasViewInfos) {
- for (ListIterator<CanvasSelection> it = mSelections.listIterator(); it.hasNext(); ) {
- CanvasSelection s = it.next();
+ for (ListIterator<SelectionItem> it = mSelections.listIterator(); it.hasNext(); ) {
+ SelectionItem s = it.next();
if (canvasViewInfos.contains(s.getViewInfo())) {
it.remove();
}
@@ -556,8 +556,8 @@ public class SelectionManager implements ISelectionProvider {
/* package */ void sync(CanvasViewInfo lastValidViewInfoRoot) {
// Check if the selection is still the same (based on the object keys)
// and eventually recompute their bounds.
- for (ListIterator<CanvasSelection> it = mSelections.listIterator(); it.hasNext(); ) {
- CanvasSelection s = it.next();
+ for (ListIterator<SelectionItem> it = mSelections.listIterator(); it.hasNext(); ) {
+ SelectionItem s = it.next();
// Check if the selected object still exists
ViewHierarchy viewHierarchy = mCanvas.getViewHierarchy();
@@ -623,13 +623,13 @@ public class SelectionManager implements ISelectionProvider {
* given list is going to be altered and we should never alter the user-made selection.
* Instead the caller should provide its own copy.
*/
- /* package */ static void sanitize(List<CanvasSelection> selection) {
+ /* package */ static void sanitize(List<SelectionItem> selection) {
if (selection.isEmpty()) {
return;
}
- for (Iterator<CanvasSelection> it = selection.iterator(); it.hasNext(); ) {
- CanvasSelection cs = it.next();
+ for (Iterator<SelectionItem> it = selection.iterator(); it.hasNext(); ) {
+ SelectionItem cs = it.next();
CanvasViewInfo vi = cs.getViewInfo();
UiViewElementNode key = vi == null ? null : vi.getUiViewNode();
Node node = key == null ? null : key.getXmlNode();
@@ -640,9 +640,9 @@ public class SelectionManager implements ISelectionProvider {
}
if (vi != null) {
- for (Iterator<CanvasSelection> it2 = selection.iterator();
+ for (Iterator<SelectionItem> it2 = selection.iterator();
it2.hasNext(); ) {
- CanvasSelection cs2 = it2.next();
+ SelectionItem cs2 = it2.next();
if (cs != cs2) {
CanvasViewInfo vi2 = cs2.getViewInfo();
if (vi.isParent(vi2)) {
@@ -665,8 +665,8 @@ public class SelectionManager implements ISelectionProvider {
mCanvas.redraw();
}
- private CanvasSelection createSelection(CanvasViewInfo vi) {
- return new CanvasSelection(vi, mCanvas.getRulesEngine(),
+ private SelectionItem createSelection(CanvasViewInfo vi) {
+ return new SelectionItem(vi, mCanvas.getRulesEngine(),
mCanvas.getNodeFactory());
}
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionOverlay.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionOverlay.java
index 696ca49..94c917c 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionOverlay.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionOverlay.java
@@ -46,11 +46,11 @@ public class SelectionOverlay extends Overlay {
*/
public void paint(SelectionManager selectionManager, GCWrapper gcWrapper,
RulesEngine rulesEngine) {
- List<CanvasSelection> selections = selectionManager.getSelections();
+ List<SelectionItem> selections = selectionManager.getSelections();
int n = selections.size();
if (n > 0) {
boolean isMultipleSelection = n > 1;
- for (CanvasSelection s : selections) {
+ for (SelectionItem s : selections) {
if (s.isRoot()) {
// The root selection is never painted
continue;