svn commit: r12967 - trunk/src_new/org/argouml: i18n language/java/cognitive/critics uml/cognitive/critics

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2007-07-03 04:58:21-0700
New Revision: 12967

Added:
   trunk/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java   (contents, props changed)
      - copied, changed from r12966, /trunk/src_new/org/argouml/uml/cognitive/critics/CrReservedNameJava.java
Removed:
   trunk/src_new/org/argouml/uml/cognitive/critics/CrReservedNameJava.java
Modified:
   trunk/src_new/org/argouml/i18n/critics.properties
   trunk/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java

Log:
Moved a Java related critic to the correct package. Added strings for it. Since I could not fully test now, not yet enabled.

Modified: trunk/src_new/org/argouml/i18n/critics.properties
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/i18n/critics.properties?view=diff&rev=12967&p1=trunk/src_new/org/argouml/i18n/critics.properties&p2=trunk/src_new/org/argouml/i18n/critics.properties&r1=12966&r2=12967
==============================================================================
--- trunk/src_new/org/argouml/i18n/critics.properties	(original)
+++ trunk/src_new/org/argouml/i18n/critics.properties	2007-07-03 04:58:21-0700
@@ -22,7 +22,7 @@
 # CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 # UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-# Created from UMLCognitiveResourceBundle.java
+# Originally created from UMLCognitiveResourceBundle.java
 #
 # The keys are generated from the class names of the classes that use them.
 #
@@ -633,6 +633,14 @@
         the Properties tab to give it a different name.
 critics.CrReservedName-head = Change <ocl>self</ocl> to a Non-Reserved Word
 critics.CrReservedName-ins = Change the name to something different.
+critics.CrReservedNameJava-desc = \"<ocl>self</ocl>\" is a reserved word or very \
+        close to one.  The names of model elements must not conflict with \
+        reserved words of the Java programming language.\n\nUsing legal names \
+        is needed to generate compilable code. \n\nTo address this, use the \
+        \"Next>\" button, or manually select the highlighted element and use \
+        the Properties tab to give it a different name.
+critics.CrReservedNameJava-head = Change <ocl>self</ocl> to a Non-Reserved Word
+critics.CrReservedNameJava-ins = Change the name to something different.
 critics.CrReturnWithoutCall-desc = Every return-action requires a call- or \
         send-action,\n but this Link has no corresponding call- or send-action.
 critics.CrReturnWithoutCall-head = Missing Call(Send)-Action

Copied: trunk/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java (from r12966, /trunk/src_new/org/argouml/uml/cognitive/critics/CrReservedNameJava.java)
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java?view=diff&rev=12967&p1=/trunk/src_new/org/argouml/uml/cognitive/critics/CrReservedNameJava.java&p2=trunk/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java&r1=12966&r2=12967
==============================================================================
--- /trunk/src_new/org/argouml/uml/cognitive/critics/CrReservedNameJava.java	(original)
+++ trunk/src_new/org/argouml/language/java/cognitive/critics/CrReservedNameJava.java	2007-07-03 04:58:21-0700
@@ -22,11 +22,13 @@
 // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 
-package org.argouml.uml.cognitive.critics;
+package org.argouml.language.java.cognitive.critics;
 
 import java.util.ArrayList;
 import java.util.List;
 
+import org.argouml.uml.cognitive.critics.CrReservedName;
+
 /**
  * Critic to check whether the name of a ModelElement in the Model resembles or
  * matches a Java keyword.

Modified: trunk/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java?view=diff&rev=12967&p1=trunk/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java&p2=trunk/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java&r1=12966&r2=12967
==============================================================================
--- trunk/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java	(original)
+++ trunk/src_new/org/argouml/language/java/cognitive/critics/InitJavaCritics.java	2007-07-03 04:58:21-0700
@@ -34,7 +34,9 @@
 import org.argouml.model.Model;
 
 /**
- * Initialise the Java related critics.
+ * Initialise the Java related critics. <p>
+ * 
+ * TODO: Test and then enable the CrReservedNameJava.
  *
  * @author Michiel
  */
@@ -42,6 +44,7 @@
 
     private static Critic crMultiInherit = new CrMultipleInheritance();
     private static Critic crMultiRealization = new CrMultipleRealization();
+    //private static Critic crReservedNameJava = new CrReservedNameJava();
 
     public List<GUISettingsTabInterface> getProjectSettingsTabs() {
         return Collections.emptyList();
@@ -56,6 +59,7 @@
         Object interfaceCls = Model.getMetaTypes().getInterface();
         Agency.register(crMultiInherit, classCls);
         Agency.register(crMultiRealization, interfaceCls);
+        //Agency.register(crReservedNameJava, interfaceCls);
     }
 
 }

Removed: trunk/src_new/org/argouml/uml/cognitive/critics/CrReservedNameJava.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/cognitive/critics/CrReservedNameJava.java?view=auto&rev=12966
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.