Author: pwang
Date: 2009-12-09 16:39:18 -0800 (Wed, 09 Dec 2009)
New Revision: 18713
Modified:
cytoscape/trunk/src/cytoscape/plugin/DownloadableInfo.java
Log:
Bug fix: If current version of Cytosape is lower than the latest version, some
plugin are marked out-of-date incorrectly
Modified: cytoscape/trunk/src/cytoscape/plugin/DownloadableInfo.java
===================================================================
--- cytoscape/trunk/src/cytoscape/plugin/DownloadableInfo.java 2009-12-10
00:31:33 UTC (rev 18712)
+++ cytoscape/trunk/src/cytoscape/plugin/DownloadableInfo.java 2009-12-10
00:39:18 UTC (rev 18713)
@@ -297,30 +297,38 @@
/**
* @return Compatible Cytocape version of this object.
- *
- * BUG: THIS IS WRONG, I need to be getting the version that MATCHES the
current version
- * not the one that is newest!!
- *
+ *
+ * BUG: THIS IS WRONG, I need to be getting the version that MATCHES
the current version
+ * not the one that is newest!!
+ *
*/
public String getCytoscapeVersion() {
+
+ //Bug fix, if currentVersion matches one of compatible versions
of Cytosape, just return current version
+ for (String v : this.compatibleCyVersions) {
+ if (isCytoscapeVersionCurrent(v)){
+ return v;
+ }
+ }
+
String currentPluginVersion = null;
- String all = "";
- for (String v : this.compatibleCyVersions) {
- all += v + " ";
+ String all = "";
+ for (String v : this.compatibleCyVersions) {
+ all += v + " ";
- if (currentPluginVersion != null) {
+ if (currentPluginVersion != null) {
currentPluginVersion = getNewerVersion(v,
currentPluginVersion);
- // compare to cytoscape version
- if ( isCytoscapeVersionCurrent(currentPluginVersion) )
- return currentPluginVersion;
- }
- else {
+ // compare to cytoscape version
+ if (
isCytoscapeVersionCurrent(currentPluginVersion) )
+ return currentPluginVersion;
+ }
+ else {
currentPluginVersion = v;
- }
- }
+ }
+ }
- logger.debug(getName() +": Compatible: " + all + " cyvers: " +
currentPluginVersion
- + "(cyversion " + cytoscape.CytoscapeVersion.version +")");
+ logger.debug(getName() +": Compatible: " + all + " cyvers: " +
currentPluginVersion
+ + "(cyversion " +
cytoscape.CytoscapeVersion.version +")");
return currentPluginVersion;
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.