svn commit: r16388 - trunk/src/argouml-app/src/org/argouml/notation/Notation.java
Tom Morris <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris
Date: 2008-12-19 10:02:07-0800
New Revision: 16388
Modified:
trunk/src/argouml-app/src/org/argouml/notation/Notation.java
Log:
Move some magic strings to constants
Modified: trunk/src/argouml-app/src/org/argouml/notation/Notation.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/Notation.java?view=diff&pathrev=16388&r1=16387&r2=16388
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/Notation.java (original)
+++ trunk/src/argouml-app/src/org/argouml/notation/Notation.java 2008-12-19 10:02:07-0800
@@ -47,20 +47,28 @@
*/
public final class Notation implements PropertyChangeListener {
+ private static final Logger LOG = Logger.getLogger(Notation.class);
+
+ // TODO: Do we have any potential consumers of the unversioned name outside
+ // of the notation subsystem?
+ private static final String DEFAULT_NOTATION_NAME = "UML";
+
+ private static final String DEFAULT_NOTATION_VERSION = "1.4";
+
/**
- * Define a static log4j category variable for ArgoUML notation.
+ * Default notation with both base name and version (e.g. "UML 1.4")
*/
- private static final Logger LOG =
- Logger.getLogger(Notation.class);
-
+ public static final String DEFAULT_NOTATION = DEFAULT_NOTATION_NAME + " "
+ + DEFAULT_NOTATION_VERSION;
+
/**
* The name of the default ArgoUML notation. This notation is
* part of ArgoUML core distribution.
*/
private static NotationName notationArgo =
makeNotation(
- "UML",
- "1.4",
+ DEFAULT_NOTATION_NAME,
+ DEFAULT_NOTATION_VERSION,
ResourceLoaderWrapper.lookupIconResource("UmlNotation"));
/*
@@ -211,7 +219,7 @@
// This is needed for the case when the default notation is
// not loaded at this point.
if (n == null) {
- n = NotationNameImpl.findNotation("UML 1.4");
+ n = NotationNameImpl.findNotation(DEFAULT_NOTATION);
}
LOG.debug("default notation is " + n.getConfigurationValue());
return n;
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=987677
To unsubscribe from this discussion, e-mail: [[email protected]].