cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abulat...@apache.org
Subject [cayenne] branch master updated: CAY-2603 NPE reloading project in the model
Date Thu, 01 Aug 2019 11:08:51 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new c4d0ddc  CAY-2603 NPE reloading project in the model
c4d0ddc is described below

commit c4d0ddc71b397873f7b32e10fe9c179a3c3da664
Author: Arseni Bulatski <ancarseni@gmail.com>
AuthorDate: Thu Aug 1 14:07:59 2019 +0300

    CAY-2603 NPE reloading project in the model
---
 RELEASE-NOTES.txt                                             |  1 +
 .../modeler/editor/cgen/CodeGeneratorControllerBase.java      | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index fe0dd80..022aa80 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -76,6 +76,7 @@ CAY-2594 DbImport: AutoAdapter resolving inside an import operation hangs
up the
 CAY-2595 ObjAttributes are not sorted in alphabetical ordering on save
 CAY-2596 DbImport xml config changes after dbImport plugin task execution
 CAY-2601 Modeler DbImport: result dialog issues
+CAY-2603 NPE reloading project in the model
 
 ----------------------------------
 Release: 4.1.B1
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CodeGeneratorControllerBase.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CodeGeneratorControllerBase.java
index 59f973e..1bc3987 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CodeGeneratorControllerBase.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/cgen/CodeGeneratorControllerBase.java
@@ -19,8 +19,10 @@
 
 package org.apache.cayenne.modeler.editor.cgen;
 
-import javax.swing.*;
-import java.awt.*;
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import java.awt.Component;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -80,6 +82,9 @@ public abstract class CodeGeneratorControllerBase extends CayenneController
{
         this.selectedEntitiesForDataMap = new HashMap<>();
         this.selectedEmbeddablesForDataMap = new HashMap<>();
         this.selectedDataMaps = new HashMap<>();
+        this.selectedEntities = new HashSet<>();
+        this.selectedEmbeddables = new HashSet<>();
+        this.isDataMapSelected = new HashSet<>();
     }
 
     public void startup(DataMap dataMap){
@@ -287,7 +292,7 @@ public abstract class CodeGeneratorControllerBase extends CayenneController
{
         else if (obj instanceof Embeddable) {
             name = ((Embeddable) obj).getClassName();
         }
-        
+
         if (validation == null) {
             return null;
         }


Mime
View raw message