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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Jul 28 09:00:36 EDT 2008


Author: vyemialyanchyk
Date: 2008-07-28 09:00:36 -0400 (Mon, 28 Jul 2008)
New Revision: 9352

Modified:
   trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2561

Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java	2008-07-28 12:39:48 UTC (rev 9351)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java	2008-07-28 13:00:36 UTC (rev 9352)
@@ -180,11 +180,13 @@
 		CriteriaEditorInput hei = (CriteriaEditorInput)getEditorInput();
 		super.showEditorInput( editorInput );
 		IStorage storage = ((CriteriaEditorInput)editorInput).getStorage();
-		 if (storage instanceof CriteriaEditorStorage) {
-             CriteriaEditorStorage sqlEditorStorage = (CriteriaEditorStorage) storage;
-             IDocument document = getDocumentProvider().getDocument( hei );
-			document.set( sqlEditorStorage.getContentsString() );
-         }
+		if (storage instanceof CriteriaEditorStorage) {
+			CriteriaEditorStorage sqlEditorStorage = (CriteriaEditorStorage) storage;
+			IDocument document = getDocumentProvider().getDocument( hei );
+			if (document.get().compareTo(sqlEditorStorage.getContentsString()) != 0) {
+				document.set( sqlEditorStorage.getContentsString() );
+			}
+		}
 	}
 
 




More information about the jbosstools-commits mailing list