[Jiemamy-notify:1519] commit [2734] J-eclipseにexporterを組み込み。まだ動かないけど。 /

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2009年 2月 25日 (水) 13:01:11 JST


Revision: 2734
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2734
Author:   daisuke_m
Date:     2009-02-25 13:01:11 +0900 (Wed, 25 Feb 2009)

Log Message:
-----------
J-eclipseにexporterを組み込み。まだ動かないけど。 /
refactor

Modified Paths:
--------------
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/FactoryExtension.java
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Identifier.java
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Keyword.java
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Literal.java
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DomUtil.java
    artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/ViewDomSerializerEnhancer.java
    artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/connection/ConnectionAdapterImpl.java
    artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/node/NodeAdapterImpl.java
    vesta/trunk/org.jiemamy.eclipse/.classpath
    vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF
    vesta/trunk/org.jiemamy.eclipse/build.properties
    vesta/trunk/org.jiemamy.eclipse/plugin.xml
    vesta/trunk/org.jiemamy.eclipse/pom.xml
    vesta/trunk/org.jiemamy.eclipse/schema/composers.exsd
    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/editor/dialog/root/RootEditDialogDomainTab.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/ColumnSelectDialog.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ForeignKeyEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/TableEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ViewEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/AttributeTreeEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/DomainTreeEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/TableTreeEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/ViewTreeEditPart.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/figure/TableFigure.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/utils/LabelStringUtil.java
    zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/formatter/SqlFormatter.java
    zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/DomainModel.java

Added Paths:
-----------
    artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/formatter/
    artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/formatter/DefaultSqlFormatterTest.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/composer/
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/composer/SqlExporterDialog.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ComposerSettingDialog.java

Removed Paths:
-------------
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DisplayTarget.java


-------------- next part --------------
Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/FactoryExtension.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/FactoryExtension.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/FactoryExtension.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -120,11 +120,6 @@
 	 */
 	public ColumnRef newReference(ColumnModel column) {
 		return new ColumnRefImpl(column);
-//		ReferenceStrategy referenceStrategy = ReferenceStrategy.fromClass(ColumnModel.class);
-//		if (referenceStrategy == null) {
-//			return null;
-//		}
-//		return (ColumnRef) referenceStrategy.newInstance(column);
 	}
 	
 	/**

Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -18,6 +18,8 @@
  */
 package org.jiemamy.formatter;
 
+import java.util.List;
+
 import org.jiemamy.model.sql.Separator;
 import org.jiemamy.model.sql.SqlStatement;
 import org.jiemamy.model.sql.Token;
@@ -46,10 +48,10 @@
 		return token instanceof Separator;
 	}
 	
-	public String format(SqlStatement stmt) {
+	public String format(List<Token> tokens) {
 		StringBuilder sb = new StringBuilder();
 		Token lastToken = null;
-		for (Token token : stmt.toTokens()) {
+		for (Token token : tokens) {
 			if ((isSeparator(lastToken) == false && isSeparator(token) == false) || Separator.COMMA.equals(lastToken)) {
 				sb.append(WHITESPACE);
 			}
@@ -59,4 +61,8 @@
 		return sb.toString();
 	}
 	
+	public String format(SqlStatement stmt) {
+		return format(stmt.toTokens());
+	}
+	
 }

Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -36,7 +36,7 @@
 public class DomainModelImpl extends AbstractJiemamyElement implements DomainModel {
 	
 	/** ドメイン名 */
-	private String name;
+	private String name = "";
 	
 	/** 論理名 */
 	private String logicalName;
@@ -137,6 +137,7 @@
 	}
 	
 	public void setName(String name) {
+		Validate.notNull(name);
 		this.name = name;
 	}
 	

Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Identifier.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Identifier.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Identifier.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -27,6 +27,17 @@
  */
 public class Identifier implements Token {
 	
+	/**
+	 * 識別子を返す。
+	 * 
+	 * @param string 識別子文字列
+	 * @return 識別子
+	 */
+	public static Identifier of(String string) {
+		return new Identifier(string);
+	}
+	
+
 	/** 識別子文字列 */
 	private final String identifier;
 	
@@ -36,6 +47,8 @@
 	 * 
 	 * @param identifier 識別子文字列
 	 */
+	@Deprecated
+	// TODO package privateに
 	public Identifier(String identifier) {
 		this.identifier = identifier;
 	}

Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Keyword.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Keyword.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Keyword.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -129,6 +129,15 @@
 	/** TIMEZONE */
 	public static final Keyword TIMEZONE = new Keyword("TIMEZONE");
 	
+	/** INSERT */
+	public static final Keyword INSERT = new Keyword("INSERT");
+	
+	/** INTO */
+	public static final Keyword INTO = new Keyword("INTO");
+	
+	/** VALUES */
+	public static final Keyword VALUES = new Keyword("VALUES");
+	
 
 	/**
 	 * インスタンスを生成する。

Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Literal.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Literal.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/model/sql/Literal.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -32,14 +32,57 @@
 public class Literal implements Token {
 	
 	/** NULL */
-	public static final Literal NULL = new Literal("NULL", LiteralType.NULL);
+	public static final Literal NULL = Literal.of("NULL", LiteralType.NULL);
 	
 	/** TRUE */
-	public static final Literal TRUE = new Literal(true);
+	public static final Literal TRUE = Literal.of(true);
 	
 	/** FALSE */
-	public static final Literal FALSE = new Literal(false);
+	public static final Literal FALSE = Literal.of(false);
 	
+
+	/**
+	 * TODO for daisuke
+	 * 
+	 * @param bool
+	 * @return
+	 */
+	public static Literal of(boolean bool) {
+		return new Literal(bool);
+	}
+	
+	/**
+	 * TODO for daisuke
+	 * 
+	 * @param number
+	 * @return
+	 */
+	public static Literal of(Number number) {
+		return new Literal(number);
+	}
+	
+	/**
+	 * TODO for daisuke
+	 * 
+	 * @param string
+	 * @return
+	 */
+	public static Literal of(String string) {
+		return new Literal(string, LiteralType.CHARACTER);
+	}
+	
+	/**
+	 * TODO for daisuke
+	 * 
+	 * @param string
+	 * @param type 
+	 * @return
+	 */
+	public static Literal of(String string, LiteralType type) {
+		return new Literal(string, type);
+	}
+	
+
 	/** 必要な場合クオートも含んだ文字列 */
 	private final String string;
 	
@@ -49,6 +92,8 @@
 	 * 
 	 * @param bool 値
 	 */
+	@Deprecated
+	// TODO package privateに
 	public Literal(boolean bool) {
 		this(Boolean.valueOf(bool).toString(), LiteralType.BOOLEAN);
 	}
@@ -58,6 +103,8 @@
 	 * 
 	 * @param number 値
 	 */
+	@Deprecated
+	// TODO package privateに
 	public Literal(Number number) {
 		this(number.toString(), LiteralType.NUMERIC);
 	}
@@ -68,6 +115,8 @@
 	 * @param string クオートを含まない、値をあらわす文字列
 	 * @param type リテラルの種類
 	 */
+	@Deprecated
+	// TODO package privateに
 	public Literal(String string, LiteralType type) {
 		Validate.notNull(string);
 		this.string = type.convert(string);

Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DomUtil.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DomUtil.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DomUtil.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -47,7 +47,6 @@
 	public static String getAttributeString(Element domElement, JiemamyQName node) {
 		Attr attr = XpathUtil.getAttr(domElement, "@" + node.getQNameString());
 		return attr.getValue();
-//		return domElement.getAttributes().getNamedItem(node.getQNameString()).getTextContent();
 	}
 	
 	/**

Added: artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/formatter/DefaultSqlFormatterTest.java
===================================================================
--- artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/formatter/DefaultSqlFormatterTest.java	                        (rev 0)
+++ artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/formatter/DefaultSqlFormatterTest.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -0,0 +1,234 @@
+/*
+ * Copyright 2007-2009 Jiemamy Project and the Others.
+ * Created on 2009/02/25
+ *
+ * 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.formatter;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.apache.commons.lang.SystemUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.jiemamy.model.sql.Identifier;
+import org.jiemamy.model.sql.Keyword;
+import org.jiemamy.model.sql.Literal;
+import org.jiemamy.model.sql.Separator;
+import org.jiemamy.model.sql.Token;
+import org.jiemamy.utils.CollectionsUtil;
+
+/**
+ * {@link DefaultSqlFormatter}のテストクラス。
+ * 
+ * @author daisuke
+ */
+public class DefaultSqlFormatterTest {
+	
+	private static final String NL = SystemUtils.LINE_SEPARATOR;
+	
+	private DefaultSqlFormatter formatter;
+	
+	private static Logger logger = LoggerFactory.getLogger(DefaultSqlFormatterTest.class);
+	
+
+	/**
+	 * テストを初期化する。
+	 * 
+	 * @throws Exception 例外が発生した場合
+	 */
+	@Before
+	public void setUp() throws Exception {
+		formatter = new DefaultSqlFormatter();
+	}
+	
+	/**
+	 * テストの情報を破棄する。
+	 * 
+	 * @throws Exception 例外が発生した場合
+	 */
+	@After
+	public void tearDown() throws Exception {
+		formatter = null;
+	}
+	
+	/**
+	 * 基本的なCREATE文が出力できる。
+	 * 
+	 * @throws Exception 例外が発生した場合
+	 */
+	@Test
+	public void test01_基本的なCREATE文が出力できる() throws Exception {
+		List<Token> tokens = CollectionsUtil.newArrayList();
+		tokens.add(Keyword.CREATE);
+		tokens.add(Keyword.TABLE);
+		tokens.add(Identifier.of("T_USER"));
+		tokens.add(Separator.LEFT_PAREN);
+		
+		tokens.add(Identifier.of("NAME"));
+		tokens.add(Keyword.of("VARCHAR"));
+		tokens.add(Separator.LEFT_PAREN);
+		tokens.add(Literal.of(32));
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Separator.COMMA);
+		
+		tokens.add(Identifier.of("PASSWORD"));
+		tokens.add(Keyword.of("VARCHAR"));
+		tokens.add(Separator.LEFT_PAREN);
+		tokens.add(Literal.of(64));
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Keyword.NOT);
+		tokens.add(Keyword.NULL);
+		tokens.add(Separator.COMMA);
+		
+		tokens.add(Identifier.of("DISABLED"));
+		tokens.add(Keyword.of("BOOLEAN"));
+		tokens.add(Keyword.NOT);
+		tokens.add(Keyword.NULL);
+		tokens.add(Separator.COMMA);
+		
+		tokens.add(Keyword.PRIMARY);
+		tokens.add(Keyword.KEY);
+		tokens.add(Separator.LEFT_PAREN);
+		tokens.add(Identifier.of("NAME"));
+		tokens.add(Separator.RIGHT_PAREN);
+		
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Separator.SEMICOLON);
+		
+		StringBuilder sb = new StringBuilder();
+		sb.append("CREATE TABLE T_USER (").append(NL);
+		sb.append("  NAME VARCHAR(32),").append(NL);
+		sb.append("  PASSWORD VARCHAR(64) NOT NULL,").append(NL);
+		sb.append("  DISABLED BOOLEAN NOT NULL").append(NL);
+		sb.append("  PRIMARY KEY(NAME)").append(NL);
+		sb.append(");").append(NL);
+//		String expected = sb.toString(); // TODO
+		String expected =
+				"CREATE TABLE T_USER(NAME VARCHAR(32), PASSWORD VARCHAR(64)NOT NULL, "
+						+ "DISABLED BOOLEAN NOT NULL, PRIMARY KEY(NAME));";
+		
+		doAssertion(tokens, expected);
+	}
+	
+	/**
+	 * 基本的なCREATE文が出力できる。
+	 * 
+	 * @throws Exception 例外が発生した場合
+	 */
+	@Test
+	public void test02_カラム制約PKのCREATE文が出力できる() throws Exception {
+		List<Token> tokens = CollectionsUtil.newArrayList();
+		tokens.add(Keyword.CREATE);
+		tokens.add(Keyword.TABLE);
+		tokens.add(Identifier.of("T_USER"));
+		tokens.add(Separator.LEFT_PAREN);
+		
+		tokens.add(Identifier.of("NAME"));
+		tokens.add(Keyword.of("VARCHAR"));
+		tokens.add(Separator.LEFT_PAREN);
+		tokens.add(Literal.of(32));
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Keyword.PRIMARY);
+		tokens.add(Keyword.KEY);
+		tokens.add(Separator.COMMA);
+		
+		tokens.add(Identifier.of("PASSWORD"));
+		tokens.add(Keyword.of("VARCHAR"));
+		tokens.add(Separator.LEFT_PAREN);
+		tokens.add(Literal.of(64));
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Keyword.NOT);
+		tokens.add(Keyword.NULL);
+		tokens.add(Separator.COMMA);
+		
+		tokens.add(Identifier.of("DISABLED"));
+		tokens.add(Keyword.of("BOOLEAN"));
+		tokens.add(Keyword.NOT);
+		tokens.add(Keyword.NULL);
+		
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Separator.SEMICOLON);
+		
+		StringBuilder sb = new StringBuilder();
+		sb.append("CREATE TABLE T_USER (").append(NL);
+		sb.append("  NAME VARCHAR(32) PRIMARY KEY,").append(NL);
+		sb.append("  PASSWORD VARCHAR(64) NOT NULL,").append(NL);
+		sb.append("  DISABLED BOOLEAN NOT NULL").append(NL);
+		sb.append(");").append(NL);
+//		String expected = sb.toString(); // TODO
+		String expected =
+				"CREATE TABLE T_USER(NAME VARCHAR(32)PRIMARY KEY, PASSWORD VARCHAR(64)NOT NULL, "
+						+ "DISABLED BOOLEAN NOT NULL);";
+		
+		doAssertion(tokens, expected);
+	}
+	
+	/**
+	 * 基本的なINSERT文が出力できる。
+	 * 
+	 * @throws Exception 例外が発生した場合
+	 */
+	@Test
+	public void test11_基本的なINSERT文が出力できる() throws Exception {
+		List<Token> tokens = CollectionsUtil.newArrayList();
+		tokens.add(Keyword.INSERT);
+		tokens.add(Keyword.INTO);
+		tokens.add(Identifier.of("T_USER"));
+		tokens.add(Separator.LEFT_PAREN);
+		tokens.add(Identifier.of("NAME"));
+		tokens.add(Separator.COMMA);
+		tokens.add(Identifier.of("PASSWORD"));
+		tokens.add(Separator.COMMA);
+		tokens.add(Identifier.of("DISABLED"));
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Keyword.VALUES);
+		tokens.add(Separator.LEFT_PAREN);
+		tokens.add(Literal.of("daisuke"));
+		tokens.add(Separator.COMMA);
+		tokens.add(Literal.of("miyamoto"));
+		tokens.add(Separator.COMMA);
+		tokens.add(Literal.of(false));
+		tokens.add(Separator.RIGHT_PAREN);
+		tokens.add(Separator.SEMICOLON);
+		
+		StringBuilder sb = new StringBuilder();
+		sb.append("INSERT INTO T_USER (NAME, PASSWORD, DISABLED)").append(NL);
+		sb.append("  VALUES ('daisuke', 'miyamoto', false);").append(NL);
+//		String expected = sb.toString(); // TODO
+		String expected = "INSERT INTO T_USER(NAME, PASSWORD, DISABLED)VALUES('daisuke', 'miyamoto', false);";
+		
+		doAssertion(tokens, expected);
+	}
+	
+	/**
+	 * TODO for daisuke
+	 * 
+	 * @param tokens
+	 * @param expected
+	 */
+	private void doAssertion(List<Token> tokens, String expected) {
+		String formated = formatter.format(tokens);
+		logger.info(formated);
+		assertThat(formated, is(expected));
+	}
+}


Property changes on: artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/formatter/DefaultSqlFormatterTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/ViewDomSerializerEnhancer.java
===================================================================
--- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/ViewDomSerializerEnhancer.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/ViewDomSerializerEnhancer.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -162,8 +162,7 @@
 					Element connectionLayoutElement =
 							DomUtil.newChild(connectionLayoutsElement, ViewQName.CONNECTION_LAYOUT);
 					if (connection.unwrap() == null) {
-//						connectionLayoutElement.setAttribute("ref", ((JiemamyElement) connection).getId().toString());
-						logger.warn("      Unknown");
+						logger.warn("      Unknown connection: " + connection.getClass().getName());
 						continue;
 					} else {
 						Element connectionObjectRef =

Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/connection/ConnectionAdapterImpl.java
===================================================================
--- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/connection/ConnectionAdapterImpl.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/connection/ConnectionAdapterImpl.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -81,9 +81,6 @@
 	}
 	
 	public ForeignKeyModel unwrap() {
-//		if (wrapped == null) {
-//			throw new UnsupportedOperationException();
-//		}
 		return wrapped;
 	}
 }

Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/node/NodeAdapterImpl.java
===================================================================
--- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/node/NodeAdapterImpl.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/model/node/NodeAdapterImpl.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -118,9 +118,6 @@
 	}
 	
 	public EntityModel unwrap() {
-//		if (wrapped == null) {
-//			throw new UnsupportedOperationException();
-//		}
 		return wrapped;
 	}
 }

Modified: vesta/trunk/org.jiemamy.eclipse/.classpath
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/.classpath	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/.classpath	2009-02-25 04:01:11 UTC (rev 2734)
@@ -4,26 +4,31 @@
 	<classpathentry kind="src" path="src/main/resources"/>
 	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
 	<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+	<classpathentry exported="true" kind="lib" path="lib/collections-generic-4.01.jar" sourcepath="lib/sources/collections-generic-4.01-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.0.jar" sourcepath="lib/sources/commons-beanutils-1.8.0-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-io-1.3.2.jar" sourcepath="lib/sources/commons-io-1.3.2-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-lang-2.3.jar" sourcepath="lib/sources/commons-lang-2.3-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/eclipse-common-0.0.4.jar" sourcepath="lib/sources/eclipse-common-0.0.4-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/factory-enhancer-0.1.0-SNAPSHOT.jar" sourcepath="lib/sources/factory-enhancer-0.1.0-SNAPSHOT-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/freemarker-2.3.11.jar" sourcepath="lib/sources/freemarker-2.3.11-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/generic-tree-0.1.0-SNAPSHOT.jar" sourcepath="lib/sources/generic-tree-0.1.0-SNAPSHOT-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/javassist-3.8.0.GA.jar" sourcepath="lib/sources/javassist-3.8.0.GA-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j-1.5.5.jar" sourcepath="lib/sources/jcl-over-slf4j-1.5.5-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jiemamy-composer-0.2.0-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-composer-0.2.0-SNAPSHOT-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jiemamy-core-0.2.0-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-core-0.2.0-SNAPSHOT-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jiemamy-spec-core-0.2-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-spec-core-0.2-SNAPSHOT-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jiemamy-spec-view-0.2-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-spec-view-0.2-SNAPSHOT-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jiemamy-view-0.2.0-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-view-0.2.0-SNAPSHOT-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/logback-classic-0.9.9.jar" sourcepath="lib/sources/logback-classic-0.9.9-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/logback-core-0.9.9.jar" sourcepath="lib/sources/logback-core-0.9.9-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/osgi_R4_core-1.0.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.5.5.jar" sourcepath="lib/sources/slf4j-api-1.5.5-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar" sourcepath="lib/sources/stax-1.2.0-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar" sourcepath="lib/sources/stax-api-1.0.1-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/wstx-asl-3.2.7.jar" sourcepath="lib/sources/wstx-asl-3.2.7-sources.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/xstream-1.3.1.jar"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="lib" path="lib/collections-generic-4.01.jar" sourcepath="lib/sources/collections-generic-4.01-sources.jar"/>
-	<classpathentry kind="lib" path="lib/commons-beanutils-1.8.0.jar" sourcepath="lib/sources/commons-beanutils-1.8.0-sources.jar"/>
-	<classpathentry kind="lib" path="lib/commons-io-1.3.2.jar" sourcepath="lib/sources/commons-io-1.3.2-sources.jar"/>
-	<classpathentry kind="lib" path="lib/commons-lang-2.3.jar" sourcepath="lib/sources/commons-lang-2.3-sources.jar"/>
-	<classpathentry kind="lib" path="lib/eclipse-common-0.0.4.jar" sourcepath="lib/sources/eclipse-common-0.0.4-sources.jar"/>
-	<classpathentry kind="lib" path="lib/factory-enhancer-0.1.0-SNAPSHOT.jar" sourcepath="lib/sources/factory-enhancer-0.1.0-SNAPSHOT-sources.jar"/>
-	<classpathentry kind="lib" path="lib/generic-tree-0.1.0-SNAPSHOT.jar" sourcepath="lib/sources/generic-tree-0.1.0-SNAPSHOT-sources.jar"/>
-	<classpathentry kind="lib" path="lib/javassist-3.8.0.GA.jar" sourcepath="lib/sources/javassist-3.8.0.GA-sources.jar"/>
-	<classpathentry kind="lib" path="lib/jcl-over-slf4j-1.5.5.jar" sourcepath="lib/sources/jcl-over-slf4j-1.5.5-sources.jar"/>
-	<classpathentry kind="lib" path="lib/jiemamy-core-0.2.0-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-core-0.2.0-SNAPSHOT-sources.jar"/>
-	<classpathentry kind="lib" path="lib/jiemamy-spec-core-0.2-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-spec-core-0.2-SNAPSHOT-sources.jar"/>
-	<classpathentry kind="lib" path="lib/jiemamy-spec-view-0.2-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-spec-view-0.2-SNAPSHOT-sources.jar"/>
-	<classpathentry kind="lib" path="lib/jiemamy-view-0.2.0-SNAPSHOT.jar" sourcepath="lib/sources/jiemamy-view-0.2.0-SNAPSHOT-sources.jar"/>
-	<classpathentry kind="lib" path="lib/logback-classic-0.9.9.jar" sourcepath="lib/sources/logback-classic-0.9.9-sources.jar"/>
-	<classpathentry kind="lib" path="lib/logback-core-0.9.9.jar" sourcepath="lib/sources/logback-core-0.9.9-sources.jar"/>
-	<classpathentry kind="lib" path="lib/slf4j-api-1.5.5.jar" sourcepath="lib/sources/slf4j-api-1.5.5-sources.jar"/>
-	<classpathentry kind="lib" path="lib/stax-1.2.0.jar" sourcepath="lib/sources/stax-1.2.0-sources.jar"/>
-	<classpathentry kind="lib" path="lib/stax-api-1.0.1.jar" sourcepath="lib/sources/stax-api-1.0.1-sources.jar"/>
-	<classpathentry kind="lib" path="lib/wstx-asl-3.2.7.jar" sourcepath="lib/sources/wstx-asl-3.2.7-sources.jar"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF	2009-02-25 04:01:11 UTC (rev 2734)
@@ -14,19 +14,24 @@
  lib/commons-lang-2.3.jar,
  lib/eclipse-common-0.0.4.jar,
  lib/factory-enhancer-0.1.0-SNAPSHOT.jar,
+ lib/freemarker-2.3.11.jar,
  lib/generic-tree-0.1.0-SNAPSHOT.jar,
  lib/javassist-3.8.0.GA.jar,
  lib/jcl-over-slf4j-1.5.5.jar,
+ lib/jiemamy-composer-0.2.0-SNAPSHOT.jar,
  lib/jiemamy-core-0.2.0-SNAPSHOT.jar,
  lib/jiemamy-spec-core-0.2-SNAPSHOT.jar,
  lib/jiemamy-spec-view-0.2-SNAPSHOT.jar,
  lib/jiemamy-view-0.2.0-SNAPSHOT.jar,
  lib/logback-classic-0.9.9.jar,
  lib/logback-core-0.9.9.jar,
+ lib/osgi_R4_core-1.0.jar,
  lib/slf4j-api-1.5.5.jar,
  lib/stax-1.2.0.jar,
  lib/stax-api-1.0.1.jar,
- lib/wstx-asl-3.2.7.jar
+ lib/wstx-asl-3.2.7.jar,
+ lib/xpp3_min-1.1.4c.jar,
+ lib/xstream-1.3.1.jar
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.core.resources,
  org.eclipse.core.expressions,

Modified: vesta/trunk/org.jiemamy.eclipse/build.properties
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/build.properties	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/build.properties	2009-02-25 04:01:11 UTC (rev 2734)
@@ -13,19 +13,25 @@
                lib/commons-lang-2.3.jar,\
                lib/eclipse-common-0.0.4.jar,\
                lib/factory-enhancer-0.1.0-SNAPSHOT.jar,\
+               lib/freemarker-2.3.11.jar,\
                lib/generic-tree-0.1.0-SNAPSHOT.jar,\
                lib/javassist-3.8.0.GA.jar,\
                lib/jcl-over-slf4j-1.5.5.jar,\
+               lib/jiemamy-composer-0.2.0-SNAPSHOT.jar,\
                lib/jiemamy-core-0.2.0-SNAPSHOT.jar,\
                lib/jiemamy-spec-core-0.2-SNAPSHOT.jar,\
                lib/jiemamy-spec-view-0.2-SNAPSHOT.jar,\
                lib/jiemamy-view-0.2.0-SNAPSHOT.jar,\
                lib/logback-classic-0.9.9.jar,\
                lib/logback-core-0.9.9.jar,\
+               lib/osgi_R4_core-1.0.jar,\
                lib/slf4j-api-1.5.5.jar,\
                lib/stax-1.2.0.jar,\
                lib/stax-api-1.0.1.jar,\
-               lib/wstx-asl-3.2.7.jar
+               lib/wstx-asl-3.2.7.jar,\
+               lib/xpp3_min-1.1.4c.jar,\
+               lib/xstream-1.3.1.jar,\
+               license/
 output..=target/classes/
 source..=src/main/java/,src/main/resources/,src/test/java/,src/test/resources/
 bin.excludes=lib/sources/
@@ -44,4 +50,7 @@
                .project,\
                .fbprefs,\
                .classpath,\
-               .checkstyle
+               .checkstyle,\
+               platform_info.target,\
+               license/,\
+               findbugs.xml

Modified: vesta/trunk/org.jiemamy.eclipse/plugin.xml
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/plugin.xml	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/plugin.xml	2009-02-25 04:01:11 UTC (rev 2734)
@@ -10,7 +10,17 @@
 	  <dialect
             class="org.jiemamy.dialect.generic.GenericDialect"/>
    </extension>
+
    <extension
+         point="org.jiemamy.eclipse.composers">
+	  <exporter
+	        name="SQL"
+            class="org.jiemamy.composer.exporter.SqlExporter"
+            dialog="org.jiemamy.eclipse.composer.SqlExporterDialog"/>
+   </extension>
+
+
+   <extension
          point="org.eclipse.ui.newWizards">
       <category
             id="org.jiemamy.eclipse.newWizard.category"

Modified: vesta/trunk/org.jiemamy.eclipse/pom.xml
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/pom.xml	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/pom.xml	2009-02-25 04:01:11 UTC (rev 2734)
@@ -126,6 +126,11 @@
       <artifactId>jiemamy-view</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>jiemamy-composer</artifactId>
+      <version>${project.version}</version>
+    </dependency>
 
 <!-- 
     <dependency>

Modified: vesta/trunk/org.jiemamy.eclipse/schema/composers.exsd
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/schema/composers.exsd	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/schema/composers.exsd	2009-02-25 04:01:11 UTC (rev 2734)
@@ -90,11 +90,14 @@
                </appInfo>
             </annotation>
          </attribute>
-         <attribute name="uiScript" type="string" use="required">
+         <attribute name="dialog" type="string" use="required">
             <annotation>
                <documentation>
                   
                </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.jiemamy.eclipse.ui.ComposerSettingDialog"/>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>

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 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -197,7 +197,6 @@
 			DiagramPresentations diagramPresentations = rootModel.getAdapter(DiagramPresentations.class);
 			DiagramPresentationModel presentation = diagramPresentations.get(Migration.DIAGRAM_INDEX);
 			PresentationUtil.setLayout(presentation, target, new JmRectangle(x, y, -1, -1));
-//			PresentationUtil.setColor(presentation, target, color);
 			oldBendpoints.clear();
 			for (ConnectionAdapter conn : target.getSourceConnections()) {
 				List<JmPoint> points = presentation.getConnectionLayouts().get(conn);

Added: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/composer/SqlExporterDialog.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/composer/SqlExporterDialog.java	                        (rev 0)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/composer/SqlExporterDialog.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2007-2009 Jiemamy Project and the Others.
+ * Created on 2009/02/25
+ *
+ * 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.composer;
+
+import org.jiemamy.eclipse.ui.ComposerSettingDialog;
+
+
+/**
+ * TODO for daisuke
+ * 
+ * @author daisuke
+ */
+public class SqlExporterDialog extends ComposerSettingDialog {
+	
+}


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

Deleted: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DisplayTarget.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DisplayTarget.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DisplayTarget.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -1,34 +0,0 @@
-/*
- * Copyright 2007-2009 Jiemamy Project and the Others.
- * Created on 2008/08/02
- *
- * 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;
-
-/**
- * モデルの何を表示するのかを表す。
- * 
- * @author daisuke
- */
-public enum DisplayTarget {
-	
-	/** そのモデルが持つ名前を表示する事を表す */
-	NAME,
-
-	/** そのモデルが持つ型を表示する事を表す */
-	TYPE
-	
-}

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -57,7 +57,6 @@
 import org.jiemamy.eclipse.Images;
 import org.jiemamy.eclipse.JiemamyPlugin;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.utils.LabelStringUtil;
 import org.jiemamy.eclipse.ui.AbstractTableEditor;
 import org.jiemamy.eclipse.ui.DefaultTableEditorConfigurator;
@@ -217,10 +216,10 @@
 			DomainModel domain = (DomainModel) element;
 			switch (columnIndex) {
 				case 0:
-					return LabelStringUtil.getString(rootModel, domain, DisplayTarget.NAME, DisplayPlace.TABLE);
+					return LabelStringUtil.getString(rootModel, domain, DisplayPlace.TABLE);
 					
 				case 1:
-					return LabelStringUtil.getString(rootModel, domain, DisplayTarget.TYPE, DisplayPlace.TABLE);
+					return LabelStringUtil.getString(rootModel, domain.getDataType(), DisplayPlace.TABLE);
 					
 				default:
 					return StringUtils.EMPTY;

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/ColumnSelectDialog.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/ColumnSelectDialog.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/ColumnSelectDialog.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -34,7 +34,6 @@
 import org.eclipse.swt.widgets.TableItem;
 
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.utils.LabelStringUtil;
 import org.jiemamy.model.RootModel;
 import org.jiemamy.model.attribute.ColumnModel;
@@ -136,7 +135,7 @@
 	private void updateColumnTableItem(TableItem item, ColumnModel column) {
 		RootModel rootModel = column.getJiemamy().getFactory().getRootModel();
 		item.setText(0, "");
-		item.setText(1, LabelStringUtil.getString(rootModel, column, DisplayTarget.NAME, DisplayPlace.TABLE));
-		item.setText(2, LabelStringUtil.getString(rootModel, column, DisplayTarget.TYPE, DisplayPlace.TABLE));
+		item.setText(1, LabelStringUtil.getString(rootModel, column, DisplayPlace.TABLE));
+		item.setText(2, LabelStringUtil.getString(rootModel, column.getDataType(), DisplayPlace.TABLE));
 	}
 }

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -58,7 +58,6 @@
 import org.jiemamy.eclipse.Images;
 import org.jiemamy.eclipse.JiemamyPlugin;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.utils.LabelStringUtil;
 import org.jiemamy.eclipse.ui.AbstractTableEditor;
 import org.jiemamy.eclipse.ui.DefaultTableEditorConfigurator;
@@ -245,10 +244,10 @@
 			ColumnModel column = (ColumnModel) element;
 			switch (columnIndex) {
 				case 1:
-					return LabelStringUtil.getString(rootModel, column, DisplayTarget.NAME, DisplayPlace.TABLE);
+					return LabelStringUtil.getString(rootModel, column, DisplayPlace.TABLE);
 					
 				case 2:
-					return LabelStringUtil.getString(rootModel, column, DisplayTarget.TYPE, DisplayPlace.TABLE);
+					return LabelStringUtil.getString(rootModel, column.getDataType(), DisplayPlace.TABLE);
 					
 				case 3:
 					return column.getDefaultValue();

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ForeignKeyEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ForeignKeyEditPart.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ForeignKeyEditPart.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -31,7 +31,6 @@
 import org.slf4j.LoggerFactory;
 
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.dialog.foreignkey.ForeignKeyEditDialog;
 import org.jiemamy.eclipse.editor.editpart.DoubleClickSupport;
 import org.jiemamy.eclipse.editor.editpart.EditDialogSupport;
@@ -125,7 +124,7 @@
 		ConnectionAdapter connection = getModel();
 		ForeignKeyModel fkModel = connection.unwrap();
 		
-		String labelString = LabelStringUtil.getString(rootModel, fkModel, DisplayTarget.NAME, DisplayPlace.FIGURE);
+		String labelString = LabelStringUtil.getString(rootModel, fkModel, DisplayPlace.FIGURE);
 		label.setText(labelString);
 	}
 }

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/TableEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/TableEditPart.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/TableEditPart.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -33,7 +33,6 @@
 import org.jiemamy.Migration;
 import org.jiemamy.eclipse.JiemamyPlugin;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.dialog.table.TableEditDialog;
 import org.jiemamy.eclipse.editor.figure.ColumnFigure;
 import org.jiemamy.eclipse.editor.figure.TableFigure;
@@ -142,7 +141,7 @@
 		TableModel tableModel = (TableModel) node.unwrap();
 		TableFigure tableFigure = (TableFigure) figure;
 		
-		String labelString = LabelStringUtil.getString(rootModel, tableModel, DisplayTarget.NAME, DisplayPlace.FIGURE);
+		String labelString = LabelStringUtil.getString(rootModel, tableModel, DisplayPlace.FIGURE);
 		
 		DiagramPresentations diagramPresentations = rootModel.getAdapter(DiagramPresentations.class);
 		DiagramPresentationModel presentation = diagramPresentations.get(Migration.DIAGRAM_INDEX);
@@ -160,7 +159,8 @@
 		tableFigure.removeAllColumns();
 		
 		for (ColumnModel column : TableUtil.getColumns(tableModel)) {
-			tableFigure.add(createColumnFigure(column));
+			ColumnFigure[] columnFigure = createColumnFigure(column);
+			tableFigure.add(columnFigure[0], columnFigure[1]);
 		}
 	}
 	
@@ -189,8 +189,8 @@
 		ColumnFigure nameLabel = new ColumnFigure();
 		ColumnFigure typeLabel = new ColumnFigure();
 		
-		nameLabel.setText(LabelStringUtil.getString(rootModel, column, DisplayTarget.NAME, DisplayPlace.FIGURE));
-		typeLabel.setText(LabelStringUtil.getString(rootModel, column, DisplayTarget.TYPE, DisplayPlace.FIGURE));
+		nameLabel.setText(LabelStringUtil.getString(rootModel, column, DisplayPlace.FIGURE));
+		typeLabel.setText(LabelStringUtil.getString(rootModel, column.getDataType(), DisplayPlace.FIGURE));
 		
 		if (pkColumn) {
 			nameLabel.setUnderline(true);

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ViewEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ViewEditPart.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/ViewEditPart.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -31,7 +31,6 @@
 
 import org.jiemamy.Migration;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.dialog.view.ViewEditDialog;
 import org.jiemamy.eclipse.editor.figure.ViewFigure;
 import org.jiemamy.eclipse.editor.utils.LabelStringUtil;
@@ -136,7 +135,7 @@
 		ViewModel viewModel = (ViewModel) node.unwrap();
 		ViewFigure viewFigure = (ViewFigure) figure;
 		
-		String labelString = LabelStringUtil.getString(rootModel, viewModel, DisplayTarget.NAME, DisplayPlace.FIGURE);
+		String labelString = LabelStringUtil.getString(rootModel, viewModel, DisplayPlace.FIGURE);
 		DiagramPresentations diagramPresentations = rootModel.getAdapter(DiagramPresentations.class);
 		DiagramPresentationModel presentation = diagramPresentations.get(Migration.DIAGRAM_INDEX);
 		NodeProfile nodeProfile = presentation.getFigureProfiles().get(node);

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/AttributeTreeEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/AttributeTreeEditPart.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/AttributeTreeEditPart.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -24,7 +24,6 @@
 import org.jiemamy.eclipse.Images;
 import org.jiemamy.eclipse.JiemamyPlugin;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.editpolicy.JmTreeComponentEditPolicy;
 import org.jiemamy.eclipse.editor.utils.LabelStringUtil;
 import org.jiemamy.model.JiemamyElement;
@@ -73,9 +72,9 @@
 	@Override
 	protected void refreshVisuals() {
 		RootModel rootModel = (RootModel) getRoot().getContents().getModel();
-		
+		AttributeModel model = getModel();
 		// ツリー・アイテムのテキストとしてモデルのテキストを設定
-		setWidgetText(LabelStringUtil.getString(rootModel, getModel(), DisplayTarget.NAME, DisplayPlace.OUTLINE_TREE));
+		setWidgetText(LabelStringUtil.getString(rootModel, model, DisplayPlace.OUTLINE_TREE));
 		
 		ImageRegistry ir = JiemamyPlugin.getDefault().getImageRegistry();
 		setWidgetImage(ir.get(Images.ICON_COLUMN));

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/DomainTreeEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/DomainTreeEditPart.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/DomainTreeEditPart.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -24,7 +24,6 @@
 import org.jiemamy.eclipse.Images;
 import org.jiemamy.eclipse.JiemamyPlugin;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.editpolicy.JmTreeComponentEditPolicy;
 import org.jiemamy.eclipse.editor.utils.LabelStringUtil;
 import org.jiemamy.model.JiemamyElement;
@@ -74,9 +73,9 @@
 	@Override
 	protected void refreshVisuals() {
 		RootModel rootModel = (RootModel) getRoot().getContents().getModel();
-		
+		DomainModel model = getModel();
 		// ツリー・アイテムのテキストとしてモデルのテキストを設定
-		setWidgetText(LabelStringUtil.getString(rootModel, getModel(), DisplayTarget.NAME, DisplayPlace.OUTLINE_TREE));
+		setWidgetText(LabelStringUtil.getString(rootModel, model, DisplayPlace.OUTLINE_TREE));
 		
 		ImageRegistry ir = JiemamyPlugin.getDefault().getImageRegistry();
 		setWidgetImage(ir.get(Images.ICON_COLUMN));

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/TableTreeEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/TableTreeEditPart.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/TableTreeEditPart.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -26,7 +26,6 @@
 import org.jiemamy.eclipse.Images;
 import org.jiemamy.eclipse.JiemamyPlugin;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.editpolicy.JmTreeComponentEditPolicy;
 import org.jiemamy.eclipse.editor.utils.LabelStringUtil;
 import org.jiemamy.model.JiemamyElement;
@@ -105,7 +104,7 @@
 		RootModel rootModel = (RootModel) getRoot().getContents().getModel();
 		TableModel model = getModel();
 		// ツリー・アイテムのテキストとしてモデルのテキストを設定
-		setWidgetText(LabelStringUtil.getString(rootModel, model, DisplayTarget.NAME, DisplayPlace.OUTLINE_TREE));
+		setWidgetText(LabelStringUtil.getString(rootModel, model, DisplayPlace.OUTLINE_TREE));
 		
 		ImageRegistry ir = JiemamyPlugin.getDefault().getImageRegistry();
 		setWidgetImage(ir.get(Images.ICON_TABLE));

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/ViewTreeEditPart.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/ViewTreeEditPart.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/outlinetree/ViewTreeEditPart.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -24,7 +24,6 @@
 import org.jiemamy.eclipse.Images;
 import org.jiemamy.eclipse.JiemamyPlugin;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.eclipse.editor.editpart.DoubleClickSupport;
 import org.jiemamy.eclipse.editor.editpart.EditDialogSupport;
 import org.jiemamy.eclipse.editor.editpolicy.JmTreeComponentEditPolicy;
@@ -104,7 +103,7 @@
 		RootModel rootModel = (RootModel) getRoot().getContents().getModel();
 		ViewModel model = getModel();
 		// ツリー・アイテムのテキストとしてモデルのテキストを設定
-		setWidgetText(LabelStringUtil.getString(rootModel, model, DisplayTarget.NAME, DisplayPlace.OUTLINE_TREE));
+		setWidgetText(LabelStringUtil.getString(rootModel, model, DisplayPlace.OUTLINE_TREE));
 		
 		ImageRegistry ir = JiemamyPlugin.getDefault().getImageRegistry();
 		setWidgetImage(ir.get(Images.ICON_VIEW));

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/figure/TableFigure.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/figure/TableFigure.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/figure/TableFigure.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -45,8 +45,6 @@
 	
 	private CompartmentFigure columnTypeFigure = new CompartmentFigure();
 	
-	private FigureType nextFigure = FigureType.NAME;
-	
 
 	/**
 	 * インスタンスを生成する。
@@ -74,18 +72,12 @@
 	/**
 	 * フィギュアを追加する。
 	 * 
-	 * <p>配列[0]に左(カラム名)、配列[1]に右(型)のFigureを渡す。</p>
-	 * 
-	 * @param figures 追加するフィギュアの配列
-	 * @throws IllegalArgumentException 配列のサイズが2ではない場合
+	 * @param nameFigure カラム名
+	 * @param typeFigure 型
 	 */
-	public void add(ColumnFigure[] figures) {
-		if (figures.length != 2) {
-			throw new IllegalArgumentException();
-		}
-		
-		columnNameFigure.add(figures[0]);
-		columnTypeFigure.add(figures[1]);
+	public void add(ColumnFigure nameFigure, ColumnFigure typeFigure) {
+		columnNameFigure.add(nameFigure);
+		columnTypeFigure.add(typeFigure);
 	}
 	
 	@Override
@@ -148,16 +140,4 @@
 			setBorder(new CompartmentFigureBorder());
 		}
 	}
-	
-	/**
-	 * TODO for daisuke
-	 * @author daisuke
-	 */
-	private static enum FigureType {
-		/** TODO for daisuke */
-		NAME,
-
-		/** TODO for daisuke */
-		DATA_TYPE
-	}
 }

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/utils/LabelStringUtil.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/utils/LabelStringUtil.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/utils/LabelStringUtil.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -23,7 +23,6 @@
 import org.jiemamy.ReferenceResolver;
 import org.jiemamy.dialect.Dialect;
 import org.jiemamy.eclipse.editor.DisplayPlace;
-import org.jiemamy.eclipse.editor.DisplayTarget;
 import org.jiemamy.formatter.DefaultSqlFormatter;
 import org.jiemamy.model.JiemamyElement;
 import org.jiemamy.model.RootModel;
@@ -53,8 +52,7 @@
 	 * @param place
 	 * @return
 	 */
-	public static String getString(RootModel rootModel, DataType dataType, DisplayTarget displayTarget,
-			DisplayPlace place) {
+	public static String getString(RootModel rootModel, DataType dataType, DisplayPlace place) {
 		ReferenceResolver resolver = rootModel.getJiemamy().getReferenceResolver();
 		try {
 			Dialect dialect = RootModelUtil.getDialect(rootModel);
@@ -84,8 +82,7 @@
 	 * @param place
 	 * @return
 	 */
-	public static String getString(RootModel rootModel, JiemamyElement targetElement, DisplayTarget displayTarget,
-			DisplayPlace place) {
+	public static String getString(RootModel rootModel, JiemamyElement targetElement, DisplayPlace place) {
 		
 		if (targetElement instanceof DomainModel) {
 			DomainModel domainModel = (DomainModel) targetElement;
@@ -95,11 +92,7 @@
 			return entityModel.getName();
 		} else if (targetElement instanceof ColumnModel) {
 			ColumnModel columnModel = (ColumnModel) targetElement;
-			if (displayTarget == DisplayTarget.NAME) {
-				return columnModel.getName();
-			} else if (displayTarget == DisplayTarget.TYPE) {
-				return getString(rootModel, columnModel.getDataType(), displayTarget, place);
-			}
+			return columnModel.getName();
 		} else if (targetElement instanceof ForeignKeyModel) {
 			ForeignKeyModel foreignKeyModel = (ForeignKeyModel) targetElement;
 			StringBuilder sb = new StringBuilder("FK");

Added: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ComposerSettingDialog.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ComposerSettingDialog.java	                        (rev 0)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ComposerSettingDialog.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2007-2009 Jiemamy Project and the Others.
+ * Created on 2009/02/25
+ *
+ * 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.ui;
+
+
+/**
+ * TODO for daisuke
+ * 
+ * @author daisuke
+ */
+public class ComposerSettingDialog {
+	
+}


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

Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/formatter/SqlFormatter.java
===================================================================
--- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/formatter/SqlFormatter.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/formatter/SqlFormatter.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -18,7 +18,10 @@
  */
 package org.jiemamy.formatter;
 
+import java.util.List;
+
 import org.jiemamy.model.sql.SqlStatement;
+import org.jiemamy.model.sql.Token;
 
 /**
  * SQLを整形するフォーマッタインターフェイス。
@@ -30,9 +33,16 @@
 	/**
 	 * SQL文字列に整形する。
 	 * 
+	 * @param tokens トークン列
+	 * @return 整形済みSQL文字列
+	 */
+	String format(List<Token> tokens);
+	
+	/**
+	 * SQL文字列に整形する。
+	 * 
 	 * @param stmt SQL文
 	 * @return 整形済みSQL文字列
 	 */
 	String format(SqlStatement stmt);
-	
 }

Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/DomainModel.java
===================================================================
--- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/DomainModel.java	2009-02-24 17:12:10 UTC (rev 2733)
+++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/DomainModel.java	2009-02-25 04:01:11 UTC (rev 2734)
@@ -129,6 +129,7 @@
 	 * ドメイン名を設定する。
 	 * 
 	 * @param name ドメイン名
+	 * @throws IllegalArgumentException 引数に{@code null}を与えた場合
 	 */
 	void setName(String name);
 	



Jiemamy-notify メーリングリストの案内
アーカイブの一覧に戻る