cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [2/3] cayenne git commit: Modeler: always force run code generator
Date Thu, 08 Feb 2018 13:01:57 GMT
Modeler: always force run code generator


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

Branch: refs/heads/master
Commit: bc8441a06e9331fcd167c0c77acc18c6e652e493
Parents: 7ae8532
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Thu Feb 8 14:40:31 2018 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Thu Feb 8 14:40:31 2018 +0300

----------------------------------------------------------------------
 .../cayenne/modeler/dialog/codegen/GeneratorController.java  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/bc8441a0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/GeneratorController.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/GeneratorController.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/GeneratorController.java
index e105445..b369928 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/GeneratorController.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/GeneratorController.java
@@ -160,12 +160,7 @@ public abstract class GeneratorController extends CayenneController {
 
         // remove generic entities...
         Collection<ObjEntity> selectedEntities = new ArrayList<>(getParentController().getSelectedEntities());
-        Iterator<ObjEntity> it = selectedEntities.iterator();
-        while (it.hasNext()) {
-            if (it.next().isGeneric()) {
-                it.remove();
-            }
-        }
+        selectedEntities.removeIf(ObjEntity::isGeneric);
 
         Collection<ClassGenerationAction> generators = new ArrayList<>();
         Collection<StandardPanelComponent> dataMapLines = ((GeneratorControllerPanel)
getView()).getDataMapLines();
@@ -194,6 +189,7 @@ public abstract class GeneratorController extends CayenneController {
 
                 generator.setDestDir(outputDir);
                 generator.setMakePairs(true);
+                generator.setForce(true);
 
                 for (StandardPanelComponent dataMapLine : dataMapLines) {
                     if (dataMapLine.getDataMap() == map && !Util.isEmptyString(dataMapLine.getSuperclassPackage().getText()))
{


Mime
View raw message