diff options
author | Tor Norbye <tnorbye@google.com> | 2012-06-01 11:59:35 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-06-01 11:59:35 -0700 |
commit | 183c0064d7930563bd2d0b6b6fb6735f8cc34c2b (patch) | |
tree | 48589bb65df83d177edc5f1bd1e7d7e134d59330 | |
parent | 55121851dcb45f8474c2e895eb14cc8974045c86 (diff) | |
download | sdk-183c0064d7930563bd2d0b6b6fb6735f8cc34c2b.zip sdk-183c0064d7930563bd2d0b6b6fb6735f8cc34c2b.tar.gz sdk-183c0064d7930563bd2d0b6b6fb6735f8cc34c2b.tar.bz2 |
Fix 32527: Menu XML editor "add" button problem on Eclipse 4.2
This adds a workaround for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381418
Change-Id: I6a68602cd65a8656e4a6f62bf3b181045956136c
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/NewItemSelectionDialog.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/NewItemSelectionDialog.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/NewItemSelectionDialog.java index d880f3d..385a53a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/NewItemSelectionDialog.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/NewItemSelectionDialog.java @@ -29,9 +29,11 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.dialogs.AbstractElementListSelectionDialog; @@ -278,6 +280,15 @@ public class NewItemSelectionDialog extends AbstractElementListSelectionDialog { createFilterText(contents); createFilteredList(contents); + // We don't want the builtin message area label (we use a radio control + // instead), but if we don't create it, Bad Stuff happens on + // Eclipse 3.8 and later (see issue 32527). + Label label = createMessageArea(contents); + if (label != null) { + GridData data = (GridData) label.getLayoutData(); + data.exclude = true; + } + // Initialize the list state. // This must be done after the filtered list as been created. chooseNode(mChosenRootNode); |