svnno****@sourc*****
svnno****@sourc*****
2009年 2月 18日 (水) 18:40:55 JST
Revision: 2684 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2684 Author: daisuke_m Date: 2009-02-18 18:40:55 +0900 (Wed, 18 Feb 2009) Log Message: ----------- ライセンスコメント抜けへの対処。 / com.megginsonパッケージ(SAX関係ユーティリティ)の削除。 / freeStringプロパティを削除した件に合わせ、JiemamyPropertyも修正。 Modified Paths: -------------- artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/Instruction.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/UuidStrategy.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/AttributeComparator.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/EntityDependencyCalculator.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/xml/JiemamyNamespaceContext.java artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/internal/serializer/stax/JiemamyCommandInputStreamTest.java artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/utils/JmPointUtil.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialog.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/TableEditDialog.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/TableEditDialogIndexTab2.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogRecordTab.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/view/ViewEditDialog.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/EntityDirectEditManager.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyDirectEditManager.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/MultiLineTextCellEditor.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/NodeCellEditorLocator.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/AbstractTableEditor.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ControlArea.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/helper/TextSelectionAdapter.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/TextEditTab.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/JiemamyProperty.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/TargetModel.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/LiteralType.java zeus/trunk/jiemamy-spec-core/src/test/java/org/jiemamy/test/SampleXmlTest.java zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/Migration.java Added Paths: ----------- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/FileCommentTest.java Removed Paths: ------------- artemis/trunk/jiemamy-core/src/main/java/com/ artemis/trunk/jiemamy-core/src/test/java/com/ -------------- next part -------------- Added: artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/FileCommentTest.java =================================================================== --- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/FileCommentTest.java (rev 0) +++ artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/FileCommentTest.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -0,0 +1,144 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import java.io.File; +import java.io.FileFilter; +import java.io.IOException; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.CharEncoding; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.jiemamy.utils.CollectionsUtil; + +/** + * TODO for daisuke + * + * @author daisuke + */ +public class FileCommentTest { + + private static final Logger logger = LoggerFactory.getLogger(FileCommentTest.class); + + private static final List<String> projects; + + private static FileFilter filter = new FileFilter() { + + public boolean accept(File file) { + if (file.isDirectory()) { + if (file.getName().equals(".svn")) { + return false; + } + } + return file.isDirectory() || file.getName().endsWith(".java"); + } + }; + + static { + List<String> list = CollectionsUtil.newArrayList(); + list.add("jiemamy-spec-core"); + list.add("jiemamy-spec-diff"); + list.add("jiemamy-spec-view"); + + list.add("factory-enhancer"); + list.add("generic-tree"); + list.add("jiemamy-core"); + list.add("jiemamy-view"); + list.add("jiemamy-composer"); + list.add("jiemamy-dialect-sql99"); + list.add("jiemamy-dialect-postgresql"); + list.add("jiemamy-dialect-mysql"); + list.add("jiemamy-artemis-test"); + + list.add("org.jiemamy.eclipse"); + list.add("org.jiemamy.eclipse.dialect.sql99"); + list.add("org.jiemamy.eclipse.dialect.postgresql"); + list.add("org.jiemamy.eclipse.dialect.mysql"); + + projects = list; + } + + + /** + * setup + * + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * teardown + * + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + @Test + public void test01_ライセンスコメントがついていること() throws Exception { + List<File> errFiles = CollectionsUtil.newArrayList(); + for (String path : projects) { + logger.info(">>> Start Project " + path); + File file = new File("../" + path); + if (file.exists() == false || file.isDirectory() == false) { + logger.warn("not exist " + path); + continue; + } + + test(new File(file + "/src"), errFiles); + logger.info("End Project " + path); + } + logger.info("==== FAILURE ============"); + for (File file : errFiles) { + logger.info(file.toString()); + } + assertThat(errFiles.size(), is(0)); + } + + private void test(File file, List<File> errFiles) throws IOException { + File[] listFiles = file.listFiles(filter); + for (File file2 : listFiles) { + if (file2.isDirectory()) { + logger.trace(file2.toString()); + test(file2, errFiles); + } else { + String contents = FileUtils.readFileToString(file2, CharEncoding.UTF_8); + if (contents.startsWith("/*") == false) { + errFiles.add(file2); + logger.info("FAIL: " + file2.toString()); + } else { + logger.info("pass: " + file2.toString()); + } + } + } + } + +} Property changes on: artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/FileCommentTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java =================================================================== --- artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2008/07/26 + * + * 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.composer.importer; import java.net.URL; Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/Instruction.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/Instruction.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/Instruction.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/01/23 + * + * 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.test; /** Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/UuidStrategy.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/UuidStrategy.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/test/UuidStrategy.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/01/23 + * + * 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.test; import java.util.UUID; Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/AttributeComparator.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/AttributeComparator.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/AttributeComparator.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/06 + * + * 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.utils; import java.util.Comparator; Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/EntityDependencyCalculator.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/EntityDependencyCalculator.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/EntityDependencyCalculator.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2008/09/10 + * + * 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.utils; import java.util.ArrayList; Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/xml/JiemamyNamespaceContext.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/xml/JiemamyNamespaceContext.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/xml/JiemamyNamespaceContext.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/03 + * + * This file is part of Jiemamy. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ package org.jiemamy.xml; import java.util.Arrays; Modified: artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/internal/serializer/stax/JiemamyCommandInputStreamTest.java =================================================================== --- artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/internal/serializer/stax/JiemamyCommandInputStreamTest.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/internal/serializer/stax/JiemamyCommandInputStreamTest.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2008/12/29 + * + * 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.internal.serializer.stax; import static org.hamcrest.CoreMatchers.instanceOf; Modified: artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/utils/JmPointUtil.java =================================================================== --- artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/utils/JmPointUtil.java 2009-02-17 23:11:20 UTC (rev 2683) +++ artemis/trunk/jiemamy-view/src/main/java/org/jiemamy/utils/JmPointUtil.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2008/09/26 + * + * 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.utils; import org.apache.commons.lang.Validate; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -57,6 +57,7 @@ import org.eclipse.gef.ui.actions.ZoomOutAction; import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; import org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler; +import org.eclipse.gef.ui.parts.SelectionSynchronizer; import org.eclipse.jface.action.IAction; import org.eclipse.jface.commands.ActionHandler; import org.eclipse.jface.dialogs.ProgressMonitorDialog; @@ -74,7 +75,6 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionBars; -import org.eclipse.ui.IEditorActionBarContributor; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorSite; @@ -149,6 +149,7 @@ private Jiemamy jiemamy; + /** このエディタのタブインデックス */ private int tabIndex; @@ -158,16 +159,19 @@ public DiagramEditor() { setEditDomain(new DefaultEditDomain(this)); ResourcesPlugin.getWorkspace().addResourceChangeListener(this); - logger.debug("constructed"); + logger.debug("constructed - single"); } /** * インスタンスを生成する。 * - * @param rootModel2 + * @param rootModel + * @param tabIndex */ - public DiagramEditor(RootModel rootModel) { + public DiagramEditor(RootModel rootModel, int tabIndex) { // TODO Auto-generated constructor stub + this.tabIndex = tabIndex; + logger.debug("constructed - multi"); } /** @@ -232,49 +236,47 @@ IPath path = dialog.getResult(); if (path != null) { - // try to save the editor's contents under a different file name - final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); - try { - new ProgressMonitorDialog(shell).run(false, // don't fork - false, // not cancelable - new WorkspaceModifyOperation() { // run this operation - - @Override - public void execute(IProgressMonitor monitor) { - ByteArrayOutputStream out = null; - ByteArrayInputStream in = null; - try { - out = new ByteArrayOutputStream(); - jiemamy.getSerializer().serialize(rootModel, out); - - in = new ByteArrayInputStream(out.toByteArray()); - file.create(in, true, monitor); - } catch (Exception e) { - ExceptionHandler.handleException(e); - } finally { - IOUtils.closeQuietly(in); - IOUtils.closeQuietly(out); - } + return; + } + + // try to save the editor's contents under a different file name + final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + try { + new ProgressMonitorDialog(shell).run(false, // don't fork + false, // not cancelable + new WorkspaceModifyOperation() { // run this operation + + @Override + public void execute(IProgressMonitor monitor) { + ByteArrayOutputStream out = null; + ByteArrayInputStream in = null; + try { + out = new ByteArrayOutputStream(); + jiemamy.getSerializer().serialize(rootModel, out); + + in = new ByteArrayInputStream(out.toByteArray()); + file.create(in, true, monitor); + } catch (Exception e) { + ExceptionHandler.handleException(e); + } finally { + IOUtils.closeQuietly(in); + IOUtils.closeQuietly(out); } - }); - // タブに新しいファイル名をセット - setInput(new FileEditorInput(file)); - getCommandStack().markSaveLocation(); - } catch (InterruptedException e) { - // should not happen, since the monitor dialog is not cancelable - ExceptionHandler.handleException(e); - } catch (InvocationTargetException e) { - ExceptionHandler.handleException(e); - } + } + }); + setInput(new FileEditorInput(file)); + getCommandStack().markSaveLocation(); + } catch (InterruptedException e) { + // should not happen, since the monitor dialog is not cancelable + ExceptionHandler.handleException(e); + } catch (InvocationTargetException e) { + ExceptionHandler.handleException(e); } } - /** - * {@inheritDoc} - */ @Override @SuppressWarnings("unchecked") - // TODO キャスト安全性の根拠提示 + // Java1.4対応APIのため、Classに型パラメータをつけることができない public Object getAdapter(Class adapter) { if (adapter == ZoomManager.class) { return ((ScalableRootEditPart) getGraphicalViewer().getRootEditPart()).getZoomManager(); @@ -293,8 +295,14 @@ } /** - * {@inheritDoc} + * このエディタのタブインデックスを取得する。 + * + * @return タブインデックス */ + public int getTabIndex() { + return tabIndex; + } + @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { super.init(site, input); @@ -313,9 +321,6 @@ logger.debug("initialized"); } - /** - * {@inheritDoc} - */ @Override public boolean isSaveAsAllowed() { return true; @@ -345,9 +350,6 @@ } } - /** - * {@inheritDoc} - */ @Override public void selectionChanged(IWorkbenchPart part, ISelection selection) { if (part.getSite().getWorkbenchWindow().getActivePage() == null) { @@ -356,30 +358,25 @@ super.selectionChanged(part, selection); } - /** - * {@inheritDoc} - */ @Override public void setFocus() { super.setFocus(); - IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor(); - ((JmContributor) contributor).selectCombo(rootModel); + + JmContributor contributor = (JmContributor) getEditorSite().getActionBarContributor(); + contributor.selectCombo(rootModel); // Thanks to Naokiさん logger.debug("setFocus"); } /** - * TODO for daisuke + * このエディタのタブインデックスを設定する。 * - * @param tabIndex + * @param tabIndex タブインデックス */ public void setTabIndex(int tabIndex) { this.tabIndex = tabIndex; } - /** - * {@inheritDoc} - */ @Override protected void configureGraphicalViewer() { super.configureGraphicalViewer(); @@ -404,12 +401,7 @@ getSite().setSelectionProvider(viewer); } - /** - * {@inheritDoc} - */ @Override - @SuppressWarnings("unchecked") - // TODO キャスト安全性の根拠提示 protected void createActions() { super.createActions(); @@ -429,16 +421,20 @@ zoomManager.setZoomLevels(ZOOM_LEVELS); + @SuppressWarnings("unchecked") + // TODO キャスト安全性の根拠提示 + List<String> selectionActions = getSelectionActions(); + // zoom level contribution action = new ZoomInAction(zoomManager); registry.registerAction(action); handlerService.activateHandler(action.getActionDefinitionId(), new ActionHandler(action)); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); action = new ZoomOutAction(zoomManager); registry.registerAction(action); handlerService.activateHandler(action.getActionDefinitionId(), new ActionHandler(action)); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); // select action action = new SelectAllAction(this); @@ -447,43 +443,43 @@ // match size contribution action = new MatchWidthAction(this); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); action = new MatchHeightAction(this); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); // direct edit contribution action = new DirectEditAction((IWorkbenchPart) this); registry.registerAction(action); // 選択オブジェクトによってアクションを更新する必要がある場合には // 以下のようにして、そのアクションのIDを登録しておく - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); // alignment contribution action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.LEFT); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.RIGHT); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.TOP); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.BOTTOM); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.CENTER); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.MIDDLE); registry.registerAction(action); - getSelectionActions().add(action.getId()); + selectionActions.add(action.getId()); } /** @@ -564,8 +560,10 @@ /** ページをアウトラインとサムネイルに分離するコンポーネント */ private SashForm sash; + /** アウトライン */ private Control outline; + /** サムネイル */ private Canvas overview; /** サムネイルを表示する為のフィギュア */ @@ -573,6 +571,8 @@ private DisposeListener disposeListener; + private final EditPartViewer viewer; + /** * インスタンスを生成する。 @@ -580,17 +580,15 @@ */ public DiagramOutlinePage(EditPartViewer viewer) { super(viewer); + this.viewer = viewer; } - /** - * {@inheritDoc} - */ @Override public void createControl(Composite parent) { sash = new SashForm(parent, SWT.VERTICAL); // sash上にコンストラクタで指定したビューワの作成 - outline = getViewer().createControl(sash); + outline = viewer.createControl(sash); configureOutlineViewer(); hookOutlineViewer(); @@ -622,32 +620,25 @@ getGraphicalViewer().getControl().addDisposeListener(disposeListener); } - /** - * {@inheritDoc} - */ @Override public void dispose() { + SelectionSynchronizer selectionSynchronizer = getSelectionSynchronizer(); // SelectionSynchronizer からTreeViewerを削除 - getSelectionSynchronizer().removeViewer(getViewer()); + selectionSynchronizer.removeViewer(viewer); - if (getGraphicalViewer().getControl() != null && !getGraphicalViewer().getControl().isDisposed()) { - getGraphicalViewer().getControl().removeDisposeListener(disposeListener); + Control control = getGraphicalViewer().getControl(); + if (control != null && control.isDisposed() == false) { + control.removeDisposeListener(disposeListener); } super.dispose(); } - /** - * {@inheritDoc} - */ @Override public Control getControl() { return sash; } - /** - * {@inheritDoc} - */ @Override public void init(IPageSite pageSite) { super.init(pageSite); @@ -674,7 +665,7 @@ * @param contents 設定するコンテンツ */ public void setContents(Object contents) { - getViewer().setContents(contents); + viewer.setContents(contents); } /** @@ -682,9 +673,10 @@ */ protected void configureOutlineViewer() { // エディット・ドメインの設定 - getViewer().setEditDomain(getEditDomain()); + viewer.setEditDomain(getEditDomain()); + // EditPartFactory の設定 - getViewer().setEditPartFactory(new OutlineTreeEditPartFactory()); + viewer.setEditPartFactory(new OutlineTreeEditPartFactory()); // THINK ContextMenuの設定 // THINK ToolBarManagerの設定 @@ -693,21 +685,23 @@ @Override public void mouseDoubleClick(MouseEvent e) { - IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection(); + IStructuredSelection selection = (IStructuredSelection) viewer.getSelection(); Object obj = selection.getFirstElement(); if (obj instanceof DoubleClickSupport) { - ((DoubleClickSupport) obj).doubleClicked(); + DoubleClickSupport doubleClickSupport = (DoubleClickSupport) obj; + doubleClickSupport.doubleClicked(); } } }); } /** - * THINK アウトラインビュアーをhookします(?) + * アウトラインビュアー設定用のフックメソッド。 */ protected void hookOutlineViewer() { // グラフィカル・エディタとツリー・ビューワとの間で選択を同期させる - getSelectionSynchronizer().addViewer(getViewer()); + SelectionSynchronizer selectionSynchronizer = getSelectionSynchronizer(); + selectionSynchronizer.addViewer(getViewer()); } /** Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -48,6 +48,7 @@ import org.jiemamy.Artemis; import org.jiemamy.ArtemisView; import org.jiemamy.Jiemamy; +import org.jiemamy.JiemamyFactory; import org.jiemamy.eclipse.utils.ExceptionHandler; import org.jiemamy.model.DiagramPresentationModel; import org.jiemamy.model.DiagramPresentations; @@ -123,43 +124,45 @@ dialog.open(); IPath path = dialog.getResult(); - if (path != null) { - // try to save the editor's contents under a different file name - final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); - try { - new ProgressMonitorDialog(shell).run(false, // don't fork - false, // not cancelable - new WorkspaceModifyOperation() { // run this operation - - @Override - public void execute(IProgressMonitor monitor) { - ByteArrayOutputStream out = null; - ByteArrayInputStream in = null; - try { - out = new ByteArrayOutputStream(); - jiemamy.getSerializer().serialize(rootModel, out); - - in = new ByteArrayInputStream(out.toByteArray()); - file.create(in, true, monitor); - } catch (Exception e) { - ExceptionHandler.handleException(e); - } finally { - IOUtils.closeQuietly(in); - IOUtils.closeQuietly(out); - } + if (path == null) { + return; + } + + // try to save the editor's contents under a different file name + final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + try { + new ProgressMonitorDialog(shell).run(false, // don't fork + false, // not cancelable + new WorkspaceModifyOperation() { // run this operation + + @Override + public void execute(IProgressMonitor monitor) { + ByteArrayOutputStream out = null; + ByteArrayInputStream in = null; + try { + out = new ByteArrayOutputStream(); + jiemamy.getSerializer().serialize(rootModel, out); + + in = new ByteArrayInputStream(out.toByteArray()); + file.create(in, true, monitor); + } catch (Exception e) { + ExceptionHandler.handleException(e); + } finally { + IOUtils.closeQuietly(in); + IOUtils.closeQuietly(out); } - }); - // タブに新しいファイル名をセット - setInput(new FileEditorInput(file)); - for (DiagramEditor editor : editors) { - editor.doSaveAs(); - } - } catch (InterruptedException e) { - // should not happen, since the monitor dialog is not cancelable - ExceptionHandler.handleException(e); - } catch (InvocationTargetException e) { - ExceptionHandler.handleException(e); + } + }); + + setInput(new FileEditorInput(file)); + for (DiagramEditor editor : editors) { + editor.doSaveAs(); } + } catch (InterruptedException e) { + // should not happen, since the monitor dialog is not cancelable + ExceptionHandler.handleException(e); + } catch (InvocationTargetException e) { + ExceptionHandler.handleException(e); } } @@ -190,14 +193,15 @@ } catch (Exception e) { ExceptionHandler.handleException(e); } finally { + JiemamyFactory factory = jiemamy.getFactory(); if (rootModel == null) { - rootModel = jiemamy.getFactory().getRootModel(); + rootModel = factory.getRootModel(); } - if (rootModel.getAdapter(DiagramPresentations.class).size() == 0) { - DiagramPresentationModel presentationModel = - rootModel.getJiemamy().getFactory().newModel(DiagramPresentationModel.class); + DiagramPresentations presentations = rootModel.getAdapter(DiagramPresentations.class); + if (presentations.size() == 0) { + DiagramPresentationModel presentationModel = factory.newModel(DiagramPresentationModel.class); presentationModel.setName("default"); - rootModel.getAdapter(DiagramPresentations.class).add(presentationModel); + presentations.add(presentationModel); } } setPartName(input.getName()); @@ -219,9 +223,6 @@ } - /** - * {@inheritDoc} - */ @Override public void setFocus() { super.setFocus(); @@ -234,15 +235,12 @@ // Thanks to Naokiさん } - /** - * {@inheritDoc} - */ @Override protected void createPages() { for (DiagramPresentationModel presentation : rootModel.getAdapter(DiagramPresentations.class)) { // 各タブを生成 try { - DiagramEditor editor = new DiagramEditor(rootModel); + DiagramEditor editor = new DiagramEditor(rootModel, editors.size()); int tabIndex = addPage(editor, getEditorInput()); editor.setTabIndex(tabIndex); setPageText(tabIndex, presentation.getName()); @@ -253,12 +251,10 @@ } } - /** - * {@inheritDoc} - */ @Override protected void setInput(IEditorInput input) { super.setInput(input); + // タブにファイル名をセット setPartName(input.getName()); } Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialog.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialog.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialog.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/16 + * + * 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.dialog.root; import java.util.List; 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-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/root/RootEditDialogDomainTab.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/16 + * + * 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.dialog.root; import java.util.Collection; @@ -306,9 +324,13 @@ @Override public void widgetSelected(SelectionEvent e) { - int domainEditIndex = getTableViewer().getTable().getSelectionIndex(); + int index = getTableViewer().getTable().getSelectionIndex(); updateModel(); - enableEditDetailControls(domainEditIndex); + if (index >= 0) { + enableEditDetailControls(index); + } else { + disableEditDetailControls(); + } domainEditor.refreshTable(); } }); @@ -332,9 +354,13 @@ @Override public void widgetSelected(SelectionEvent e) { - int domainEditIndex = getTableViewer().getTable().getSelectionIndex(); + int index = getTableViewer().getTable().getSelectionIndex(); updateModel(); - enableEditDetailControls(domainEditIndex); + if (index >= 0) { + enableEditDetailControls(index); + } else { + disableEditDetailControls(); + } domainEditor.refreshTable(); } }); 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-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/ColumnSelectDialog.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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.dialog.table; import java.util.List; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialog.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialog.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialog.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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.dialog.table; import java.util.HashSet; 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-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogCheckTab.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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.dialog.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-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogColumnTab.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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.dialog.table; // 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-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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.dialog.table; // Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab2.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab2.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogIndexTab2.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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.dialog.table; // Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogRecordTab.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogRecordTab.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/table/TableEditDialogRecordTab.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/18 + * + * 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.dialog.table; // Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/view/ViewEditDialog.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/view/ViewEditDialog.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/dialog/view/ViewEditDialog.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/17 + * + * 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.dialog.view; import org.apache.commons.lang.StringUtils; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/EntityDirectEditManager.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/EntityDirectEditManager.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/EntityDirectEditManager.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/17 + * + * 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.editpart.diagram; import org.eclipse.gef.GraphicalEditPart; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyDirectEditManager.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyDirectEditManager.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyDirectEditManager.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/17 + * + * 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.editpart.diagram; import org.eclipse.gef.GraphicalEditPart; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/MultiLineTextCellEditor.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/MultiLineTextCellEditor.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/MultiLineTextCellEditor.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/17 + * + * 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.tools; import org.eclipse.jface.viewers.TextCellEditor; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/NodeCellEditorLocator.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/NodeCellEditorLocator.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/tools/NodeCellEditorLocator.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/17 + * + * 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.tools; import org.eclipse.draw2d.IFigure; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/AbstractTableEditor.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/AbstractTableEditor.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/AbstractTableEditor.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/16 + * + * 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; import org.eclipse.jface.viewers.TableViewer; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ControlArea.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ControlArea.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/ControlArea.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/16 + * + * 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; import org.eclipse.swt.widgets.Composite; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/helper/TextSelectionAdapter.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/helper/TextSelectionAdapter.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/helper/TextSelectionAdapter.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/16 + * + * 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.helper; import org.eclipse.swt.events.FocusEvent; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/AbstractTab.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/16 + * + * 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.tab; import org.eclipse.swt.SWT; Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/TextEditTab.java =================================================================== --- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/TextEditTab.java 2009-02-17 23:11:20 UTC (rev 2683) +++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/ui/tab/TextEditTab.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/16 + * + * 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.tab; import org.eclipse.swt.SWT; Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/JiemamyProperty.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/JiemamyProperty.java 2009-02-17 23:11:20 UTC (rev 2683) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/JiemamyProperty.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,5 +1,3 @@ -package org.jiemamy; - /* * Copyright 2007-2009 Jiemamy Project and the Others. * Created on 2008/10/13 @@ -18,8 +16,8 @@ * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ +package org.jiemamy; - import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.AttributeModel; import org.jiemamy.model.attribute.ColumnModel; @@ -88,10 +86,7 @@ dataType, /** {@link ColumnModel#getDefaultValue()}で取得できるプロパティ */ - defaultValue, - - /** {@link ColumnModel#getFreeString()}で取得できるプロパティ */ - freeString + defaultValue } /** Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/TargetModel.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/TargetModel.java 2009-02-17 23:11:20 UTC (rev 2683) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/TargetModel.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/10 + * + * 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; import java.lang.annotation.ElementType; Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/LiteralType.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/LiteralType.java 2009-02-17 23:11:20 UTC (rev 2683) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/model/datatype/LiteralType.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/02/12 + * + * 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.model.datatype; /** Modified: zeus/trunk/jiemamy-spec-core/src/test/java/org/jiemamy/test/SampleXmlTest.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/test/java/org/jiemamy/test/SampleXmlTest.java 2009-02-17 23:11:20 UTC (rev 2683) +++ zeus/trunk/jiemamy-spec-core/src/test/java/org/jiemamy/test/SampleXmlTest.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/01/15 + * + * 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.test; import static org.hamcrest.CoreMatchers.is; Modified: zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/Migration.java =================================================================== --- zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/Migration.java 2009-02-17 23:11:20 UTC (rev 2683) +++ zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/Migration.java 2009-02-18 09:40:55 UTC (rev 2684) @@ -1,3 +1,21 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2008/12/01 + * + * 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; /**