svnno****@sourc*****
svnno****@sourc*****
2009年 4月 18日 (土) 16:19:08 JST
Revision: 3309 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3309 Author: ewigkeit1204 Date: 2009-04-18 16:19:08 +0900 (Sat, 18 Apr 2009) Log Message: ----------- [ECL-15] コマンドクラスのリソース外部化 Modified Paths: -------------- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java Added Paths: ----------- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/Messages.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/ hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages.properties hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages_ja.properties -------------- next part -------------- Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java 2009-04-18 06:58:00 UTC (rev 3308) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/CreateConnectionCommand.java 2009-04-18 07:19:08 UTC (rev 3309) @@ -96,25 +96,25 @@ // Viewとはコネクションが貼れない if (source.unwrap() instanceof ViewModel || target.unwrap() instanceof ViewModel) { - LogUtil.log(JiemamyUIPlugin.getDefault(), "attempt to connect with VIEW"); // RESOURCE + LogUtil.log(JiemamyUIPlugin.getDefault(), Messages.CreateConnectionCommand_log_canExecute_01); return false; } // 現状、付箋とはコネクションが貼れない if (source.unwrap() instanceof StickyModel || target.unwrap() instanceof StickyModel) { - LogUtil.log(JiemamyUIPlugin.getDefault(), "attempt to connect with STICKY"); // RESOURCE + LogUtil.log(JiemamyUIPlugin.getDefault(), Messages.CreateConnectionCommand_log_canExecute_02); return false; } // カラムが1つもないテーブルからは外部キーが貼れない if (TableUtil.getColumns((TableModel) source.unwrap()).size() < 1) { - LogUtil.log(JiemamyUIPlugin.getDefault(), "attempt to connect from TABLE without columns"); // RESOURCE + LogUtil.log(JiemamyUIPlugin.getDefault(), Messages.CreateConnectionCommand_log_canExecute_03); return false; } // ローカルキーが1つもないテーブルへは外部キーが貼れない if (getKey((TableModel) target.unwrap()) == null) { - LogUtil.log(JiemamyUIPlugin.getDefault(), "attempt to connect to TABLE without local keys"); // RESOURCE + LogUtil.log(JiemamyUIPlugin.getDefault(), Messages.CreateConnectionCommand_log_canExecute_04); return false; } @@ -124,7 +124,7 @@ // // Collection<EntityModel> refs = EntityUtil.getReferenceEntities(target.unwrap(), true); // if (refs.contains(source.unwrap())) { -// LogUtil.log(JiemamyPlugin.getDefault(), "attempt to create cyclic connection"); // RESOURCE +// LogUtil.log(JiemamyPlugin.getDefault(), Messages.CreateConnectionCommand_log_canExecute_05); // return false; // } // } Added: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/Messages.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/Messages.java (rev 0) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/Messages.java 2009-04-18 07:19:08 UTC (rev 3309) @@ -0,0 +1,61 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on 2009/04/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.command; + +import java.util.Locale; + +import org.eclipse.osgi.util.NLS; + +/** + * コマンドメッセージリソースクラス。 + * + * @author Keisuke.K + */ +public class Messages extends NLS { + + /** canExecute() ログ01 */ + public static String CreateConnectionCommand_log_canExecute_01; + + /** canExecute() ログ02 */ + public static String CreateConnectionCommand_log_canExecute_02; + + /** canExecute() ログ03 */ + public static String CreateConnectionCommand_log_canExecute_03; + + /** canExecute() ログ04 */ + public static String CreateConnectionCommand_log_canExecute_04; + + /** canExecute() ログ05 */ + public static String CreateConnectionCommand_log_canExecute_05; + + private static final String BUNDLE_NAME = Messages.class.getName().toLowerCase(Locale.US); + + static { + reloadMessages(); + } + + + /** + * load message values from bundle file + */ + private static void reloadMessages() { + initializeMessages(BUNDLE_NAME, Messages.class); + } + +} Property changes on: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/command/Messages.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages.properties =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages.properties (rev 0) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages.properties 2009-04-18 07:19:08 UTC (rev 3309) @@ -0,0 +1,21 @@ +############################################################################### +# Copyright 2007-2009 Jiemamy Project and the Others. +# +# 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. +############################################################################### + +CreateConnectionCommand_log_canExecute_01 = Cannot connect with VIEW +CreateConnectionCommand_log_canExecute_02 = Cannot connect with STICKY +CreateConnectionCommand_log_canExecute_03 = Cannot connect from TABLE without columns +CreateConnectionCommand_log_canExecute_04 = Cannot connect to TABLE without local keys +CreateConnectionCommand_log_canExecute_05 = Cannot create cyclic connection Property changes on: hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages.properties ___________________________________________________________________ Added: svn:mime-type + text/plain Added: hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages_ja.properties =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages_ja.properties (rev 0) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages_ja.properties 2009-04-18 07:19:08 UTC (rev 3309) @@ -0,0 +1,21 @@ +############################################################################### +# Copyright 2007-2009 Jiemamy Project and the Others. +# +# 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. +############################################################################### + +CreateConnectionCommand_log_canExecute_01 = \u30d3\u30e5\u30fc\u3068\u63a5\u7d9a\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093 +CreateConnectionCommand_log_canExecute_02 = \u4ed8\u7b8b\u3068\u63a5\u7d9a\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093 +CreateConnectionCommand_log_canExecute_03 = \u30ab\u30e9\u30e0\u3092\u6301\u305f\u306a\u3044\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u63a5\u7d9a\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093 +CreateConnectionCommand_log_canExecute_04 = \u30ed\u30fc\u30ab\u30eb\u30ad\u30fc\u304c\u306a\u3044\u30c6\u30fc\u30d6\u30eb\u3078\u63a5\u7d9a\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093 +CreateConnectionCommand_log_canExecute_05 = \u5faa\u74b0\u53c2\u7167\u63a5\u7d9a\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093 Property changes on: hestia/trunk/org.jiemamy.eclipse.ui/src/main/resources/org/jiemamy/eclipse/editor/command/messages_ja.properties ___________________________________________________________________ Added: svn:mime-type + text/plain