Author: linus
Date: 2011-05-25 10:06:12-0700
New Revision: 19511
Modified:
trunk/src/argouml-app/src/org/argouml/application/helpers/ApplicationVersion.java
trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java
trunk/src/argouml-app/src/org/argouml/ui/HelpBox.java
Log:
Refactored to solve the problem with dependency cycles.
Modified: trunk/src/argouml-app/src/org/argouml/application/helpers/ApplicationVersion.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/application/helpers/ApplicationVersion.java?view=diff&pathrev=19511&r1=19510&r2=19511
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/application/helpers/ApplicationVersion.java (original)
+++ trunk/src/argouml-app/src/org/argouml/application/helpers/ApplicationVersion.java 2011-05-25 10:06:12-0700
@@ -38,27 +38,14 @@
package org.argouml.application.helpers;
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.apache.log4j.Logger;
-import org.argouml.cognitive.Translator;
/**
- * Receives the version of the application at initialisation time.
- * Also knows about website locations that depend on the version of ArgoUML.
+ * Receives the version of the application at initialization time.
*
* @author Michiel
*/
public class ApplicationVersion {
/**
- * Logger.
- */
- private static final Logger LOG = Logger.getLogger(ApplicationVersion.class);
-
- /**
* Version number.
*/
private static String version;
@@ -74,43 +61,11 @@
}
/**
- * Retrieve the online HTML manual of ArgoUML for a critic.
- * You need to append the critic class-name.
- * This syntax is synchronized with:
- * <ol>
- * <li>Tags in the manual.
- * <li>Name of the ArgoUML site.
- * <li>How the manual is deployed on the site.
- * </ol>
- * so this must be updated when any of these change.
- *
- * @return the URL
- */
- public static String getManualForCritic() {
- return Translator.localize("tab.help.path.manualcritic")
- + "manual-"
- + stableVersion
- + "-single/argomanual.html#critics.";
- }
-
- /**
- * Retrieve the URL of the online manual of ArgoUML.
- *
- * @return the URL
- */
- public static String getOnlineManual() {
-
- return Translator.localize("tab.help.path.manual")
- + "manual-" + stableVersion + "/";
- }
-
- /**
- * Retrieve the URL of the location for online support for ArgoUML.
- *
- * @return the URL
+ * @return the version number of the stable version
+ * for pointers to documentation.
*/
- public static String getOnlineSupport() {
- return Translator.localize("tab.help.path.support");
+ public static String getStableVersion() {
+ return stableVersion;
}
/**
Modified: trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java?view=diff&pathrev=19511&r1=19510&r2=19511
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java 2011-05-25 10:06:12-0700
@@ -172,8 +172,12 @@
public final String defaultMoreInfoURL() {
String clsName = getClass().getName();
clsName = clsName.substring(clsName.lastIndexOf(".") + 1);
- return ApplicationVersion.getManualForCritic()
- + clsName;
+ String singleVersionURL =
+ Translator.localize("tab.help.path.manualcritic")
+ + "manual-"
+ + ApplicationVersion.getStableVersion()
+ + "-single/argomanual.html";
+ return singleVersionURL + "#critics." + clsName;
}
////////////////////////////////////////////////////////////////
@@ -756,7 +760,7 @@
* some information you may need to override this method. <p>
*
* TODO: I would like a better default action, but goals
- * are typed and their values must be interperted by critics. They
+ * are typed and their values must be interpreted by critics. They
* are not as generic as the DecisionModel.
*
* @param dsgr the designer
Modified: trunk/src/argouml-app/src/org/argouml/ui/HelpBox.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/HelpBox.java?view=diff&pathrev=19511&r1=19510&r2=19511
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/HelpBox.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/HelpBox.java 2011-05-25 10:06:12-0700
@@ -76,12 +76,20 @@
/**
* The names and URLs for the pages.
*/
- private String pages[][] = {{Translator.localize("tab.help.manual"),
- ApplicationVersion.getOnlineManual() ,
- Translator.localize("tab.help.tip.manual")},
- {Translator.localize("tab.help.support"),
- ApplicationVersion.getOnlineSupport(),
- Translator.localize("tab.help.tip.support") }};
+ private String pages[][] = {
+ {
+ Translator.localize("tab.help.manual"),
+ (Translator.localize("tab.help.path.manual")
+ + "manual-" + ApplicationVersion.getStableVersion()
+ + "/"),
+ Translator.localize("tab.help.tip.manual")
+ },
+ {
+ Translator.localize("tab.help.support"),
+ Translator.localize("tab.help.path.support"),
+ Translator.localize("tab.help.tip.support")
+ }
+ };
/**
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2747913
To unsubscribe from this discussion, e-mail: [[email protected]].
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.