[jboss-cvs] jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views ...
Max Rydahl Andersen
mandersen at jboss.com
Thu Sep 21 18:28:55 EDT 2006
User: mandersen
Date: 06/09/21 18:28:55
Modified: hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views
DynamicSQLPreviewView.java
Log:
message when query is empty
Revision Changes Path
1.4 +4 -1 jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DynamicSQLPreviewView.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- DynamicSQLPreviewView.java 7 Jul 2006 13:51:09 -0000 1.3
+++ DynamicSQLPreviewView.java 21 Sep 2006 22:28:55 -0000 1.4
@@ -47,6 +47,7 @@
import org.hibernate.classic.Session;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.eclipse.console.QueryEditor;
import org.hibernate.eclipse.console.utils.QLFormatHelper;
import org.hibernate.eclipse.hqleditor.HQLEditor;
import org.hibernate.eclipse.hqleditor.HQLSourceViewer;
@@ -134,7 +135,9 @@
if(textViewer!=null && textViewer.getDocument()!=null) {
if(editor!=null) {
ConsoleConfiguration consoleConfiguration = editor.getConsoleConfiguration();
- if(consoleConfiguration!=null) {
+ if(StringHelper.isEmpty( editor.getQueryString() )) {
+ textViewer.getDocument().set( "Empty HQL query." );
+ } else if(consoleConfiguration!=null) {
if(consoleConfiguration.isSessionFactoryCreated()) {
String generateSQL = generateSQL(consoleConfiguration.getExecutionContext(), consoleConfiguration.getSessionFactory(), editor.getQueryString());
if(StringHelper.isEmpty( generateSQL )) {
More information about the jboss-cvs-commits
mailing list