/hg/icedtea-web: Plain and main text formatters have more human ...

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Fri Oct 17 10:38:59 UTC 2014


changeset ab6adc052d71 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ab6adc052d71
author: Jiri Vanek <jvanek at redhat.com>
date: Fri Oct 17 12:38:50 2014 +0200

	Plain and main text formatters have more human readable urls


diffstat:

 ChangeLog                                                                                    |  12 ++++++++++
 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/Formatter.java              |   1 +
 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ManFormatter.java           |   5 ----
 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/PlainTextFormatter.java     |   5 ----
 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ReplacingTextFormatter.java |   9 +++++++
 5 files changed, 22 insertions(+), 10 deletions(-)

diffs (79 lines):

diff -r dd6be5e03667 -r ab6adc052d71 ChangeLog
--- a/ChangeLog	Fri Oct 17 11:51:59 2014 +0200
+++ b/ChangeLog	Fri Oct 17 12:38:50 2014 +0200
@@ -1,3 +1,15 @@
+2014-10-17  Jiri Vanek  <jvanek at redhat.com>
+
+	Plain and main text formatters have more human readable urls
+	* netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/Formatter.java: only added formatting line
+	* netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ManFormatter.java:
+	removed overriding getUrl
+	* netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/PlainTextFormatter.java:
+	same
+	* netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ReplacingTextFormatter.java
+	Implemented general getUrl for plaintexts in format readable (url), except 
+	cases where  readable do not exists or is same as url.
+
 2014-10-17  Jiri Vanek  <jvanek at redhat.com>
 
 	Fixed jdk8 javadoc generation error
diff -r dd6be5e03667 -r ab6adc052d71 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/Formatter.java
--- a/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/Formatter.java	Fri Oct 17 11:51:59 2014 +0200
+++ b/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/Formatter.java	Fri Oct 17 12:38:50 2014 +0200
@@ -27,6 +27,7 @@
     public String getTitle(String name);
 
     public String getUrl(String url);
+
     public String getUrl(String url, String  appearence);
     
     public String getOption(String key, String  value);
diff -r dd6be5e03667 -r ab6adc052d71 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ManFormatter.java
--- a/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ManFormatter.java	Fri Oct 17 11:51:59 2014 +0200
+++ b/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ManFormatter.java	Fri Oct 17 12:38:50 2014 +0200
@@ -128,11 +128,6 @@
     }
 
     @Override
-    public String getUrl(String url, String look) {
-        return url;
-    }
-
-    @Override
     public String getSeeAlso(String s) {
         return ".BR " + s + " (1)" + PlainTextFormatter.getLineSeparator();
     }
diff -r dd6be5e03667 -r ab6adc052d71 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/PlainTextFormatter.java
--- a/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/PlainTextFormatter.java	Fri Oct 17 11:51:59 2014 +0200
+++ b/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/PlainTextFormatter.java	Fri Oct 17 12:38:50 2014 +0200
@@ -75,11 +75,6 @@
     }
 
     @Override
-    public String getUrl(String url, String appearence) {
-        return url;
-    }
-
-    @Override
     public String getSeeAlso(String s) {
         return "  * " + s + getNewLine();
     }
diff -r dd6be5e03667 -r ab6adc052d71 netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ReplacingTextFormatter.java
--- a/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ReplacingTextFormatter.java	Fri Oct 17 11:51:59 2014 +0200
+++ b/netx/net/sourceforge/jnlp/util/docprovider/formatters/formatters/ReplacingTextFormatter.java	Fri Oct 17 12:38:50 2014 +0200
@@ -28,6 +28,15 @@
     public String getUrl(String url) {
         return getUrl(url, url);
     }
+
+    @Override
+    public String getUrl(String url, String look) {
+        if (look == null || look.trim().length() == 0 || url.equals(look)) {
+            return url;
+        } else {
+            return look + " (" + url + ")";
+        }
+    }
   
     public String getVersion() {
         if (Boot.version == null) {


More information about the distro-pkg-dev mailing list