Revision: 15255
          http://gate.svn.sourceforge.net/gate/?rev=15255&view=rev
Author:   markagreenwood
Date:     2012-01-29 17:24:52 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
added support for a HELPURL attribute when listing new plugins

Modified Paths:
--------------
    gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java

Modified: gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java    2012-01-29 
16:51:06 UTC (rev 15254)
+++ gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java    2012-01-29 
17:24:52 UTC (rev 15255)
@@ -29,7 +29,7 @@
 
   protected String id, description, gateMin, gateMax;
 
-  protected URL downloadURL, url;
+  protected URL downloadURL, url, helpURL;
 
   protected String version;
 
@@ -97,11 +97,20 @@
     String desc = root.getAttributeValue("DESCRIPTION");
     String gateMin = root.getAttributeValue("GATE-MIN");
     String gateMax = root.getAttributeValue("GATE-MAX");
+    String help = root.getAttributeValue("HELPURL");
 
+    URL helpURL = null;
+    try {
+      helpURL = new URL(creoleURL, help);
+    }
+    catch (Exception e) {
+      //ignore all exceptions and just use null;
+    }
+    
     if(name == null || version == null) return null;
 
     return new CreolePlugin(name, version, new URL(
-            creoleURL, "creole.zip"), desc, gateMin, gateMax);
+            creoleURL, "creole.zip"), desc, helpURL, gateMin, gateMax);
   }
 
   public String getName() {
@@ -112,14 +121,15 @@
     return name;
   }
 
-  public CreolePlugin(String id, String version, URL downloadURL,
-          String description, String gateMin, String gateMax) {
+  public CreolePlugin(String id, String version, URL downloadURL, 
+          String description, URL helpURL, String gateMin, String gateMax) {
     this.id = id;
     this.version = version;
     this.downloadURL = downloadURL;
     this.description = description;
     this.gateMin = gateMin;
     this.gateMax = gateMax;
+    this.helpURL = helpURL;
 
     compatible = VersionComparator.isCompatible(this.gateMin, this.gateMax);
   }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to