cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/3] cayenne git commit: bug-fix: change action priority in performAction (change if-else sequence)
Date Tue, 04 Apr 2017 13:38:39 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 27637e16b -> b3b6e03cf


bug-fix: change action priority in performAction (change if-else sequence)


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

Branch: refs/heads/master
Commit: 8926738cd2af3d17fb1431c319b12c2288563039
Parents: 4a6dbf1
Author: Maxim Petrusevich <mpetrusevich@objectstyle.com>
Authored: Tue Apr 4 15:19:56 2017 +0300
Committer: Maxim Petrusevich <mpetrusevich@objectstyle.com>
Committed: Tue Apr 4 15:19:56 2017 +0300

----------------------------------------------------------------------
 docs/doc/src/main/resources/RELEASE-NOTES.txt   |  1 +
 .../cayenne/modeler/action/RemoveAction.java    | 44 ++++++++++----------
 2 files changed, 22 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/8926738c/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 058e88c..22fc18a 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -34,6 +34,7 @@ CAY-2077 Bug in CayenneRuntimeException using wrong specified string in
Formatte
 CAY-2094 SelectById query doesn't work from ROP client
 CAY-2240 Modeler: issue with cursor rendering for EJBQL query
 CAY-2243 ObjectContext.getGraphManager().unregisterObject() inconsistencies
+CAY-2250 Remove: Incorrect text in Confirm Remove message when cursor is set on attribute
row
 CAY-2256 Cannot Save/Insert an Object With null Flattened (complex) toOne Relationship (see
also CAY-2146)
 CAY-2265 ServerRuntime.builder() fails to set default runtime name when a the project file
doesn't follow recognized pattern
 CAY-2273 Modeler: default suggested cgen location is rooted in subpackage

http://git-wip-us.apache.org/repos/asf/cayenne/blob/8926738c/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
index db1fee6..97c185c 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
@@ -129,29 +129,7 @@ public class RemoveAction extends CayenneAction {
         ProjectController mediator = getProjectController();
 
         ConfirmRemoveDialog dialog = getConfirmDeleteDialog(allowAsking);
-
-        if(mediator.getCurrentCallbackMethods().length > 0) {
-            removeMethods(mediator, dialog, getProjectController().getCurrentCallbackMethods());
-        }
-        else if(mediator.getCurrentObjRelationships().length > 0) {
-      		removeObjRelationships(mediator, dialog, getProjectController().getCurrentObjRelationships());
-        }
-        else if(mediator.getCurrentDbRelationships().length > 0) {
-      		removeDBRelationships(mediator, dialog, getProjectController().getCurrentDbRelationships());
-        }
-        else if(mediator.getCurrentObjAttributes().length > 0) {
-      		removeObjAttributes(mediator, dialog, getProjectController().getCurrentObjAttributes());
-        }
-        else if(mediator.getCurrentEmbAttributes().length > 0) {
-      		removeEmbAttributes(mediator, dialog, getProjectController().getCurrentEmbAttributes());
-        }
-        else if(mediator.getCurrentDbAttributes().length > 0) {
-        	removeDbAttributes(mediator, dialog, getProjectController().getCurrentDbAttributes());
-        }
-        else if(mediator.getCurrentProcedureParameters().length > 0) {
-        	removeProcedureParameters(mediator.getCurrentProcedure(), mediator.getCurrentProcedureParameters());
-        }
-        else if (mediator.getCurrentObjEntity() != null) {
+        if (mediator.getCurrentObjEntity() != null) {
             if (dialog
                     .shouldDelete("ObjEntity", mediator.getCurrentObjEntity().getName()))
{
                 application.getUndoManager().addEdit(
@@ -255,6 +233,26 @@ public class RemoveAction extends CayenneAction {
                 application.getUndoManager().addEdit(compoundEdit);
 
             }
+        } else if(mediator.getCurrentCallbackMethods().length > 0) {
+            removeMethods(mediator, dialog, getProjectController().getCurrentCallbackMethods());
+        }
+        else if(mediator.getCurrentObjRelationships().length > 0) {
+      		removeObjRelationships(mediator, dialog, getProjectController().getCurrentObjRelationships());
+        }
+        else if(mediator.getCurrentDbRelationships().length > 0) {
+      		removeDBRelationships(mediator, dialog, getProjectController().getCurrentDbRelationships());
+        }
+        else if(mediator.getCurrentObjAttributes().length > 0) {
+      		removeObjAttributes(mediator, dialog, getProjectController().getCurrentObjAttributes());
+        }
+        else if(mediator.getCurrentEmbAttributes().length > 0) {
+      		removeEmbAttributes(mediator, dialog, getProjectController().getCurrentEmbAttributes());
+        }
+        else if(mediator.getCurrentDbAttributes().length > 0) {
+        	removeDbAttributes(mediator, dialog, getProjectController().getCurrentDbAttributes());
+        }
+        else if(mediator.getCurrentProcedureParameters().length > 0) {
+        	removeProcedureParameters(mediator.getCurrentProcedure(), mediator.getCurrentProcedureParameters());
         }
 
     }


Mime
View raw message