cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abulat...@apache.org
Subject [cayenne] branch STABLE-4.1 updated: Modeler: cgen templates fix.
Date Mon, 08 Apr 2019 12:14:07 GMT
This is an automated email from the ASF dual-hosted git repository.

abulatski pushed a commit to branch STABLE-4.1
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/STABLE-4.1 by this push:
     new 8c4ac89  Modeler: cgen templates fix.
8c4ac89 is described below

commit 8c4ac895876d0a965674249c3dbc466f7bd8ba92
Author: Arseni Bulatski <ancarseni@gmail.com>
AuthorDate: Mon Apr 8 14:40:17 2019 +0300

    Modeler: cgen templates fix.
    
    (cherry picked from commit 366c4fc6474be9891a30bb0b910e6b4cf458f96d)
---
 .../apache/cayenne/modeler/editor/cgen/ClientModeController.java   | 3 +++
 .../apache/cayenne/modeler/editor/cgen/StandardModeController.java | 7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/ClientModeController.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/ClientModeController.java
index b55c24b..12a99d8 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/ClientModeController.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/ClientModeController.java
@@ -20,6 +20,7 @@
 package org.apache.cayenne.modeler.editor.cgen;
 
 import org.apache.cayenne.gen.CgenConfiguration;
+import org.apache.cayenne.gen.ClientClassGenerationAction;
 
 /**
  * @since 4.1
@@ -38,5 +39,7 @@ public class ClientModeController extends StandardModeController {
     @Override
     public void updateConfiguration(CgenConfiguration cgenConfiguration) {
         cgenConfiguration.setClient(true);
+        cgenConfiguration.setTemplate(ClientClassGenerationAction.SUBCLASS_TEMPLATE);
+        cgenConfiguration.setSuperTemplate(ClientClassGenerationAction.SUPERCLASS_TEMPLATE);
     }
 }
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/StandardModeController.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/StandardModeController.java
index ba4344e..e640dd0 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/StandardModeController.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/StandardModeController.java
@@ -19,11 +19,12 @@
 
 package org.apache.cayenne.modeler.editor.cgen;
 
+import java.awt.*;
+
 import org.apache.cayenne.gen.CgenConfiguration;
+import org.apache.cayenne.gen.ClassGenerationAction;
 import org.apache.cayenne.modeler.pref.DataMapDefaults;
 
-import java.awt.Component;
-
 /**
  * @since 4.1
  */
@@ -54,6 +55,8 @@ public class StandardModeController extends GeneratorController {
     @Override
     public void updateConfiguration(CgenConfiguration cgenConfiguration) {
         cgenConfiguration.setClient(false);
+        cgenConfiguration.setTemplate(ClassGenerationAction.SUBCLASS_TEMPLATE);
+        cgenConfiguration.setSuperTemplate(ClassGenerationAction.SUPERCLASS_TEMPLATE);
     }
 
 }


Mime
View raw message