svnno****@sourc*****
svnno****@sourc*****
2009年 4月 14日 (火) 23:42:52 JST
Revision: 3276 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3276 Author: daisuke_m Date: 2009-04-14 23:42:52 +0900 (Tue, 14 Apr 2009) Log Message: ----------- 警告とタスクタグに対処。 Modified Paths: -------------- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/DatabaseTest.java artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/DatabaseReader.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/impl/DefaultSqlEmitter.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/AddRecordsToDataSetCommand.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/RemoveRecordsFromDataSetCommand.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/model/sql/SqlStatementImpl.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DefaultDatabaseConnectionConfig.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/ValidatorUtil.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EntityUtil.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EqualsUtil.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java artemis/trunk/jiemamy-dialect-postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlEntityImportVisitor.java artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/JiemamyViewFacadeImpl.java artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/editcommand/RemoveConnectionViewCommand.java artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/NodeAdapterImpl.java eros/maven-jiemamy-plugin/trunk/src/main/java/org/jiemamy/maven/CleanDatabaseMojo.java hestia/trunk/jiemamy-hestia/pull.bat hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/Images.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/JiemamyUIPlugin.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/EntityPropertySource.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/AbstractMovePositionCommand.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/AbstractEditListener.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/EditListener.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/TypeOptionHandler.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractEntityNodeEditPart.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmLayoutEditPolicy.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/utils/MarkerUtil.java leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/ForEachUtil.java leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/SqlExecuter.java leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/ModelUtil.java leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/TestModelBuilders.java metis/documents/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/experimental/builder/DataTypeBuilder.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/facade/JiemamyFacade.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/RootModel.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/attribute/RepresentationAdapter.java zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/facade/JiemamyViewFacade.java zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java -------------- next part -------------- Modified: artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/DatabaseTest.java =================================================================== --- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/DatabaseTest.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/DatabaseTest.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -288,12 +288,12 @@ SqlExecuter executer = new SqlExecuter(connection); for (SqlStatement stmt : statements) { - boolean ignoreSqlException = stmt.toString().startsWith("DROP"); - if (ignoreSqlException) { - executer.executeIgnoreSqlException(stmt.toString()); - } else { - executer.execute(stmt.toString()); - } +// boolean ignoreSqlException = stmt.toString().startsWith("DROP"); +// if (ignoreSqlException) { +// executer.executeIgnoreSqlException(stmt.toString()); +// } else { + executer.execute(stmt.toString()); +// } } } catch (FileNotFoundException e) { logger.warn(testDatabase.name() + " skip"); Modified: artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java =================================================================== --- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -77,7 +77,7 @@ // 指定されたドライバが全て揃っていない限り、スキップ assumeThat(existsAll(paths), is(true)); - // FIXME Oracleの設定が完了し次第、スキップなしで + // FIXME Oracleのdialectが整備されるまでskip // Oracleで、passwordが空の時(Hudsonの時)はスキップ assumeThat((testDatabase == TestDatabaseInstance.Oracle && StringUtils.isEmpty(config.getPassword())), is(false)); Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/DatabaseReader.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/DatabaseReader.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/DatabaseReader.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -97,9 +97,7 @@ assert metaData != null; Validate.notNull(visitor); - String schema = config.getSchema(); - - TypeSafeResultSet<TableMeta> tables = metaData.getTables(null, schema, "%", null); + TypeSafeResultSet<TableMeta> tables = metaData.getTables(null, config.getSchema(), "%", null); T result = ForEachUtil.accept(tables, visitor); return result; @@ -124,8 +122,7 @@ List<T> result = CollectionsUtil.newArrayList(); for (String entityName : entityNames) { - TypeSafeResultSet<KeyMeta> importedKeys = - metaData.getImportedKeys(null, /* TODO config.getSchema() */null, entityName); + TypeSafeResultSet<KeyMeta> importedKeys = metaData.getImportedKeys(null, config.getSchema(), entityName); result.add(ForEachUtil.accept(importedKeys, visitor)); } return result; Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/impl/DefaultSqlEmitter.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/impl/DefaultSqlEmitter.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/internal/impl/DefaultSqlEmitter.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -156,6 +156,7 @@ DataSetModel dataSetModel = rootModel.getDataSets().get(dataSetIndex); + result.add(new SqlStatementImpl(Keyword.of("BEGIN"), Separator.SEMICOLON)); for (EntityModel entityModel : EntityDependencyCalculator.getSortedEntityList(rootModel)) { if (entityModel.hasAdapter(Disablable.class) && Boolean.TRUE.equals(entityModel.getAdapter(Disablable.class).isDisabled())) { @@ -173,6 +174,7 @@ } } + result.add(new SqlStatementImpl(Keyword.of("COMMIT"), Separator.SEMICOLON)); } if (StringUtils.isEmpty(rootModel.getEndScript()) == false) { Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/AddRecordsToDataSetCommand.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/AddRecordsToDataSetCommand.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/AddRecordsToDataSetCommand.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -36,10 +36,10 @@ */ public class AddRecordsToDataSetCommand extends AbstractCommand { - /** レコード削除元の{@link DataSetModel} */ + /** レコード追加対象の{@link DataSetModel} */ private final DataSetModel dataSetModel; - /** レコード削除対象の{@link TableModel} */ + /** レコード追加対象の{@link TableModel} */ private final TableModel tableModel; /** データセット保存用リストとして使用するインスタンス */ @@ -50,8 +50,8 @@ * インスタンスを生成する。 * * @param eventBroker イベント通知用{@link EventBroker} - * @param dataSetModel レコード削除元の{@link DataSetModel} - * @param tableModel レコード削除対象の{@link TableModel} + * @param dataSetModel レコード追加対象の{@link DataSetModel} + * @param tableModel レコード追加対象の{@link TableModel} */ public AddRecordsToDataSetCommand(EventBroker eventBroker, DataSetModel dataSetModel, TableModel tableModel) { this(eventBroker, dataSetModel, tableModel, new ArrayList<RecordModel>()); Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/RemoveRecordsFromDataSetCommand.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/RemoveRecordsFromDataSetCommand.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/editcommand/RemoveRecordsFromDataSetCommand.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -48,8 +48,8 @@ * インスタンスを生成する。 * * @param eventBroker イベント通知用{@link EventBroker} - * @param dataSetModel レコード追加対象の{@link DataSetModel} - * @param tableModel レコード追加対象の{@link TableModel} + * @param dataSetModel レコード削除元の{@link DataSetModel} + * @param tableModel レコード削除対象の{@link TableModel} */ public RemoveRecordsFromDataSetCommand(EventBroker eventBroker, DataSetModel dataSetModel, TableModel tableModel) { super(eventBroker); Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/model/sql/SqlStatementImpl.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/model/sql/SqlStatementImpl.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/internal/model/sql/SqlStatementImpl.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -58,10 +58,14 @@ /** * インスタンスを生成する。 * - * @param token 唯一のトークン + * @param token トークン + * @param tokenArray トークン */ - public SqlStatementImpl(Token token) { + public SqlStatementImpl(Token token, Token... tokenArray) { tokens.add(token); + for (Token token2 : tokenArray) { + tokens.add(token2); + } } /** Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DefaultDatabaseConnectionConfig.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DefaultDatabaseConnectionConfig.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/DefaultDatabaseConnectionConfig.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -21,7 +21,7 @@ import java.net.URL; /** - * TODO for daisuke + * {@link DatabaseConnectionConfig}のデフォルト実装クラス。 * * @author daisuke */ Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/ValidatorUtil.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/ValidatorUtil.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/ValidatorUtil.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -21,10 +21,11 @@ import java.util.Collection; import org.jiemamy.validator.Problem; +import org.jiemamy.validator.Validator; import org.jiemamy.validator.Problem.Severity; /** - * TODO for daisuke + * {@link Validator}のユーティリティクラス。 * * @author daisuke */ Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EntityUtil.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EntityUtil.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EntityUtil.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -136,8 +136,6 @@ dependents.add(dependentTableModel); } } - } else if (entityModel instanceof ViewModel) { - // TODO ビュー定義をパースし、依存するエンティティを割り出す } } @@ -179,8 +177,6 @@ EntityModel keyEntity = ForeignKeyUtil.getReferenceEntity(foreignKey); parents.add(keyEntity); } - } else if (entityModel instanceof ViewModel) { - // TODO ビュー定義をパースし、依存するエンティティを割り出す } return parents; Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EqualsUtil.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EqualsUtil.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/EqualsUtil.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -26,8 +26,6 @@ import java.util.List; import org.apache.commons.lang.Validate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.jiemamy.Jiemamy; import org.jiemamy.exception.UnexpectedConditionError; @@ -61,8 +59,6 @@ /** for debug */ public static String rightGTree; - private static Logger logger = LoggerFactory.getLogger(EqualsUtil.class); - /** * 2つのオブジェクトのプロパティが等しいかどうか調べる。 @@ -95,8 +91,6 @@ rightWriter.close(); leftGTree = leftOut.toString(); rightGTree = rightOut.toString(); - logger.info("L = " + leftGTree.replaceAll("[\r\n]", "")); - logger.info("R = " + rightGTree.replaceAll("[\r\n]", "")); return leftGTree.equals(rightGTree); } Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -104,7 +104,6 @@ public static String toStringKeyColumns(KeyConstraint keyModel) { Validate.notNull(keyModel); - // TODO keyModel.getName()も活用 ReferenceResolver resolver = keyModel.getJiemamy().getReferenceResolver(); List<ColumnRef> keyColumns = keyModel.getKeyColumns(); List<String> columnNames = CollectionsUtil.newArrayList(keyColumns.size()); Modified: artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java =================================================================== --- artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -111,12 +111,12 @@ } /** - * TODO for daisuke + * AUTO_INCREMENT型のカラムが正常に出力されること。 * * @throws Exception 例外が発生した場合 */ @Test - public void test02() throws Exception { + public void test02_AUTO_INCREMENT型のカラムが正常に出力されること() throws Exception { Jiemamy jiemamy = Jiemamy.newInstance(); JiemamyFactory factory = jiemamy.getFactory(); RootModel rootModel = factory.getRootModel(); Modified: artemis/trunk/jiemamy-dialect-postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlEntityImportVisitor.java =================================================================== --- artemis/trunk/jiemamy-dialect-postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlEntityImportVisitor.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-dialect-postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlEntityImportVisitor.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -22,6 +22,7 @@ import java.util.List; import org.jiemamy.JiemamyFactory; +import org.jiemamy.dialect.internal.EntityImportVisitor; import org.jiemamy.dialect.internal.impl.DefaultEntityImportVisitor; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.datatype.BuiltinDataType; @@ -32,12 +33,16 @@ import org.jiemamy.utils.model.TableUtil; /** - * TODO for daisuke + * {@link EntityImportVisitor}のPostgreSQL用実装クラス。 * * @author daisuke */ public class PostgresqlEntityImportVisitor extends DefaultEntityImportVisitor { + /** TEXT型で定義されたカラムが返す、VARCHARに対するサイズ値 */ + private static final int TEXT_SIZE = 2147483647; + + @Override protected TableModel createTable(final JiemamyFactory factory, String tableName) throws SQLException { TableModel tableModel = super.createTable(factory, tableName); @@ -54,7 +59,7 @@ builtinDataType.setTypeName("SERIAL"); } } else if (builtinDataType.getCategory() == DataTypeCategory.VARCHAR) { - if (builtinDataType.getAdapter(SizedDataTypeAdapter.class).getSize() == 2147483647) { + if (builtinDataType.getAdapter(SizedDataTypeAdapter.class).getSize() == TEXT_SIZE) { builtinDataType.setCategory(DataTypeCategory.CLOB); builtinDataType.setTypeName("TEXT"); } Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/JiemamyViewFacadeImpl.java =================================================================== --- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/JiemamyViewFacadeImpl.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/JiemamyViewFacadeImpl.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -218,9 +218,9 @@ } public void removeNode(int diagramIndex, NodeAdapter nodeAdapter) { - // 削除対象のモデルをソースとするコネクションのリスト + // 削除対象のモデルをソースとするコネクションのリスト、のコピー List<ConnectionAdapter> sourceConnections = CollectionsUtil.newArrayList(nodeAdapter.getSourceConnections()); - // 削除対象のモデルをターゲットとするコネクションのリスト + // 削除対象のモデルをターゲットとするコネクションのリスト、のコピー List<ConnectionAdapter> targetConnections = CollectionsUtil.newArrayList(nodeAdapter.getTargetConnections()); for (ConnectionAdapter connection : sourceConnections) { @@ -228,6 +228,7 @@ } for (ConnectionAdapter connection : targetConnections) { + // DOCME ここはなぜ、profileの削除だけで、実体の削除を行わないのか? removeConnectionProfile(diagramIndex, connection); } Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/editcommand/RemoveConnectionViewCommand.java =================================================================== --- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/editcommand/RemoveConnectionViewCommand.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/editcommand/RemoveConnectionViewCommand.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -24,13 +24,12 @@ import org.jiemamy.model.DiagramPresentationModel; import org.jiemamy.model.DiagramPresentations; import org.jiemamy.model.JiemamyElement; -import org.jiemamy.model.NodeProfile; import org.jiemamy.model.RootModel; import org.jiemamy.model.connection.ConnectionAdapter; import org.jiemamy.model.node.NodeAdapter; /** - * {@link RootModel}に登録された{@link DiagramPresentations}アダプタから{@link NodeProfile}を削除するEDITコマンド。 + * {@link RootModel}に登録された{@link DiagramPresentations}アダプタから{@link ConnectionProfile}を削除するEDITコマンド。 * * @see AddConnectionViewCommand * @author shin1ogawa Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/NodeAdapterImpl.java =================================================================== --- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/NodeAdapterImpl.java 2009-04-14 13:38:54 UTC (rev 3275) +++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/internal/model/node/NodeAdapterImpl.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -28,7 +28,6 @@ import org.jiemamy.model.connection.ConnectionAdapter; import org.jiemamy.model.entity.EntityModel; import org.jiemamy.model.entity.TableModel; -import org.jiemamy.model.entity.ViewModel; import org.jiemamy.model.node.NodeAdapter; import org.jiemamy.utils.CollectionsUtil; import org.jiemamy.utils.model.EntityUtil; @@ -77,8 +76,6 @@ for (ForeignKey foreignKey : foreignKeys) { result.add(foreignKey.getAdapter(ConnectionAdapter.class)); } - } else if (coreEntityModel instanceof ViewModel) { - // TODO ビューが依存するエンティティ } return result; } @@ -100,8 +97,6 @@ result.add(foreignKey.getAdapter(ConnectionAdapter.class)); } } - } else if (sourceEntity instanceof ViewModel) { - // TODO ビューが依存されるエンティティ } } } Modified: eros/maven-jiemamy-plugin/trunk/src/main/java/org/jiemamy/maven/CleanDatabaseMojo.java =================================================================== --- eros/maven-jiemamy-plugin/trunk/src/main/java/org/jiemamy/maven/CleanDatabaseMojo.java 2009-04-14 13:38:54 UTC (rev 3275) +++ eros/maven-jiemamy-plugin/trunk/src/main/java/org/jiemamy/maven/CleanDatabaseMojo.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -38,7 +38,7 @@ import org.jiemamy.utils.JmIOUtil; /** - * TODO for daisuke + * Goal which clean Database. * * @goal cleanDatabase * @phase process-resources Modified: hestia/trunk/jiemamy-hestia/pull.bat =================================================================== --- hestia/trunk/jiemamy-hestia/pull.bat 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/jiemamy-hestia/pull.bat 2009-04-14 14:42:52 UTC (rev 3276) @@ -28,30 +28,30 @@ ) cd ..\jiemamy-commons\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-entity-io\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-zeus\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-test-helper\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-artemis\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-html-exporter\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-jpa-importer\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-jpa-exporter\ -call mvn install -Dmaven.test.skip=true +call mvn -o install -Dmaven.test.skip=true cd ..\jiemamy-hestia\ -call mvn clean package -Dmaven.test.skip=true +call mvn -o clean package -Dmaven.test.skip=true pause Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/Images.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/Images.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/Images.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -21,7 +21,7 @@ /** * 画像リソースのキークラス。 * - * <p>TODO NLSクラスで実装?</p> + * TODO NLSクラスを用いて実装 * * @author daisuke */ Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/JiemamyUIPlugin.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/JiemamyUIPlugin.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/JiemamyUIPlugin.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -169,7 +169,7 @@ } /** - * TODO for daisuke + * {@link ImageManager}をセットアップする。 * * @param display SWTディスプレイオブジェクト */ Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/action/AutoLayoutAction.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -56,7 +56,6 @@ */ public class AutoLayoutAction extends AbstractJiemamyAction { - /** TODO for daisuke */ private static final int PADDING = 40; Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -127,7 +127,7 @@ public class DiagramEditor extends GraphicalEditorWithFlyoutPalette implements IResourceChangeListener, CommandListener, JiemamyEditor { - /** TODO for daisuke */ + /** DELキーのキーコード */ private static final int KEYCODE_DEL = 127; private static Logger logger = LoggerFactory.getLogger(DiagramEditor.class); @@ -716,8 +716,8 @@ // EditPartFactory の設定 viewer.setEditPartFactory(new OutlineTreeEditPartFactory()); - // THINK ContextMenuの設定 - // THINK ToolBarManagerの設定 + // THINK アウトラインに対するContextMenuの設定 + // THINK アウトラインに対するToolBarManagerの設定 } /** Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/EntityPropertySource.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/EntityPropertySource.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/EntityPropertySource.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -29,6 +29,7 @@ import org.jiemamy.JiemamyProperty; import org.jiemamy.JiemamyProperty.EntityProperty; import org.jiemamy.eclipse.utils.ExceptionHandler; +import org.jiemamy.facade.JiemamyFacade; import org.jiemamy.model.Adapter; import org.jiemamy.model.AdapterType; import org.jiemamy.model.entity.EntityModel; @@ -42,6 +43,8 @@ @Adapter(AdapterType.LOGIC) public class EntityPropertySource implements IPropertySource { + private final JiemamyFacade jiemamyFacade; + private final EntityModel entityModel; @@ -52,6 +55,7 @@ */ public EntityPropertySource(EntityModel entityModel) { Validate.notNull(entityModel); + jiemamyFacade = entityModel.getJiemamy().getFactory().newFacade(JiemamyFacade.class); this.entityModel = entityModel; } @@ -101,23 +105,7 @@ @SuppressWarnings("unchecked") public void setPropertyValue(Object id, Object value) { - JiemamyProperty<EntityModel> prop = (JiemamyProperty<EntityModel>) id; - Class<? extends EntityModel> clazz = entityModel.getClass(); - try { - Method m = clazz.getMethod(ReflectionUtil.convertFieldNameToSetterName(prop.name()), String.class); - m.invoke(entityModel, value); - // TODO イベント飛ばすため、facade経由しなきゃな。 - } catch (SecurityException e) { - ExceptionHandler.handleException(e); - } catch (NoSuchMethodException e) { - ExceptionHandler.handleException(e); - } catch (IllegalArgumentException e) { - ExceptionHandler.handleException(e); - } catch (IllegalAccessException e) { - ExceptionHandler.handleException(e); - } catch (InvocationTargetException e) { - ExceptionHandler.handleException(e); - } + jiemamyFacade.changeModelProperty(entityModel, (JiemamyProperty<EntityModel>) id, value); } } Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/AbstractMovePositionCommand.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/AbstractMovePositionCommand.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/AbstractMovePositionCommand.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -84,8 +84,9 @@ } /** - * TODO for daisuke - * @return the jiemamyFacade + * ファサードを取得する。 + * + * @return ファサード */ protected JiemamyViewFacade getJiemamyFacade() { return jiemamyFacade; Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/AbstractEditListener.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/AbstractEditListener.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/AbstractEditListener.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -23,7 +23,7 @@ import org.eclipse.swt.events.TypedEvent; /** - * TODO for daisuke + * {@link EditListener}の骨格実装クラス。 * * @author daisuke */ @@ -44,7 +44,7 @@ } /** - * TODO for daisuke + * コントロールの操作時に実行する処理を記述するメソッド。 * * @param e {@link KeyEvent}または{@link SelectionEvent} */ Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/EditListener.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/EditListener.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/EditListener.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -20,10 +20,12 @@ import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Text; - /** - * TODO for daisuke + * {@link Text}や{@link Button}や{@link Combo}の操作に対するリスナインターフェイス。 * * @author daisuke */ Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/TypeOptionHandler.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/TypeOptionHandler.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/TypeOptionHandler.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -25,14 +25,14 @@ import org.jiemamy.model.datatype.DomainModel; /** - * TODO for daisuke + * 型オプションのUIをコントロールするインターフェイス。 * * @author daisuke */ public interface TypeOptionHandler { /** - * TODO for daisuke + * UIを構築する。 * * @param holder データ型を設定されるモデル({@link ColumnModel}または{@link DomainModel}) * @param composite オプションコントロール描画対象の親 Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -228,7 +228,13 @@ cmbReferenceKey = new Combo(composite, SWT.READ_ONLY); // TODO CComboにしてPKラベルを表示 cmbReferenceKey.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); for (LocalKeyConstraint referenceKey : referenceKeys) { - cmbReferenceKey.add(KeyConstraintUtil.toStringKeyColumns(referenceKey)); + StringBuilder sb = new StringBuilder(); + if (referenceKey.getName() != null) { + sb.append(referenceKey.getName()); + sb.append(" "); + } + sb.append(KeyConstraintUtil.toStringKeyColumns(referenceKey)); + cmbReferenceKey.add(sb.toString()); } cmbReferenceKey.addSelectionListener(new SelectionAdapter() { Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -64,6 +64,7 @@ import org.jiemamy.model.RootModel; import org.jiemamy.model.dataset.DataSetModel; import org.jiemamy.utils.LogMarker; +import org.jiemamy.utils.model.JiemamyPropertyUtil; /** * データベース編集ダイアログの「データセット」タブ。 @@ -230,11 +231,11 @@ }); } +// // THINK ↓要る? // @Override // protected void configureTable(final Table table) { // super.configureTable(table); // -// // THINK ↓要る? // final Menu menu = new Menu(table); // table.setMenu(menu); // menu.addMenuListener(new MenuAdapter() { @@ -326,8 +327,7 @@ btnEdit.setEnabled(true); // 現在値の設定 - // TODO use care - txtDataSetName.setText(StringUtils.defaultIfEmpty(dataSet.getName(), "")); + txtDataSetName.setText(JiemamyPropertyUtil.careNull(dataSet.getName())); } @Override Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -133,7 +133,6 @@ try { dialect = RootModelUtil.getDialect(rootModel); } catch (ClassNotFoundException e) { - // TODO DefaultDialectをセットするように変更。 dialect = JiemamyCorePlugin.getDialectResolver().getAllInstance().get(0); logger.warn("Dialectのロスト", e); } @@ -548,7 +547,7 @@ // 現在値の設定 txtDomainName.setText(domainModel.getName()); cmbDataType.setText(DataTypeUtil.getTypeName(dataType, jiemamy.getReferenceResolver())); - txtDescription.setText(StringUtils.defaultIfEmpty(domainModel.getDescription(), "")); // TODO use care + txtDescription.setText(JiemamyPropertyUtil.careNull(domainModel.getDescription())); chkIsNotNull.setSelection(domainModel.getNotNullConstraint() != null); CheckConstraint checkConstraint = domainModel.getCheckConstraint(); if (checkConstraint == null) { Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -227,11 +227,11 @@ txtCheckExpression.addKeyListener(editListener); } +// // THINK ↓要る? // @Override // protected void configureTable(final Table table) { // super.configureTable(table); // -// // THINK ↓要る? // final Menu menu = new Menu(table); // table.setMenu(menu); // menu.addMenuListener(new MenuAdapter() { @@ -339,9 +339,8 @@ txtCheckExpression.setEnabled(true); // 現在値の設定 - // TODO use care - txtCheckName.setText(StringUtils.defaultIfEmpty(checkConstraint.getName(), "")); - txtCheckExpression.setText(StringUtils.defaultIfEmpty(checkConstraint.getExpression(), "")); + txtCheckName.setText(JiemamyPropertyUtil.careNull(checkConstraint.getName())); + txtCheckExpression.setText(JiemamyPropertyUtil.careNull(checkConstraint.getExpression())); } @Override Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -147,7 +147,6 @@ try { dialect = RootModelUtil.getDialect(rootModel); } catch (ClassNotFoundException e) { - // TODO DefaultDialectをセットするように変更。 dialect = JiemamyCorePlugin.getDialectResolver().getAllInstance().get(0); logger.warn("Dialectのロスト", e); } @@ -640,15 +639,15 @@ // 現在値の設定 txtColumnName.setText(columnModel.getName()); - txtColumnLogicalName.setText(StringUtils.defaultIfEmpty(columnModel.getLogicalName(), "")); // TODO use care + txtColumnLogicalName.setText(JiemamyPropertyUtil.careNull(columnModel.getLogicalName())); // TODO use care ColumnCheckConstraint columnCheckConstraint = columnModel.getCheckConstraint(); if (columnCheckConstraint == null) { txtCheckName.setText(StringUtils.EMPTY); txtCheckExpression.setText(StringUtils.EMPTY); } else { - txtCheckName.setText(StringUtils.defaultIfEmpty(columnCheckConstraint.getName(), "")); - txtCheckExpression.setText(StringUtils.defaultIfEmpty(columnCheckConstraint.getExpression(), "")); + txtCheckName.setText(JiemamyPropertyUtil.careNull(columnCheckConstraint.getName())); + txtCheckExpression.setText(JiemamyPropertyUtil.careNull(columnCheckConstraint.getExpression())); } chkIsNotNull.setSelection(columnModel.getNotNullConstraint() != null); @@ -812,7 +811,7 @@ } /** - * TODO for daisuke + * 「高度な設定」のUIを構築する。 * * @param parent 親コンポーネント */ Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -575,10 +575,10 @@ private class IndexTableEditor extends AbstractTableEditor { - /** TODO for daisuke */ + /** 名前カラムの幅 */ private static final int COL_WIDTH_NAME = 180; - /** TODO for daisuke */ + /** 一意カラムの幅 */ private static final int COL_WIDTH_UNIQUE = 50; private final EditListener editListener = new IndexEditListenerImpl(); Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -254,11 +254,11 @@ lstKeyColumns.addSelectionListener(editListener); } +// // THINK ↓要る? // @Override // protected void configureTable(final Table table) { // super.configureTable(table); // -// // THINK ↓要る? // final Menu menu = new Menu(table); // table.setMenu(menu); // menu.addMenuListener(new MenuAdapter() { Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractEntityNodeEditPart.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractEntityNodeEditPart.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/AbstractEntityNodeEditPart.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -88,7 +88,7 @@ NodeAdapter node = getModel(); NodeProfile nodeProfile = presentation.getNodeProfiles().get(node); if (nodeProfile == null) { - // TODO 表示しない + // 表示しない } else { JmRectangle boundary = nodeProfile.getBoundary(); editPart.setLayoutConstraint(this, getFigure(), ConvertUtil.convert(boundary)); Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -142,7 +142,7 @@ DiagramPresentationModel presentation = diagramPresentations.get(Migration.DIAGRAM_INDEX); NodeProfile nodeProfile = presentation.getNodeProfiles().get(stickyModel); if (nodeProfile == null) { - // TODO 表示しない + // 表示しない } else { JmRectangle boundary = nodeProfile.getBoundary(); editPart.setLayoutConstraint(this, getFigure(), ConvertUtil.convert(boundary)); Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmLayoutEditPolicy.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmLayoutEditPolicy.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpolicy/JmLayoutEditPolicy.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -43,6 +43,10 @@ */ public class JmLayoutEditPolicy extends XYLayoutEditPolicy { + /** {@link StickyModel}が作られた時、はじめに設定されている値 */ + private static final String DEFAULT_STICKY_CONTENTS = "memo"; + + @Override protected Command createAddCommand(EditPart child, Object constraint) { return null; @@ -69,7 +73,7 @@ node = entityModel.getAdapter(NodeAdapter.class); } else if (model instanceof StickyModel) { StickyModel stickyModel = (StickyModel) model; - stickyModel.setContents("memo"); // THINK このままでいい? + stickyModel.setContents(DEFAULT_STICKY_CONTENTS); node = stickyModel; } Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/utils/MarkerUtil.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/utils/MarkerUtil.java 2009-04-14 13:38:54 UTC (rev 3275) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/utils/MarkerUtil.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -18,12 +18,6 @@ */ package org.jiemamy.eclipse.utils; -/** - * TODO for daisuke - * - * @author daisuke - */ - import java.util.HashMap; import java.util.Map; @@ -36,7 +30,7 @@ import org.jiemamy.eclipse.JiemamyUIPlugin; /** - * TODO describe + * Eclipseのエラーマーカー(Problemsビューに表示されるエントリ)を扱うユーティリティ。 * * @author daisuke */ Modified: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/ForEachUtil.java =================================================================== --- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/ForEachUtil.java 2009-04-14 13:38:54 UTC (rev 3275) +++ leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/ForEachUtil.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -111,12 +111,14 @@ /** * {@link TypeSafeResultSet}を処理するビジターアクセプタメソッド。 * + * @param <T> {@link TypeSafeResultSet}が返す型 * @param <R> 戻り値の型 * @param <X> visitメソッドが投げる可能性のある例外 * @param target 処理対象TypeSafeResultSet * @param visitor ビジター * @return accept結果 * @throws SQLException SQLの実行に失敗した場合 + * @throws X ビジターにより指定された例外がスローされた場合 * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ public static <T, R, X extends Exception>R accept(TypeSafeResultSet<T> target, Modified: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/SqlExecuter.java =================================================================== --- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/SqlExecuter.java 2009-04-14 13:38:54 UTC (rev 3275) +++ leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/SqlExecuter.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -75,21 +75,18 @@ return resultSet; } - /** - * TODO for daisuke - * - * @param sql 実行するSQL - */ - public void executeIgnoreSqlException(String sql) { - try { - execute(sql); - } catch (SQLException e) { - logger.warn("SQLException ignored: " + e.getMessage()); - try { - connection.commit(); - } catch (SQLException e2) { - logger.error("SQLException ignored: " + e.getMessage()); - } - } - } +// * @param sql 実行するSQL +// */ +// public void executeIgnoreSqlException(String sql) { +// try { +// execute(sql); +// } catch (SQLException e) { +// logger.warn("SQLException ignored: " + e.getMessage()); +// try { +// connection.commit(); +// } catch (SQLException e2) { +// logger.error("SQLException ignored: " + e.getMessage()); +// } +// } +// } } Modified: leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java =================================================================== --- leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java 2009-04-14 13:38:54 UTC (rev 3275) +++ leto/jiemamy-commons/trunk/src/main/java/org/jiemamy/utils/metadata/TypeSafeDatabaseMetaData.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -27,8 +27,6 @@ import java.util.Iterator; import org.apache.commons.lang.Validate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.jiemamy.exception.JiemamyError; @@ -391,8 +389,6 @@ */ public static class TypeSafeResultSet<T> { - private static Logger logger = LoggerFactory.getLogger(TypeSafeResultSet.class); - private ResultSet resultSet; private Class<T> resultClass; @@ -416,6 +412,12 @@ resultSet.close(); } + /** + * 現在のカーソル位置の結果を取得する。 + * + * @return 現在のカーソル位置の結果 + * @throws SQLException SQLの実行に失敗した場合。 + */ public T getResult() throws SQLException { try { Constructor<T> constructor = resultClass.getConstructor(ResultSet.class); @@ -439,6 +441,22 @@ } } + /** + * Moves the cursor down one row from its current position. + * A <code>ResultSet</code> cursor is initially positioned + * before the first row; the first call to the method + * <code>next</code> makes the first row the current row; the + * second call makes the second row the current row, and so on. + * + * <P>If an input stream is open for the current row, a call + * to the method <code>next</code> will + * implicitly close it. A <code>ResultSet</code> object's + * warning chain is cleared when a new row is read. + * + * @return <code>true</code> if the new current row is valid; + * <code>false</code> if there are no more rows + * @exception SQLException if a database access error occurs + */ public boolean next() throws SQLException { return resultSet.next(); } Modified: leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/ModelUtil.java =================================================================== --- leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/ModelUtil.java 2009-04-14 13:38:54 UTC (rev 3275) +++ leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/ModelUtil.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -33,7 +33,7 @@ import org.jiemamy.model.datatype.DataTypeCategory; /** - * TODO for daisuke + * {@link TestModelBuilder}がモデル生成時に用いるユーティリティクラス。 * * @author daisuke */ Modified: leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/TestModelBuilders.java =================================================================== --- leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/TestModelBuilders.java 2009-04-14 13:38:54 UTC (rev 3275) +++ leto/jiemamy-test-helper/trunk/src/main/java/org/jiemamy/internal/test/TestModelBuilders.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -66,17 +66,18 @@ } /** - * TODO for daisuke + * モデルをビルドし、Jiemamyコンテキストを取得する。 * - * @return + * @return Jiemamyコンテキスト */ public Jiemamy getBuiltModel() { return builder.build(); } /** - * TODO for daisuke - * @return the xml + * XML文字列を取得する。 + * + * @return XML文字列 */ public String getXml() { return xml; Modified: metis/documents/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java =================================================================== --- metis/documents/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java 2009-04-14 13:38:54 UTC (rev 3275) +++ metis/documents/trunk/src/test/java/org/jiemamy/documents/JiemamyTest.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -24,10 +24,15 @@ import org.jiemamy.utils.model.RootModelUtil; import org.junit.Test; +/** + * コードサンプル。 + * + * @author daisuke + */ public class JiemamyTest { /** - * TODO for daisuke + * コードサンプル。 * * @throws Exception 例外が発生した場合 */ @@ -39,7 +44,7 @@ } /** - * TODO for daisuke + * コードサンプル。 * * @throws Exception 例外が発生した場合 */ @@ -66,7 +71,7 @@ } /** - * TODO for daisuke + * コードサンプル。 * * @throws Exception 例外が発生した場合 */ @@ -80,7 +85,7 @@ } /** - * TODO for daisuke + * コードサンプル。 * * @throws Exception 例外が発生した場合 */ Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/experimental/builder/DataTypeBuilder.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/experimental/builder/DataTypeBuilder.java 2009-04-14 13:38:54 UTC (rev 3275) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/experimental/builder/DataTypeBuilder.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -19,6 +19,8 @@ package org.jiemamy.experimental.builder; import org.jiemamy.model.datatype.BuiltinDataType; +import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; +import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.utils.AdapterNotFoundException; /** @@ -43,7 +45,7 @@ * * @param precision 精度 * @return {@code this} - * @throws AdapterNotFoundException + * @throws AdapterNotFoundException {@link PrecisionedDataTypeAdapter}が登録されていない場合 * @since 0.2 */ DataTypeBuilder setPrecision(int precision); @@ -53,7 +55,7 @@ * * @param scale スケール * @return {@code this} - * @throws AdapterNotFoundException + * @throws AdapterNotFoundException {@link PrecisionedDataTypeAdapter}が登録されていない場合 * @since 0.2 */ DataTypeBuilder setScale(int scale); @@ -63,7 +65,7 @@ * * @param size サイズ * @return {@code this} - * @throws AdapterNotFoundException + * @throws AdapterNotFoundException {@link SizedDataTypeAdapter}が登録されていない場合 * @since 0.2 */ DataTypeBuilder setSize(int size); Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/facade/JiemamyFacade.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/facade/JiemamyFacade.java 2009-04-14 13:38:54 UTC (rev 3275) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/facade/JiemamyFacade.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -173,10 +173,10 @@ void addKeyColumn(KeyConstraint keyConstraint, ColumnModel columnModel); /** - * TODO for daisuke + * {@link DataSetModel}に、指定したテーブル用のレコード保存領域を確保する。 * - * @param dataSetModel - * @param tableModel + * @param dataSetModel レコード追加対象の{@link DataSetModel} + * @param tableModel レコード追加対象の{@link TableModel} * @since 0.2 */ void addRecords(DataSetModel dataSetModel, TableModel tableModel); @@ -280,10 +280,10 @@ void removeKeyColumn(KeyConstraint keyConstraint, ColumnModel columnModel); /** - * TODO for daisuke + * {@link DataSetModel}に確保された、指定したテーブル用のレコード保存領域を削除する。 * - * @param dataSetModel - * @param tableModel + * @param dataSetModel レコード削除元の{@link DataSetModel} + * @param tableModel レコード削除対象の{@link TableModel} * @since 0.2 */ void removeRecords(DataSetModel dataSetModel, TableModel tableModel); Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/RootModel.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/RootModel.java 2009-04-14 13:38:54 UTC (rev 3275) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/RootModel.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -33,15 +33,7 @@ * @since 0.2 * @author daisuke */ -public interface RootModel extends JiemamyElement { // THINK Cloneableの実装 - - // THINK cloneの検討 -// /** -// * モデルのクローンを生成する。 -// * -// * @return モデルのクローン -// */ -// RootModel clone(); +public interface RootModel extends JiemamyElement { /** * 開始スクリプトを取得する。 Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/attribute/RepresentationAdapter.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/attribute/RepresentationAdapter.java 2009-04-14 13:38:54 UTC (rev 3275) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/attribute/RepresentationAdapter.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -47,7 +47,7 @@ if (getClass() != obj.getClass()) { return false; } - final RepresentationAdapter other = (RepresentationAdapter) obj; + RepresentationAdapter other = (RepresentationAdapter) obj; if (representation == null) { if (other.representation != null) { return false; Modified: zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/facade/JiemamyViewFacade.java =================================================================== --- zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/facade/JiemamyViewFacade.java 2009-04-14 13:38:54 UTC (rev 3275) +++ zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/facade/JiemamyViewFacade.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -19,6 +19,7 @@ package org.jiemamy.facade; import org.jiemamy.model.ConnectionProfile; +import org.jiemamy.model.DiagramPresentations; import org.jiemamy.model.NodeProfile; import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.constraint.ForeignKey; @@ -73,7 +74,7 @@ void addNode(int diagramIndex, NodeAdapter nodeAdapter, JmRectangle rectangle); /** - * TODO for shin1ogawa + * {@link RootModel}に登録された{@link DiagramPresentations}アダプタに{@link NodeProfile}を追加する。 * * @param diagramIndex ダイアグラムエディタのインデックス(エディタ内のタブインデックス) * @param nodeAdapter ノードに対応する{@link NodeAdapter} @@ -136,8 +137,12 @@ void removeBendpoint(int diagramIndex, ConnectionAdapter connectionAdapter, int bendpointIndex); /** - * TODO for shin1ogawa + * {@link RootModel}に登録された{@link DiagramPresentations}アダプタから{@link ConnectionProfile}を削除する。 * + * <ul> + * <li>コネクションが外部キーだった場合は、テーブルから外部キーも削除する。</li> + * </ul> + * * @param diagramIndex ダイアグラムエディタのインデックス(エディタ内のタブインデックス) * @param connectionAdapter ノードに対応する{@link ConnectionAdapter} * @since 0.2 @@ -145,7 +150,7 @@ void removeConnection(int diagramIndex, ConnectionAdapter connectionAdapter); /** - * TODO for shin1ogawa + * {@link RootModel}に登録された{@link DiagramPresentations}アダプタから{@link ConnectionProfile}を削除する。 * * @param diagramIndex ダイアグラムエディタのインデックス(エディタ内のタブインデックス) * @param connectionAdapter ノードに対応する{@link ConnectionAdapter} @@ -156,6 +161,11 @@ /** * ノードを削除する。 * + * <ul> + * <li>ノードがエンティティだった場合は、{@link RootModel}からエンティティも削除する。</li> + * <li>このノードから出るコネクション及び、このノードへ向かうコネクションも同時に削除する。</li> + * </ul> + * * <p>GEFCommandで使用するためのよりファサードに近いメソッド。</p> * <p>テストしやすくするためにj-eclipseから引っ張りだしてきた。</p> * @@ -166,7 +176,7 @@ void removeNode(int diagramIndex, NodeAdapter nodeAdapter); /** - * TODO for shin1ogawa + * {@link RootModel}に登録された{@link DiagramPresentations}アダプタから{@link NodeProfile}を削除する。 * * @param diagramIndex ダイアグラムエディタのインデックス(エディタ内のタブインデックス) * @param nodeAdapter ノードに対応する{@link NodeAdapter} Modified: zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java =================================================================== --- zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java 2009-04-14 13:38:54 UTC (rev 3275) +++ zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java 2009-04-14 14:42:52 UTC (rev 3276) @@ -21,8 +21,6 @@ /** * ダイアグラム表現の集合を表すモデルインターフェイス。 * - * <p>THINK implements java.util.List の方がいい?</p> - * * @since 0.2 * @author daisuke */