cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/2] cayenne git commit: Reverse Engineering: return "Reengineer Database Schema" tool menu button
Date Tue, 03 Apr 2018 11:18:28 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 4aec5a878 -> fa7e3fac7


Reverse Engineering: return "Reengineer Database Schema" tool menu button


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

Branch: refs/heads/master
Commit: 061ca8ac60f1bfbc2089251b22a7b7ce1add9b94
Parents: 4aec5a8
Author: Maxim Petrusevich <maks1464@gmail.com>
Authored: Fri Mar 30 11:58:47 2018 +0300
Committer: Maxim Petrusevich <maks1464@gmail.com>
Committed: Fri Mar 30 11:58:47 2018 +0300

----------------------------------------------------------------------
 .../cayenne/modeler/CayenneModelerFrame.java    |  2 +
 .../modeler/action/DefaultActionManager.java    |  5 ++-
 .../ReverseEngineeringToolMenuAction.java       | 46 ++++++++++++++++++++
 3 files changed, 52 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/061ca8ac/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java
index ffc02fa..507919d 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerFrame.java
@@ -87,6 +87,7 @@ import org.apache.cayenne.modeler.action.SaveAsAction;
 import org.apache.cayenne.modeler.action.ShowLogConsoleAction;
 import org.apache.cayenne.modeler.action.UndoAction;
 import org.apache.cayenne.modeler.action.ValidateAction;
+import org.apache.cayenne.modeler.action.dbimport.ReverseEngineeringToolMenuAction;
 import org.apache.cayenne.modeler.dialog.LogConsole;
 import org.apache.cayenne.modeler.dialog.welcome.WelcomeScreen;
 import org.apache.cayenne.modeler.editor.EditorView;
@@ -232,6 +233,7 @@ public class CayenneModelerFrame extends JFrame implements DataNodeDisplayListen
         projectMenu.addSeparator();
         projectMenu.add(getAction(RemoveAction.class).buildMenu());
 
+        toolMenu.add(getAction(ReverseEngineeringToolMenuAction.class).buildMenu());
         toolMenu.add(getAction(InferRelationshipsAction.class).buildMenu());
         toolMenu.add(getAction(ImportEOModelAction.class).buildMenu());
         toolMenu.addSeparator();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/061ca8ac/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
index 3d9d586..c476fff 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/DefaultActionManager.java
@@ -34,6 +34,7 @@ import org.apache.cayenne.modeler.action.dbimport.DeleteNodeAction;
 import org.apache.cayenne.modeler.action.dbimport.EditNodeAction;
 import org.apache.cayenne.modeler.action.dbimport.MoveImportNodeAction;
 import org.apache.cayenne.modeler.action.dbimport.MoveInvertNodeAction;
+import org.apache.cayenne.modeler.action.dbimport.ReverseEngineeringToolMenuAction;
 import org.apache.cayenne.modeler.graph.action.ShowGraphEntityAction;
 import org.apache.cayenne.modeler.util.CayenneAction;
 import org.apache.cayenne.project.ConfigurationNodeParentGetter;
@@ -107,6 +108,7 @@ public class DefaultActionManager implements ActionManager {
         registerAction(new ObjEntityToSuperEntityAction(application));
         registerAction(new ReverseEngineeringAction(application));
         registerAction(new InferRelationshipsAction(application));
+        registerAction(new ReverseEngineeringToolMenuAction(application));
         registerAction(new ImportEOModelAction(application));
         registerAction(new GenerateDBAction(application));
         registerAction(new MigrateAction(application));
@@ -192,7 +194,8 @@ public class DefaultActionManager implements ActionManager {
                 ImportEOModelAction.class.getName(),
                 GenerateCodeAction.class.getName(),
                 GenerateDBAction.class.getName(),
-                PasteAction.class.getName()));
+                PasteAction.class.getName(),
+                ReverseEngineeringToolMenuAction.class.getName()));
 
         DATA_NODE_ACTIONS = new HashSet<>(DOMAIN_ACTIONS);
         DATA_NODE_ACTIONS.addAll(Arrays.asList(

http://git-wip-us.apache.org/repos/asf/cayenne/blob/061ca8ac/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/dbimport/ReverseEngineeringToolMenuAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/dbimport/ReverseEngineeringToolMenuAction.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/dbimport/ReverseEngineeringToolMenuAction.java
new file mode 100644
index 0000000..666d906
--- /dev/null
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/dbimport/ReverseEngineeringToolMenuAction.java
@@ -0,0 +1,46 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+
+package org.apache.cayenne.modeler.action.dbimport;
+
+import org.apache.cayenne.modeler.Application;
+import org.apache.cayenne.modeler.util.CayenneAction;
+
+import javax.swing.JOptionPane;
+import java.awt.event.ActionEvent;
+
+/**
+ * @since 4.1
+ */
+public class ReverseEngineeringToolMenuAction extends CayenneAction {
+
+    private static final String ACTION_NAME = "Reengineer Database Schema";
+    private static final String DIALOG_TITLE = "Reverse Engineering";
+
+    public ReverseEngineeringToolMenuAction(Application application) {
+        super(ACTION_NAME, application);
+    }
+
+    @Override
+    public void performAction(ActionEvent e) {
+        JOptionPane.showMessageDialog(null, "Reverse Engineering was moved to DataMap tabs.\n"
+
+                "You will find new Reverse Engineering in DataMap \u2192 DbImport tab.",
DIALOG_TITLE,
+                JOptionPane.INFORMATION_MESSAGE);
+    }
+}


Mime
View raw message