Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Spungin2014-06-16 13:40:52 -0400
committerSteven Spungin2014-06-16 13:40:52 -0400
commit7b2f86a49b3c3ce07fc06970f08b6df6d2d25491 (patch)
tree7d88bd650a965019bfd75011c47b86fd1be73c15
parente4f2eee5774edc96faa678085dfe6fdfc5699f24 (diff)
downloadorg.eclipse.e4.tools-7b2f86a49b3c3ce07fc06970f08b6df6d2d25491.tar.gz
org.eclipse.e4.tools-7b2f86a49b3c3ce07fc06970f08b6df6d2d25491.tar.xz
org.eclipse.e4.tools-7b2f86a49b3c3ce07fc06970f08b6df6d2d25491.zip
Bug 437552 - [model editor] NPE when opening live model editor withoutI20140616-2200
list tab enabled Change-Id: Ia6e47c514438614c9b248c405deab5d229028cf2 Signed-off-by: Steven Spungin <steven@spungin.tv>
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
index 4c4a8d87..90693188 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
@@ -10,7 +10,7 @@
* Wim Jongman <wim.jongman@remainsoftware.com> - Maintenance
* Marco Descher <marco@descher.at> - Bug395982, 426653, 422465
* Lars Vogel <Lars.Vogel@gmail.com> - Ongoing maintenance
- * Steven Spungin <steven@spungin.tv> - Bug 396902, 431755, 431735, 424730, 424730, 391089, 437236
+ * Steven Spungin <steven@spungin.tv> - Bug 396902, 431755, 431735, 424730, 424730, 391089, 437236, 437552
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common;
@@ -454,7 +454,7 @@ public class ModelEditor implements IGotoObject {
// Eventually, all 3 tabs, or even the ModelEditor itself, could
// implement the interface.
String key = "org.eclipse.e4.tools.active-object-viewer"; //$NON-NLS-1$
- if (editorTabFolder.getSelectionIndex() == getTabIndex(listTab.getTabItem())) {
+ if (listTab != null && editorTabFolder.getSelectionIndex() == getTabIndex(listTab.getTabItem())) {
app.getContext().set(key, listTab);
} else {
app.getContext().set(key, null);
@@ -1823,7 +1823,7 @@ public class ModelEditor implements IGotoObject {
}
break;
case TAB_LIST:
- if (tabItemList != null) {
+ if (tabItemList != null && listTab != null) {
editorTabFolder.setSelection(getTabIndex(tabItemList));
listTab.getViewer().setSelection(new StructuredSelection(object), true);
}

Back to the top