cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skolbac...@apache.org
Subject cayenne git commit: CAY-1990 | Incorrect display of the raw SQL query in Modeler
Date Wed, 11 Mar 2015 14:05:59 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master b32a7df26 -> aff4f1c08


CAY-1990 | Incorrect display of the raw SQL query in Modeler


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/aff4f1c0
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/aff4f1c0
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/aff4f1c0

Branch: refs/heads/master
Commit: aff4f1c08ef474ca27f7e022e6d62ee9ccc22ebf
Parents: b32a7df
Author: Savva Kolbachev <s.kolbachev@gmail.com>
Authored: Wed Mar 11 17:05:01 2015 +0300
Committer: Savva Kolbachev <s.kolbachev@gmail.com>
Committed: Wed Mar 11 17:05:01 2015 +0300

----------------------------------------------------------------------
 .../apache/cayenne/modeler/ProjectTreeView.java |  2 +-
 .../modeler/editor/SQLTemplateScriptsTab.java   | 54 ++++++++++----------
 2 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/aff4f1c0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeView.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeView.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeView.java
index f04abae..b38a7aa 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeView.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectTreeView.java
@@ -435,7 +435,7 @@ public class ProjectTreeView extends JTree implements DomainDisplayListener,
                     e.getDomain() != null
                             ? e.getDomain()
                             : (DataChannelDescriptor) mediator.getProject().getRootNode(),
-                    e.getQuery()
+                    e.getQuery().getDataMap(), e.getQuery()
             };
 
             updateNode(path);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/aff4f1c0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/SQLTemplateScriptsTab.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/SQLTemplateScriptsTab.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/SQLTemplateScriptsTab.java
index 6dd95c0..6a3d1b6 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/SQLTemplateScriptsTab.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/SQLTemplateScriptsTab.java
@@ -19,34 +19,16 @@
 
 package org.apache.cayenne.modeler.editor;
 
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JList;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.ListSelectionModel;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.Document;
-
+import com.jgoodies.forms.builder.PanelBuilder;
+import com.jgoodies.forms.layout.CellConstraints;
+import com.jgoodies.forms.layout.FormLayout;
 import org.apache.cayenne.configuration.event.QueryEvent;
 import org.apache.cayenne.modeler.Application;
 import org.apache.cayenne.modeler.ProjectController;
 import org.apache.cayenne.modeler.util.DbAdapterInfo;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLTemplate;
+import org.apache.cayenne.swing.components.textpane.syntax.SQLSyntaxConstants;
 import org.apache.cayenne.util.Util;
 import org.syntax.jedit.JEditTextArea;
 import org.syntax.jedit.KeywordMap;
@@ -55,9 +37,26 @@ import org.syntax.jedit.tokenmarker.SQLTokenMarker;
 import org.syntax.jedit.tokenmarker.Token;
 import org.syntax.jedit.tokenmarker.TokenMarker;
 
-import com.jgoodies.forms.builder.PanelBuilder;
-import com.jgoodies.forms.layout.CellConstraints;
-import com.jgoodies.forms.layout.FormLayout;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
 
 /**
  * A panel for configuring SQL scripts of a SQL template.
@@ -140,10 +139,11 @@ public class SQLTemplateScriptsTab extends JPanel implements DocumentListener
{
         scripts.setModel(new DefaultComboBoxModel(keys.toArray()));
         
         scriptArea = Application.getWidgetFactory().createJEditTextArea();
-        
+
         scriptArea.setTokenMarker(SQL_TEMPLATE_MARKER);
         scriptArea.getDocument().addDocumentListener(this);
-        
+        scriptArea.getPainter().setFont(SQLSyntaxConstants.DEFAULT_FONT);
+
         // assemble
         CellConstraints cc = new CellConstraints();
         PanelBuilder builder = new PanelBuilder(new FormLayout(


Mime
View raw message