From c5e3fb28271c347cdb1a54559213c26159c45439 Mon Sep 17 00:00:00 2001 From: Raphael Moll Date: Tue, 7 Sep 2010 14:12:40 -0700 Subject: GLE2: fix executing actions on multi-selection Change-Id: I057dca413d81c9ae3e00bc074eeb31b032f7e85e --- .../eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java | 4 ++-- .../ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'eclipse/plugins') 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 da7d643..96db650 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 @@ -208,7 +208,7 @@ import java.util.regex.Pattern; final TreeMap> outActionsMap, final TreeMap outGroupsMap) { int maxMenuSelection = 0; - for (CanvasSelection selection : mCanvas.getCanvasSelection()) { + for (CanvasSelection selection : mCanvas.getCanvasSelections()) { List viewActions = null; if (selection != null) { CanvasViewInfo vi = selection.getViewInfo(); @@ -244,7 +244,7 @@ import java.util.regex.Pattern; // All the actions for the same id should have be equal if (!actions.isEmpty()) { - if (action.equals(actions.get(0))) { + if (!action.equals(actions.get(0))) { // TODO Log verbose error for invalid type mismatch. continue; } 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 4de76f9..9cb6385 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 @@ -442,11 +442,11 @@ class LayoutCanvas extends Canvas implements ISelectionProvider { /** * Returns the native {@link CanvasSelection} list. * - * @return An immutable list of {@link CanvasSelection} + * @return An immutable list of {@link CanvasSelection}. Can be empty but not null. * @see #getSelection() {@link #getSelection()} to retrieve a {@link TreeViewer} * compatible {@link ISelection}. */ - /* package */ List getCanvasSelection() { + /* package */ List getCanvasSelections() { if (mUnmodifiableSelection == null) { mUnmodifiableSelection = Collections.unmodifiableList(mSelections); } -- cgit v1.1