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-1992 | Allow to exclude DataMap java class from Modeler class generation
Date Tue, 17 Mar 2015 11:58:08 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 41d362b0c -> 0aa378161


CAY-1992 | Allow to exclude DataMap java class from Modeler class generation


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

Branch: refs/heads/master
Commit: 0aa3781615804b2098fd362429c112942d6d2a43
Parents: 41d362b
Author: Savva Kolbachev <s.kolbachev@gmail.com>
Authored: Tue Mar 17 14:56:37 2015 +0300
Committer: Savva Kolbachev <s.kolbachev@gmail.com>
Committed: Tue Mar 17 14:57:13 2015 +0300

----------------------------------------------------------------------
 docs/doc/src/main/resources/RELEASE-NOTES.txt               | 1 +
 .../modeler/dialog/codegen/StandardModeController.java      | 4 +++-
 .../cayenne/modeler/dialog/codegen/StandardModePanel.java   | 9 +++++++++
 3 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/0aa37816/docs/doc/src/main/resources/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/RELEASE-NOTES.txt b/docs/doc/src/main/resources/RELEASE-NOTES.txt
index 6ad161d..b4d0b1a 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -14,6 +14,7 @@ Date:
 ----------------------------------
 Changes/New Features:
 
+CAY-1992 Allow to exclude DataMap java class from Modeler class generation
 CAY-1991 More control over generated String property names
 
 Bug Fixes:

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0aa37816/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModeController.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModeController.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModeController.java
index 0ca2270..e700779 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModeController.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModeController.java
@@ -98,7 +98,9 @@ public class StandardModeController extends GeneratorController {
 
     @Override
     public Collection<ClassGenerationAction> createGenerator() {
-        mode = ArtifactsGenerationMode.ALL.getLabel();
+        mode = view.getCreateDataMapClass().isSelected()
+                ? ArtifactsGenerationMode.ALL.getLabel()
+                : ArtifactsGenerationMode.ENTITY.getLabel();
         return super.createGenerator();
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0aa37816/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModePanel.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModePanel.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModePanel.java
index c0cca1c..199d511 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModePanel.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/StandardModePanel.java
@@ -22,11 +22,13 @@ package org.apache.cayenne.modeler.dialog.codegen;
 import com.jgoodies.forms.builder.DefaultFormBuilder;
 import com.jgoodies.forms.layout.FormLayout;
 
+import javax.swing.JCheckBox;
 import java.awt.BorderLayout;
 
 public class StandardModePanel extends GeneratorControllerPanel {
 
     private DefaultFormBuilder builder;
+    protected JCheckBox createDataMapClass;
 
     public StandardModePanel() {
         FormLayout layout = new FormLayout(
@@ -36,6 +38,10 @@ public class StandardModePanel extends GeneratorControllerPanel {
         builder.append("Output Directory:", outputFolder, selectOutputFolder);
         builder.nextLine();
 
+        createDataMapClass = new JCheckBox();
+        builder.append("Create DataMap class:", createDataMapClass);
+        builder.nextLine();
+
         setLayout(new BorderLayout());
         add(builder.getPanel(), BorderLayout.CENTER);
     }
@@ -46,4 +52,7 @@ public class StandardModePanel extends GeneratorControllerPanel {
         builder.nextLine();
     }
 
+    public JCheckBox getCreateDataMapClass() {
+        return createDataMapClass;
+    }
 }
\ No newline at end of file


Mime
View raw message