Revision: 14896
http://gate.svn.sourceforge.net/gate/?rev=14896&view=rev
Author: markagreenwood
Date: 2012-01-05 19:35:08 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
switch to using the string based version comparator, that can handle snapshots,
for plugin version information
Modified Paths:
--------------
gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java
gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
Modified: gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java 2012-01-05
18:20:33 UTC (rev 14895)
+++ gate/trunk/src/gate/gui/creole/manager/CreolePlugin.java 2012-01-05
19:35:08 UTC (rev 14896)
@@ -31,11 +31,11 @@
protected URL downloadURL, url;
- protected double version;
+ protected String version;
private transient String name;
- protected transient double installed;
+ protected transient String installed;
protected transient File dir;
@@ -100,7 +100,7 @@
if(name == null || version == null) return null;
- return new CreolePlugin(name, Double.parseDouble(version), new URL(
+ return new CreolePlugin(name, version, new URL(
creoleURL, "creole.zip"), desc, gateMin, gateMax);
}
@@ -112,7 +112,7 @@
return name;
}
- public CreolePlugin(String id, double version, URL downloadURL,
+ public CreolePlugin(String id, String version, URL downloadURL,
String description, String gateMin, String gateMax) {
this.id = id;
this.version = version;
Modified: gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
2012-01-05 18:20:33 UTC (rev 14895)
+++ gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
2012-01-05 19:35:08 UTC (rev 14896)
@@ -37,6 +37,7 @@
import gate.swing.XJTable;
import gate.util.Files;
import gate.util.OptionsMap;
+import gate.util.VersionComparator;
import java.awt.BorderLayout;
import java.awt.Component;
@@ -191,7 +192,7 @@
// reset the info ready for a reload
availableModel.data.clear();
updatesModel.data.clear();
-
+
// go through all the known update sites and get all the plugins they
// are making available, skipping those sites which are marked as
// invalid for some reason
@@ -216,7 +217,7 @@
int index = availableModel.data.indexOf(plugin);
if(index != -1) {
CreolePlugin ap = availableModel.data.remove(index);
- if(ap.version > plugin.version) {
+ if(VersionComparator.compareVersions(ap.version,
plugin.version) > 0){
ap.installed = plugin.version;
ap.dir = f;
updatesModel.data.add(ap);
@@ -1083,9 +1084,9 @@
case 1:
return String.class;
case 2:
- return Double.class;
+ return String.class;
case 3:
- return Double.class;
+ return String.class;
default:
return null;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs