svnno****@sourc*****
svnno****@sourc*****
2009年 2月 24日 (火) 07:50:57 JST
Revision: 2722 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2722 Author: daisuke_m Date: 2009-02-24 07:50:56 +0900 (Tue, 24 Feb 2009) Log Message: ----------- J-eclipseをリファクタリングに追従。 / add comment Modified Paths: -------------- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.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/TableEditDialogCheckTab.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/dialog/table/TableEditDialogIndexTab.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java -------------- next part -------------- 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-02-23 13:27:35 UTC (rev 2721) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -90,6 +90,7 @@ * @return */ public static String toStringKeyColumns(KeyConstraintModel keyModel) { + // TODO keyModel.getName()も活用 ReferenceResolver resolver = keyModel.getJiemamy().getReferenceResolver(); List<ColumnRef> keyColumns = keyModel.getKeyColumns(); List<String> columnNames = CollectionsUtil.newArrayList(keyColumns.size()); Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java 2009-02-23 13:27:35 UTC (rev 2721) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/foreignkey/ForeignKeyEditDialog.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -61,7 +61,7 @@ */ public class ForeignKeyEditDialog extends Dialog { - private static final Logger logger = LoggerFactory.getLogger(ForeignKeyEditDialog.class); + private static Logger logger = LoggerFactory.getLogger(ForeignKeyEditDialog.class); private ForeignKeyModel foreignKeyModel; @@ -103,7 +103,7 @@ setShellStyle(getShellStyle() | SWT.RESIZE); this.foreignKeyModel = foreignKeyModel; jiemamy = foreignKeyModel.getJiemamy(); - TableModel sourceTableModel = AttributeUtil.getBelongingTable(foreignKeyModel); + TableModel sourceTableModel = AttributeUtil.getDefinedTable(foreignKeyModel); TableModel targetTableModel = (TableModel) ForeignKeyUtil.getReferenceEntity(this.foreignKeyModel); sourceColumns = TableUtil.getColumns(sourceTableModel); referenceKeys = TableUtil.getAttributes(targetTableModel, LocalKeyModel.class); @@ -132,6 +132,17 @@ radImmediate.setSelection(deferrability.getInitiallyCheckTime() == InitiallyCheckTime.IMMEDIATE); radDeferred.setSelection(deferrability.getInitiallyCheckTime() == InitiallyCheckTime.DEFERRED); } + + if (chkDeferrable.getSelection()) { + radImmediate.setEnabled(true); + radDeferred.setEnabled(true); + } else { + radImmediate.setEnabled(false); + radImmediate.setSelection(true); + radDeferred.setEnabled(false); + radDeferred.setSelection(false); + } + return result; } @@ -164,7 +175,7 @@ label = new Label(composite, SWT.NULL); label.setText("参照キー"); // RESOURCE - cmbReferenceKey = new Combo(composite, SWT.READ_ONLY); + cmbReferenceKey = new Combo(composite, SWT.READ_ONLY); // TODO CComboにしてPKkラベルを cmbReferenceKey.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); for (LocalKeyModel referenceKey : referenceKeys) { cmbReferenceKey.add(KeyConstraintUtil.toStringKeyColumns(referenceKey)); @@ -201,7 +212,7 @@ gd.horizontalSpan = 5; group.setLayoutData(gd); - if (true) { + if (true) { // TODO 固定true label = new Label(group, SWT.NULL); label.setText("参照するカラムがありましぇん(´・ω・`)"); } else { Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.java 2009-02-23 13:27:35 UTC (rev 2721) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDataSetTab.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -58,7 +58,7 @@ import org.jiemamy.model.JiemamyElement; import org.jiemamy.model.RootModel; import org.jiemamy.model.dataset.DataSetModel; -import org.jiemamy.utils.ListUtils; +import org.jiemamy.utils.ListUtil; import org.jiemamy.utils.LogMarker; /** @@ -397,7 +397,7 @@ return; } - ListUtils.moveDown(dataSets, index); + ListUtil.moveDown(dataSets, index); table.setSelection(index + 1); enableEditControls(index + 1); @@ -411,7 +411,7 @@ return; } - ListUtils.moveUp(dataSets, index); + ListUtil.moveUp(dataSets, index); table.setSelection(index - 1); enableEditControls(index - 1); 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-23 13:27:35 UTC (rev 2721) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -74,7 +74,7 @@ import org.jiemamy.model.datatype.DomainModel; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.utils.CollectionsUtil; -import org.jiemamy.utils.ListUtils; +import org.jiemamy.utils.ListUtil; import org.jiemamy.utils.LogMarker; import org.jiemamy.utils.model.RootModelUtil; @@ -602,7 +602,7 @@ return; } - ListUtils.moveDown(domains, index); + ListUtil.moveDown(domains, index); table.setSelection(index + 1); enableEditControls(index + 1); @@ -616,7 +616,7 @@ return; } - ListUtils.moveUp(domains, index); + ListUtil.moveUp(domains, index); table.setSelection(index - 1); enableEditControls(index - 1); Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java 2009-02-23 13:27:35 UTC (rev 2721) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -56,7 +56,7 @@ import org.jiemamy.model.attribute.constraint.CheckConstraintModel; import org.jiemamy.model.attribute.constraint.TableCheckModel; import org.jiemamy.model.entity.TableModel; -import org.jiemamy.utils.ListUtils; +import org.jiemamy.utils.ListUtil; import org.jiemamy.utils.LogMarker; import org.jiemamy.utils.model.TableUtil; @@ -413,8 +413,8 @@ } // FIXME attributesに対しては、indexを調整しないと。 - ListUtils.moveDown(tableModel.getAttributes(), index); - ListUtils.moveDown(checks, index); + ListUtil.moveDown(tableModel.getAttributes(), index); + ListUtil.moveDown(checks, index); table.setSelection(index + 1); enableEditControls(index + 1); @@ -429,8 +429,8 @@ } // FIXME attributesに対しては、indexを調整しないと。 - ListUtils.moveUp(tableModel.getAttributes(), index); - ListUtils.moveUp(checks, index); + ListUtil.moveUp(tableModel.getAttributes(), index); + ListUtil.moveUp(checks, index); table.setSelection(index - 1); enableEditControls(index - 1); 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-23 13:27:35 UTC (rev 2721) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -80,7 +80,7 @@ import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.model.entity.TableModel; import org.jiemamy.utils.CollectionsUtil; -import org.jiemamy.utils.ListUtils; +import org.jiemamy.utils.ListUtil; import org.jiemamy.utils.LogMarker; import org.jiemamy.utils.model.ColumnUtil; import org.jiemamy.utils.model.KeyConstraintUtil; @@ -781,8 +781,8 @@ } // FIXME attributesに対しては、indexを調整しないと。 - ListUtils.moveDown(tableModel.getAttributes(), index); - ListUtils.moveDown(columns, index); + ListUtil.moveDown(tableModel.getAttributes(), index); + ListUtil.moveDown(columns, index); table.setSelection(index + 1); enableEditControls(index + 1); @@ -797,8 +797,8 @@ } // FIXME attributesに対しては、indexを調整しないと。 - ListUtils.moveUp(tableModel.getAttributes(), index); - ListUtils.moveUp(columns, index); + ListUtil.moveUp(tableModel.getAttributes(), index); + ListUtil.moveUp(columns, index); table.setSelection(index - 1); enableEditControls(index - 1); Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java 2009-02-23 13:27:35 UTC (rev 2721) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -61,7 +61,7 @@ import org.jiemamy.model.index.IndexColumnModel; import org.jiemamy.model.index.IndexModel; import org.jiemamy.model.index.IndexColumnModel.SortType; -import org.jiemamy.utils.ListUtils; +import org.jiemamy.utils.ListUtil; import org.jiemamy.utils.LogMarker; import org.jiemamy.utils.model.TableUtil; @@ -425,7 +425,7 @@ return; } - ListUtils.moveDown(indexColumns, indexIndex); + ListUtil.moveDown(indexColumns, indexIndex); table.setSelection(index + 1); enableEditControls(index + 1); @@ -440,7 +440,7 @@ return; } - ListUtils.moveUp(indexColumns, indexIndex); + ListUtil.moveUp(indexColumns, indexIndex); table.setSelection(index - 1); enableEditControls(index - 1); @@ -754,7 +754,7 @@ return; } - ListUtils.moveDown(indexes, index); + ListUtil.moveDown(indexes, index); table.setSelection(index + 1); enableEditControls(index + 1); @@ -768,7 +768,7 @@ return; } - ListUtils.moveUp(indexes, index); + ListUtil.moveUp(indexes, index); table.setSelection(index - 1); enableEditControls(index - 1); Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java 2009-02-23 13:27:35 UTC (rev 2721) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogLocalKeyTab.java 2009-02-23 22:50:56 UTC (rev 2722) @@ -67,7 +67,7 @@ import org.jiemamy.model.attribute.constraint.UniqueKeyModel; import org.jiemamy.model.entity.TableModel; import org.jiemamy.utils.CollectionsUtil; -import org.jiemamy.utils.ListUtils; +import org.jiemamy.utils.ListUtil; import org.jiemamy.utils.LogMarker; import org.jiemamy.utils.model.TableUtil; @@ -461,8 +461,8 @@ } // FIXME attributesに対しては、indexを調整しないと。 - ListUtils.moveDown(tableModel.getAttributes(), index); - ListUtils.moveDown(localKeys, index); + ListUtil.moveDown(tableModel.getAttributes(), index); + ListUtil.moveDown(localKeys, index); table.setSelection(index + 1); enableEditControls(index + 1); @@ -477,8 +477,8 @@ } // FIXME attributesに対しては、indexを調整しないと。 - ListUtils.moveUp(tableModel.getAttributes(), index); - ListUtils.moveUp(localKeys, index); + ListUtil.moveUp(tableModel.getAttributes(), index); + ListUtil.moveUp(localKeys, index); table.setSelection(index - 1); enableEditControls(index - 1);