cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [cayenne] branch master updated: error message wording
Date Thu, 08 Oct 2020 15:07:34 GMT
This is an automated email from the ASF dual-hosted git repository.

aadamchik 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 6259e9d  error message wording
6259e9d is described below

commit 6259e9d2b7cff5769eaedcd13db24fb425078e70
Author: Andrus Adamchik <andrus@objectstyle.com>
AuthorDate: Thu Oct 8 18:07:16 2020 +0300

    error message wording
---
 .../cayenne/project/validation/ObjAttributeValidator.java   | 13 ++++---------
 .../cayenne/modeler/editor/ObjEntityAttributePanel.java     |  4 ++--
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/cayenne-project/src/main/java/org/apache/cayenne/project/validation/ObjAttributeValidator.java
b/cayenne-project/src/main/java/org/apache/cayenne/project/validation/ObjAttributeValidator.java
index 6ef710c..92da59b 100644
--- a/cayenne-project/src/main/java/org/apache/cayenne/project/validation/ObjAttributeValidator.java
+++ b/cayenne-project/src/main/java/org/apache/cayenne/project/validation/ObjAttributeValidator.java
@@ -18,18 +18,13 @@
  ****************************************************************/
 package org.apache.cayenne.project.validation;
 
-import java.util.Map;
-
 import org.apache.cayenne.exp.ExpressionException;
-import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.map.Embeddable;
-import org.apache.cayenne.map.EmbeddableAttribute;
-import org.apache.cayenne.map.EmbeddedAttribute;
-import org.apache.cayenne.map.ObjAttribute;
-import org.apache.cayenne.map.ObjEntity;
+import org.apache.cayenne.map.*;
 import org.apache.cayenne.util.Util;
 import org.apache.cayenne.validation.ValidationResult;
 
+import java.util.Map;
+
 class ObjAttributeValidator extends ConfigurationNodeValidator {
 
     void validate(ObjAttribute attribute, ValidationResult validationResult) {
@@ -85,7 +80,7 @@ class ObjAttributeValidator extends ConfigurationNodeValidator {
 
         ObjEntity superEntity = attribute.getEntity().getSuperEntity();
         if (selfAttribute && superEntity != null && superEntity.getAttribute(attribute.getName())
!= null) {
-            addFailure(validationResult, attribute, "'%s' and super '%s' can't have attribute
'%s' together ",
+            addFailure(validationResult, attribute, "'%s' and super '%s' can't both have
attribute '%s'",
                     attribute.getEntity().getName(), superEntity.getName(), attribute.getName());
         }
     }
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributePanel.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributePanel.java
index d4aff7b..52182ee 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributePanel.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributePanel.java
@@ -330,8 +330,8 @@ public class ObjEntityAttributePanel extends JPanel implements ObjEntityDisplayL
             if (objEntity.getDeclaredAttribute(e.getAttribute().getName()) != null) {
 
                 JOptionPane pane = new JOptionPane(
-                        String.format("'%s' and '%s' can't have attribute '%s' together.
" +
-                                        "Would you like to delete this attribute from the
'%s' class?",
+                        String.format("'%s' and '%s' can't both have attribute '%s'. " +
+                                        "Would you like to delete this attribute from the
'%s'?",
                                 objEntity.getName(), e.getEntity().getName(), e.getAttribute().getName(),
objEntity.getName()),
                         JOptionPane.QUESTION_MESSAGE,
                         JOptionPane.YES_NO_OPTION);


Mime
View raw message