[jbosstools-commits] JBoss Tools SVN: r6934 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Mar 14 10:15:49 EDT 2008


Author: dgeraskov
Date: 2008-03-14 10:15:48 -0400 (Fri, 14 Mar 2008)
New Revision: 6934

Modified:
   trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1868

Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java	2008-03-14 13:57:08 UTC (rev 6933)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java	2008-03-14 14:15:48 UTC (rev 6934)
@@ -24,7 +24,6 @@
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.jface.viewers.TreeSelection;
@@ -32,7 +31,6 @@
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.actions.SelectionListenerAction;
 import org.eclipse.ui.part.MultiPageEditorPart;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
 import org.eclipse.ui.texteditor.ITextEditor;
 import org.hibernate.console.ConsoleConfiguration;
 import org.hibernate.eclipse.console.HibernateConsolePlugin;
@@ -106,6 +104,7 @@
 		IEditorPart editorPart = null;
 		IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
 		java.io.File configXMLFile = consoleConfiguration.getPreferences().getConfigXMLFile();
+		if (configXMLFile == null) return null;
 		IResource resource = null;
 		if (selection instanceof Property){
 			Property p = (Property)selection;
@@ -159,6 +158,7 @@
 		if (parentProperty.getPersistentClass() == null) return null;
 		IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
 		java.io.File configXMLFile = consoleConfiguration.getPreferences().getConfigXMLFile();
+		if (configXMLFile == null) return null;
 		IResource resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, parentProperty.getPersistentClass());
 
 		IEditorPart editorPart = null;




More information about the jbosstools-commits mailing list