[Jiemamy-notify:1508] commit [2727] コネクションの削除に対応。 /

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 2月 24日 (火) 21:55:39 JST


Revision: 2727
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2727
Author:   daisuke_m
Date:     2009-02-24 21:55:39 +0900 (Tue, 24 Feb 2009)

Log Message:
-----------
コネクションの削除に対応。 /
javadoc

Modified Paths:
--------------
    artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomParser.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AbstractJiemamyAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ChangeNodeBackgroundColorAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/FitNodeConstraintAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/PropertyAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeColorCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeConstraintCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateBendpointCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateNodeCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteBendpointCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteNodeCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DirectEditNodeCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditDatabaseModelCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditForeignKeyModelCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditTableModelCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditViewModelCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/MovePositionCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmConnectionEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmBendpointEditPolicy.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java

Added Paths:
-----------
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteConnectionCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmConnectionEditPolicy.java

Removed Paths:
-------------
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteRelationCommand.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmRelationEditPolicy.java


-------------- next part --------------
Modified: artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java
===================================================================
--- artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -43,6 +43,7 @@
 
 /**
  * モデルからSQLを構築するエクスポータ。
+ * 
  * @author daisuke
  */
 public class SqlExporter implements Exporter {

Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomParser.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomParser.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomParser.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -242,7 +242,7 @@
 			} else if (DomUtil.isEqualsQName(attributeElement, CoreQName.TABLE_CHECK_CONSTRAINT)) {
 				parseTableCheckConstraint(attributeElement, tableModel);
 			} else {
-				logger.warn("unknown attribute");
+				logger.warn("unknown attribute:" + attributeElement.getTagName());
 			}
 		}
 	}

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AbstractJiemamyAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AbstractJiemamyAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AbstractJiemamyAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -23,6 +23,7 @@
 
 /**
  * Jiemamyで使用するアクションの抽象クラス。
+ * 
  * @author daisuke
  */
 public abstract class AbstractJiemamyAction extends Action {
@@ -44,6 +45,7 @@
 	
 	/**
 	 * ビュアーを取得する。
+	 * 
 	 * @return ビュアー
 	 */
 	protected GraphicalViewer getViewer() {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -68,7 +68,7 @@
 	 * @param viewer
 	 */
 	public AutoLayoutAction(GraphicalViewer viewer) {
-		super("Auto Layout", viewer);
+		super("自動レイアウト(&L)", viewer); // RESOURCE
 	}
 	
 	@Override

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ChangeNodeBackgroundColorAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ChangeNodeBackgroundColorAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ChangeNodeBackgroundColorAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -36,6 +36,7 @@
 
 /**
  * ノード背景色変更アクション。
+ * 
  * @author daisuke
  */
 public class ChangeNodeBackgroundColorAction extends AbstractJiemamyAction {
@@ -46,7 +47,7 @@
 	 * @param viewer
 	 */
 	public ChangeNodeBackgroundColorAction(GraphicalViewer viewer) {
-		super("menu.color", viewer); // RESOURCE
+		super("色の変更(&C)", viewer); // RESOURCE
 	}
 	
 	@Override

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -38,7 +38,8 @@
 import org.jiemamy.model.RootModel;
 
 /**
- * UI付きPortアクション(import/export)クラス
+ * UI付きPortアクション(import/export)クラス。
+ * 
  * @author daisuke
  */
 public class ExportAction extends AbstractJiemamyAction {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/FitNodeConstraintAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/FitNodeConstraintAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/FitNodeConstraintAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -32,16 +32,20 @@
 
 /**
  * ノードのサイズをフィット(デフォルトサイズに変更)させるアクション。
+ * 
+ * <p>TODO コマンド化し、undo可能にする。</p>
+ * 
  * @author daisuke
  */
 public class FitNodeConstraintAction extends AbstractJiemamyAction {
 	
 	/**
 	 * インスタンスを生成する。
+	 * 
 	 * @param viewer
 	 */
 	public FitNodeConstraintAction(GraphicalViewer viewer) {
-		super("action.fit", viewer); // RESOURCE
+		super("サイズをデフォルトに戻す(&S)", viewer); // RESOURCE
 	}
 	
 	@Override

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -38,7 +38,8 @@
 import org.jiemamy.model.RootModel;
 
 /**
- * UI付きPortアクション(import/export)クラス
+ * UI付きPortアクション(import/export)クラス。
+ * 
  * @author daisuke
  */
 public class ImportAction extends AbstractJiemamyAction {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/PropertyAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/PropertyAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/PropertyAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -25,6 +25,7 @@
 
 /**
  * Propertiesアクション。
+ * 
  * @author daisuke
  */
 public class PropertyAction extends AbstractJiemamyAction {
@@ -34,7 +35,7 @@
 	 * @param viewer
 	 */
 	public PropertyAction(GraphicalViewer viewer) {
-		super("menu.property", viewer); // RESOURCE
+		super("プロパティ(&P)", viewer); // RESOURCE
 	}
 	
 	@Override

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -63,6 +63,7 @@
 
 /**
  * ダイアグラム画像保存機能アクション。
+ * 
  * @author daisuke
  */
 public class SaveDiagramImageAction extends AbstractJiemamyAction {
@@ -82,11 +83,12 @@
 
 	/**
 	 * インスタンスを生成する。
+	 * 
 	 * @param viewer
 	 * @param editor
 	 */
 	public SaveDiagramImageAction(GraphicalViewer viewer, DiagramEditor editor) {
-		super("menu.saveImage", viewer); // RESOURCE
+		super("画像として保存(&G)", viewer); // RESOURCE
 		this.editor = editor;
 	}
 	

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -108,7 +108,7 @@
 		
 		List<Importer> importers = JiemamyPlugin.getImporterResolver().getAllInstance();
 		if (importers.size() > 0) {
-			MenuManager importMenu = new MenuManager("menu.import"); // RESOURCE
+			MenuManager importMenu = new MenuManager("インポート(&I)"); // RESOURCE
 			for (Importer importer : importers) {
 				importMenu.add(new ImportAction(importer, viewer, editorPart));
 			}
@@ -117,7 +117,7 @@
 		
 		List<Exporter> exporters = JiemamyPlugin.getExporterResolver().getAllInstance();
 		if (exporters.size() > 0) {
-			MenuManager exportMenu = new MenuManager("menu.export"); // RESOURCE
+			MenuManager exportMenu = new MenuManager("エクスポート(&E)"); // RESOURCE
 			for (Exporter exporter : exporters) {
 				exportMenu.add(new ExportAction(exporter, viewer, editorPart));
 			}
@@ -128,7 +128,7 @@
 		menu.add(new PropertyAction(viewer));
 		
 		// Alignment Actions
-		MenuManager alignMenu = new MenuManager("menu.align"); // RESOURCE
+		MenuManager alignMenu = new MenuManager("位置調整(&O)"); // RESOURCE
 		action = getAction(GEFActionConstants.ALIGN_LEFT);
 		action.setEnabled(true);
 		if (action.isEnabled()) {
@@ -167,7 +167,7 @@
 		// Match width Actions
 		// TODO エンティティでないときはdisableに
 		// getViewer().getSelectedEditParts()
-		MenuManager matchSizeMenu = new MenuManager("menu.matchSize"); // RESOURCE
+		MenuManager matchSizeMenu = new MenuManager("サイズ調整(&Z)"); // RESOURCE
 		matchSizeMenu.add(new FitNodeConstraintAction(viewer));
 		
 		action = getAction(GEFActionConstants.MATCH_HEIGHT);

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeColorCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeColorCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeColorCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -29,6 +29,7 @@
 
 /**
  * ノードの背景色変更コマンド。
+ * 
  * @author daisuke
  */
 public class ChangeNodeColorCommand extends Command {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeConstraintCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeConstraintCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/ChangeNodeConstraintCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -41,7 +41,7 @@
 import org.jiemamy.utils.LogMarker;
 
 /**
- * ノードの位置・サイズ変更コマンド
+ * ノードの位置・サイズ変更コマンド。
  * 
  * @author daisuke
  */

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateBendpointCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateBendpointCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateBendpointCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -30,6 +30,7 @@
 
 /**
  * ベンドポイント追加コマンド。
+ * 
  * @author daisuke
  */
 public class CreateBendpointCommand extends MovePositionCommand {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -38,6 +38,8 @@
 
 /**
  * コネクション作成コマンド。
+ * 
+ * @author daisuke
  */
 public class CreateConnectionCommand extends Command {
 	

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateNodeCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateNodeCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/CreateNodeCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -34,6 +34,8 @@
 
 /**
  * ノード作成コマンド。
+ * 
+ * @author daisuke
  */
 public class CreateNodeCommand extends Command {
 	

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteBendpointCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteBendpointCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteBendpointCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -31,6 +31,7 @@
 
 /**
  * ベンドポイント削除コマンド。
+ * 
  * @author daisuke
  */
 public class DeleteBendpointCommand extends Command {

Copied: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteConnectionCommand.java (from rev 2725, vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteRelationCommand.java)
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteConnectionCommand.java	                        (rev 0)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteConnectionCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007-2009 Jiemamy Project and the Others.
+ * Created on 2008/08/03
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed 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.jiemamy.eclipse.editor.command;
+
+import org.eclipse.gef.commands.Command;
+
+import org.jiemamy.model.RootModel;
+import org.jiemamy.model.attribute.constraint.ForeignKeyModel;
+import org.jiemamy.model.connection.ConnectionAdapter;
+import org.jiemamy.model.entity.TableModel;
+import org.jiemamy.utils.model.AttributeUtil;
+import org.jiemamy.utils.model.RootModelUtil;
+
+/**
+ * コネクション削除コマンド。
+ * 
+ * @author daisuke
+ */
+public class DeleteConnectionCommand extends Command {
+	
+	private RootModel rootModel;
+	
+	private ConnectionAdapter connection;
+	
+	private TableModel definedTable;
+	
+
+	/**
+	 * インスタンスを生成する。
+	 * 
+	 * @param rootModel 
+	 * @param connection 削除対象のコネクション
+	 */
+	public DeleteConnectionCommand(RootModel rootModel, ConnectionAdapter connection) {
+		super();
+		this.rootModel = rootModel;
+		this.connection = connection;
+	}
+	
+	@Override
+	public void execute() {
+		ForeignKeyModel foreignKeyModel = connection.unwrap();
+		definedTable = AttributeUtil.getDefinedTable(foreignKeyModel);
+		definedTable.getAttributes().remove(foreignKeyModel);
+	}
+	
+	@Override
+	public void undo() {
+		ForeignKeyModel foreignKeyModel = connection.unwrap();
+		definedTable.getAttributes().add(foreignKeyModel);
+		RootModelUtil.normalize(rootModel);
+	}
+}


Property changes on: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteConnectionCommand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteNodeCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteNodeCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteNodeCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -31,7 +31,9 @@
 import org.jiemamy.utils.CollectionsUtil;
 
 /**
- * ノード削除コマンド
+ * ノード削除コマンド。
+ * 
+ * @author daisuke
  */
 public class DeleteNodeCommand extends Command {
 	

Deleted: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteRelationCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteRelationCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DeleteRelationCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -1,58 +0,0 @@
-/*
- * Copyright 2007-2009 Jiemamy Project and the Others.
- * Created on 2008/08/03
- *
- * This file is part of Jiemamy.
- *
- * Licensed 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.jiemamy.eclipse.editor.command;
-
-import org.eclipse.gef.commands.Command;
-
-import org.jiemamy.model.RootModel;
-import org.jiemamy.model.connection.ConnectionAdapter;
-
-/**
- * コネクション削除コマンド。
- */
-public class DeleteRelationCommand extends Command {
-	
-	private RootModel rootModel;
-	
-	private ConnectionAdapter relation;
-	
-
-	/**
-	 * インスタンスを生成する。
-	 * @param rootModel 
-	 * @param relation  削除対象のコネクション
-	 */
-	public DeleteRelationCommand(RootModel rootModel, ConnectionAdapter relation) {
-		super();
-		this.rootModel = rootModel;
-		this.relation = relation;
-	}
-	
-	@Override
-	public void execute() {
-		// FIXME
-//		rootModel.removeConnection(relation);
-	}
-	
-	@Override
-	public void undo() {
-		// FIXME
-//		rootModel.removeConnection(relation);
-	}
-}

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DirectEditNodeCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DirectEditNodeCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/DirectEditNodeCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -33,6 +33,7 @@
 
 /**
  * ノードのダイレクト編集コマンド。
+ * 
  * @author daisuke
  */
 public class DirectEditNodeCommand extends Command {
@@ -76,6 +77,7 @@
 	
 	/**
 	 * displayModeを設定する。
+	 * 
 	 * @param displayStatus displayMode
 	 */
 	public void setDisplayMode(DisplayStatus displayStatus) {
@@ -84,6 +86,7 @@
 	
 	/**
 	 * 変更後の値を設定する。
+	 * 
 	 * @param newValue 変更後の値
 	 */
 	public void setNewValue(String newValue) {
@@ -92,6 +95,7 @@
 	
 	/**
 	 * 編集対象を設定する。
+	 * 
 	 * @param nodeAdapter 編集対象
 	 * @throws IllegalArgumentException 引数に{@code null}を与えた場合
 	 */

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditDatabaseModelCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditDatabaseModelCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditDatabaseModelCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -25,6 +25,7 @@
 
 /**
  * モデル編集コマンド。
+ * 
  * @author daisuke
  */
 public class EditDatabaseModelCommand extends Command {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditForeignKeyModelCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditForeignKeyModelCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditForeignKeyModelCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -24,7 +24,7 @@
 import org.jiemamy.model.attribute.constraint.ForeignKeyModel;
 
 /**
- * モデル編集コマンド
+ * モデル編集コマンド。
  * 
  * @author daisuke
  */

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditTableModelCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditTableModelCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditTableModelCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -24,7 +24,7 @@
 import org.jiemamy.model.entity.TableModel;
 
 /**
- * モデル編集コマンド
+ * モデル編集コマンド。
  * 
  * @author daisuke
  */

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditViewModelCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditViewModelCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/EditViewModelCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -24,7 +24,7 @@
 import org.jiemamy.model.entity.ViewModel;
 
 /**
- * モデル編集コマンド
+ * モデル編集コマンド。
  * 
  * @author daisuke
  */

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/MovePositionCommand.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/MovePositionCommand.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/command/MovePositionCommand.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -36,6 +36,7 @@
 
 /**
  * ノードを移動させるコマンドの抽象クラス。
+ * 
  * @author daisuke
  */
 public abstract class MovePositionCommand extends Command {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmConnectionEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmConnectionEditPart.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractJmConnectionEditPart.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -30,7 +30,7 @@
 
 import org.jiemamy.Migration;
 import org.jiemamy.eclipse.editor.editpolicy.JmBendpointEditPolicy;
-import org.jiemamy.eclipse.editor.editpolicy.JmRelationEditPolicy;
+import org.jiemamy.eclipse.editor.editpolicy.JmConnectionEditPolicy;
 import org.jiemamy.editcommand.Command;
 import org.jiemamy.editcommand.CommandListener;
 import org.jiemamy.model.DiagramPresentationModel;
@@ -95,7 +95,7 @@
 	
 	@Override
 	protected void createEditPolicies() {
-		installEditPolicy(EditPolicy.CONNECTION_ROLE, new JmRelationEditPolicy());
+		installEditPolicy(EditPolicy.CONNECTION_ROLE, new JmConnectionEditPolicy());
 		installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE, new ConnectionEndpointEditPolicy());
 		installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new JmBendpointEditPolicy());
 	}

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmBendpointEditPolicy.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmBendpointEditPolicy.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmBendpointEditPolicy.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -45,9 +45,8 @@
 		ConnectionAdapter connection = (ConnectionAdapter) getHost().getModel();
 		ForeignKeyModel fk = connection.unwrap();
 		RootModel rootModel = fk.getJiemamy().getFactory().getRootModel();
-		CreateBendpointCommand command = new CreateBendpointCommand(rootModel, connection, point, request.getIndex());
+		return new CreateBendpointCommand(rootModel, connection, point, request.getIndex());
 		
-		return command;
 	}
 	
 	@Override
@@ -55,9 +54,7 @@
 		ConnectionAdapter connection = (ConnectionAdapter) getHost().getModel();
 		ForeignKeyModel fk = connection.unwrap();
 		RootModel rootModel = fk.getJiemamy().getFactory().getRootModel();
-		DeleteBendpointCommand command = new DeleteBendpointCommand(rootModel, connection, request.getIndex());
-		
-		return command;
+		return new DeleteBendpointCommand(rootModel, connection, request.getIndex());
 	}
 	
 	@Override
@@ -66,10 +63,7 @@
 		Point location = request.getLocation();
 		getConnection().translateToRelative(location);
 		
-		MoveBendpointCommand command =
-				new MoveBendpointCommand(rootModel, (ConnectionAdapter) getHost().getModel(), request.getIndex(),
-						location);
-		
-		return command;
+		ConnectionAdapter connection = (ConnectionAdapter) getHost().getModel();
+		return new MoveBendpointCommand(rootModel, connection, request.getIndex(), location);
 	}
 }

Copied: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmConnectionEditPolicy.java (from rev 2725, vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmRelationEditPolicy.java)
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmConnectionEditPolicy.java	                        (rev 0)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmConnectionEditPolicy.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2007-2009 Jiemamy Project and the Others.
+ * Created on 2008/08/03
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed 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.jiemamy.eclipse.editor.editpolicy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.ConnectionEditPolicy;
+import org.eclipse.gef.requests.GroupRequest;
+
+import org.jiemamy.eclipse.editor.command.DeleteConnectionCommand;
+import org.jiemamy.model.RootModel;
+import org.jiemamy.model.connection.ConnectionAdapter;
+
+/**
+ * {@link ConnectionAdapter}のEditPolicy。
+ * 
+ * @author daisuke
+ */
+public class JmConnectionEditPolicy extends ConnectionEditPolicy {
+	
+	@Override
+	protected Command getDeleteCommand(GroupRequest request) {
+		RootModel rootModel = (RootModel) getHost().getRoot().getContents().getModel();
+		return new DeleteConnectionCommand(rootModel, (ConnectionAdapter) getHost().getModel());
+	}
+	
+}


Property changes on: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmConnectionEditPolicy.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Deleted: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmRelationEditPolicy.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmRelationEditPolicy.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmRelationEditPolicy.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -1,44 +0,0 @@
-/*
- * Copyright 2007-2009 Jiemamy Project and the Others.
- * Created on 2008/08/03
- *
- * This file is part of Jiemamy.
- *
- * Licensed 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.jiemamy.eclipse.editor.editpolicy;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.ConnectionEditPolicy;
-import org.eclipse.gef.requests.GroupRequest;
-
-import org.jiemamy.eclipse.editor.command.DeleteRelationCommand;
-import org.jiemamy.model.RootModel;
-import org.jiemamy.model.connection.ConnectionAdapter;
-
-/**
- * {@link ConnectionAdapter}のEditPolicy。
- * 
- * @author daisuke
- */
-public class JmRelationEditPolicy extends ConnectionEditPolicy {
-	
-	@Override
-	protected Command getDeleteCommand(GroupRequest request) {
-		RootModel rootModel = (RootModel) getHost().getRoot().getContents().getModel();
-		DeleteRelationCommand command = new DeleteRelationCommand(rootModel, (ConnectionAdapter) getHost().getModel());
-		
-		return command;
-	}
-	
-}

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java	2009-02-24 12:07:40 UTC (rev 2726)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java	2009-02-24 12:55:39 UTC (rev 2727)
@@ -26,6 +26,8 @@
 /**
  * タブエリアの抽象クラス。
  * 
+ * <p>{@link TabItem}を継承して作りたいところだが、継承が許されていないため、このような形となった。</p>
+ * 
  * @author daisuke
  */
 public abstract class AbstractTab extends Composite {



Jiemamy-notify メーリングリストの案内
Back to archive index