Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2010-12-10 04:05:21 +0000
committeratikhomirov2010-12-10 04:05:21 +0000
commitfe727600aefd70d0b6f4a89912abe127a2347975 (patch)
tree7d2b64dee575e8c9cfb675f2ffcf173225799914 /plugins
parentb36efa4a1ca07b80ab8d6360958fab81daaab004 (diff)
downloadorg.eclipse.gmf-tooling-fe727600aefd70d0b6f4a89912abe127a2347975.tar.gz
org.eclipse.gmf-tooling-fe727600aefd70d0b6f4a89912abe127a2347975.tar.xz
org.eclipse.gmf-tooling-fe727600aefd70d0b6f4a89912abe127a2347975.zip
[325648] NPE in getNavigatorSelection when diagram has no resource
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorLinkHelper.xpt5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorLinkHelper.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorLinkHelper.xpt
index 37f8f48be..1afe9ffbb 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorLinkHelper.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorLinkHelper.xpt
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2009 Borland Software Corporation
+ * Copyright (c) 2007, 2010 Borland Software Corporation and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -53,6 +53,9 @@ org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument do
«ENDREM»
«DEFINE getDiagramSelection FOR gmfgen::GenNavigatorChildReference-»
«EXPAND getDiagram FOR navigator.editorGen-»
+if (diagram == null || diagram.eResource() == null) {
+ return org.eclipse.jface.viewers.StructuredSelection.EMPTY;
+}
org.eclipse.core.resources.IFile file = org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
«IF isInsideGroup()-»

Back to the top