svn commit: r17300 - trunk/src/argouml-app/src/org/argouml: i18n profile/internal
Michiel van der Wulp <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mvw
Date: 2009-08-30 02:45:41-0700
New Revision: 17300
Added:
trunk/src/argouml-app/src/org/argouml/i18n/wfr.properties (contents, props changed)
Modified:
trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java
Log:
I18n for the WFR critics.
Added: trunk/src/argouml-app/src/org/argouml/i18n/wfr.properties
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/i18n/wfr.properties?view=markup&pathrev=17300
==============================================================================
--- (empty file)
+++ trunk/src/argouml-app/src/org/argouml/i18n/wfr.properties 2009-08-30 02:45:41-0700
@@ -0,0 +1,68 @@
+# $Id: $
+# Copyright (c) 2009 The Regents of the University of California. All
+# Rights Reserved. Permission to use, copy, modify, and distribute this
+# software and its documentation without fee, and without a written
+# agreement is hereby granted, provided that the above copyright notice
+# and this paragraph appear in all copies. This software program and
+# documentation are copyrighted by The Regents of the University of
+# California. The software program and documentation are supplied "AS
+# IS", without any accompanying services from The Regents. The Regents
+# does not warrant that the operation of the program will be
+# uninterrupted or error-free. The end-user understands that the program
+# was developed for research purposes and is advised not to rely
+# exclusively on the program for any reason. IN NO EVENT SHALL THE
+# UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+# THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+# PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+# CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+# UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+#
+#
+# WFR = Well Formedness Rule
+#
+# Format of the keys:
+# - UML142 = taken from the UML 1.4.2 standard.
+# - UML element name
+# - The number refers to the sequence number of the WFR for the given
+# UML element.
+#- head for the headline, desc for the description
+#
+# Keys in alphabetical sequence !
+#
+
+
+wfr.UML142.ActionState.3-head = Transitions originating \
+ from an action state have no trigger event.
+wfr.UML142.ActionState.3-desc = As soon as the incoming \
+ transition of an ActionState is triggered, its entry action starts \
+ executing. Once the entry action has finished executing, the \
+ action is considered complete. "When the action is complete, \
+ then the outgoing transition is enabled. \n\n\
+ Hence the outgoing transition shall not have a trigger event.\n\n\
+ To address this, remove the trigger event.
+
+wfr.UML142.AssociationClass.1-head = The names of the \
+ AssociationEnds and the StructuralFeatures do not overlap.
+wfr.UML142.AssociationClass.2-head = An AssociationClass \
+ cannot be defined between itself and something else.
+
+wfr.UML142.Classifier.5-head = The name of an opposite \
+ AssociationEnd may not be the same as the name of an Attribute \
+ or a ModelElement contained in the Classifier.
+
+wfr.UML142.DataType.1-head = A DataType can only contain \
+ Operations, which all must be queries.
+
+wfr.UML142.GeneralizableElement.1-head = A root cannot have any \
+ Generalizations.
+wfr.UML142.GeneralizableElement.4-head = The parent must be \
+included in the Namespace of the GeneralizableElement.
+
+wfr.UML142.Namespace.2-head = All Associations must have \
+ a unique combination of name and associated Classifiers in \
+ the Namespace.
Modified: trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java?view=diff&pathrev=17300&r1=17299&r2=17300
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java (original)
+++ trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java 2009-08-30 02:45:41-0700
@@ -32,6 +32,7 @@
import org.argouml.cognitive.Critic;
import org.argouml.cognitive.ToDoItem;
+import org.argouml.cognitive.Translator;
import org.argouml.model.Model;
import org.argouml.profile.CoreProfileReference;
import org.argouml.profile.DefaultTypeStrategy;
@@ -178,8 +179,8 @@
+ "forAll( ar | self.allFeatures->"
+ "forAll( f | f.oclIsKindOf(StructuralFeature) "
+ "implies ar.name <> f.name ))",
- "The names of the AssociationEnds and "
- + "the StructuralFeatures do not overlap.", null,
+ Translator.localize("wfr.UML142.AssociationClass.1-head"),
+ null,
ToDoItem.HIGH_PRIORITY, null, null, "http://www.uml.org/"));
} catch (InvalidOclException e) {
e.printStackTrace();
@@ -191,9 +192,8 @@
critics.add(new CrOCL("context AssociationClass inv:"
+ "self.allConnections->"
+ "forAll(ar | ar.participant <> self)",
-
- "An AssociationClass cannot be defined "
- + "between itself and something else.", null,
+ Translator.localize("wfr.UML142.AssociationClass.2-head"),
+ null,
ToDoItem.HIGH_PRIORITY, null, null, "http://www.uml.org/"));
} catch (InvalidOclException e) {
e.printStackTrace();
@@ -225,9 +225,8 @@
+ "forAll( o | not self.allAttributes->"
+ "union (self.allContents)->"
+ "collect ( q | q.name )->includes (o.name) )",
- "The name of an opposite AssociationEnd may not be the same "
- + "as the name of an Attribute or a ModelElement contained "
- + "in the Classifier.", null,
+ Translator.localize("critics.UML142.WFR.Classifier.5-head"),
+ null,
ToDoItem.HIGH_PRIORITY, null, null, "http://www.uml.org/"));
} catch (InvalidOclException e) {
e.printStackTrace();
@@ -239,8 +238,8 @@
critics.add(new CrOCL("context DataType inv:"
+ "self.allFeatures->forAll(f | f.oclIsKindOf(Operation)"
+ " and f.oclAsType(Operation).isQuery)",
- "A DataType can only contain Operations, "
- + "which all must be queries.", null,
+ Translator.localize("wfr.UML142.DataType.1-head"),
+ null,
ToDoItem.HIGH_PRIORITY, null, null, "http://www.uml.org/"));
} catch (InvalidOclException e) {
e.printStackTrace();
@@ -251,7 +250,8 @@
try {
critics.add(new CrOCL("context GeneralizableElement inv:"
+ "self.isRoot implies self.generalization->isEmpty",
- "A root cannot have any Generalizations.", null,
+ Translator.localize("wfr.UML142.GeneralizableElement.1-head"),
+ null,
ToDoItem.HIGH_PRIORITY, null, null, "http://www.uml.org/"));
} catch (InvalidOclException e) {
e.printStackTrace();
@@ -263,8 +263,8 @@
+ "self.generalization->"
+ "forAll(g |self.namespace.allContents->"
+ "includes(g.parent) )",
- "The parent must be included in the Namespace of"
- + " the GeneralizableElement.", null,
+ Translator.localize("wfr.UML142.GeneralizableElement.4-head"),
+ null,
ToDoItem.HIGH_PRIORITY, null, null, "http://www.uml.org/"));
} catch (InvalidOclException e) {
e.printStackTrace();
@@ -279,8 +279,7 @@
+ "forAll(a1, a2 |a1.name = a2.name and "
+ "a1.connection.participant = a2.connection.participant"
+ " implies a1 = a2)",
- "All Associations must have a unique combination of name "
- + "and associated Classifiers in the Namespace.",
+ Translator.localize("wfr.UML142.Namespace.2-head"),
null, ToDoItem.HIGH_PRIORITY, null, null,
"http://www.uml.org/"));
} catch (InvalidOclException e) {
@@ -293,14 +292,8 @@
try {
critics.add(new CrOCL("context ActionState inv:"
+ "self.outgoing->forAll(t | t.trigger->size = 0)",
- "Transitions originating from an action state have no trigger event.",
- "As soon as the incoming transition of an ActionState is triggered, " +
- "its entry action starts executing. Once the entry action has " +
- "finished executing, the action is considered complete. " +
- "When the action is complete, then the outgoing transition " +
- "is enabled. \n\n" +
- "Hence the outgoing transition shall not have a trigger event.\n\n" +
- "To address this, remove the trigger event.",
+ Translator.localize("critics.UML142.WFR.ActionState.3-head"),
+ Translator.localize("critics.UML142.WFR.ActionState.3-desc"),
ToDoItem.HIGH_PRIORITY, null, null,
"http://www.uml.org/"));
} catch (InvalidOclException e) {
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2388639
To unsubscribe from this discussion, e-mail: [[email protected]].