aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2010-09-07 14:12:40 -0700
committerRaphael Moll <ralf@android.com>2010-09-08 11:15:11 -0700
commitc5e3fb28271c347cdb1a54559213c26159c45439 (patch)
tree4b5da2242136b36a0b2c210c898824aae2cc197f /eclipse/plugins
parentc18e2262a9d0270e77b21d4ed24adff8e94c149a (diff)
downloadsdk-c5e3fb28271c347cdb1a54559213c26159c45439.zip
sdk-c5e3fb28271c347cdb1a54559213c26159c45439.tar.gz
sdk-c5e3fb28271c347cdb1a54559213c26159c45439.tar.bz2
GLE2: fix executing actions on multi-selection
Change-Id: I057dca413d81c9ae3e00bc074eeb31b032f7e85e
Diffstat (limited to 'eclipse/plugins')
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java4
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java4
2 files changed, 4 insertions, 4 deletions
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<String, ArrayList<MenuAction>> outActionsMap,
final TreeMap<String, MenuAction.Group> outGroupsMap) {
int maxMenuSelection = 0;
- for (CanvasSelection selection : mCanvas.getCanvasSelection()) {
+ for (CanvasSelection selection : mCanvas.getCanvasSelections()) {
List<MenuAction> 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<CanvasSelection> getCanvasSelection() {
+ /* package */ List<CanvasSelection> getCanvasSelections() {
if (mUnmodifiableSelection == null) {
mUnmodifiableSelection = Collections.unmodifiableList(mSelections);
}