Author: mes
Date: 2010-10-28 12:55:57 -0700 (Thu, 28 Oct 2010)
New Revision: 22555
Modified:
core3/work-swing-impl/trunk/pom.xml
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
Log:
sort-of fixed a bug where exceptions were being thrown when task factories were
being checked for tunables
Modified: core3/work-swing-impl/trunk/pom.xml
===================================================================
--- core3/work-swing-impl/trunk/pom.xml 2010-10-28 19:28:52 UTC (rev 22554)
+++ core3/work-swing-impl/trunk/pom.xml 2010-10-28 19:55:57 UTC (rev 22555)
@@ -6,7 +6,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.cytoscape</groupId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha3</version>
</parent>
<properties>
@@ -23,6 +23,14 @@
<packaging>bundle</packaging>
+ <scm>
+
<connection>scm:svn:http://chianti.ucsd.edu/svn/core3/work-swing-impl/trunk</connection>
+
<developerConnection>scm:svn:svn+ssh://grenache.ucsd.edu/cellar/common/svn/core3/work-swing-impl/trunk</developerConnection>
+
<url>http://chianti.ucsd.edu/svn/core3/work-swing-impl/trunk</url>
+ </scm>
+
+
+
<repositories>
<!--
bootstrap for cytoscape dependencies, namely the parent
POM snapshots
@@ -167,7 +175,7 @@
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>work-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
@@ -177,12 +185,12 @@
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>work-spring-hack</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>property-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
@@ -197,7 +205,7 @@
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>integration-test-support</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified:
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
===================================================================
---
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
2010-10-28 19:28:52 UTC (rev 22554)
+++
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
2010-10-28 19:55:57 UTC (rev 22555)
@@ -87,7 +87,10 @@
} else if (handlerMap.containsKey(objectWithTunables))
handlers.addAll(handlerMap.get(objectWithTunables).values());
else
- throw new IllegalArgumentException("No Tunables
and no provided GUI exists for Object yet!");
+ // TODO For task factories throwing an
exception is wrong because
+ // their tunables simply haven't been loaded
yet.
+ //throw new IllegalArgumentException("No
Tunables and no provided GUI exists for Object yet!");
+ logger.warn("No Tunables and no provided GUI
exists for Object yet!");
}
// Sanity check:
@@ -337,21 +340,21 @@
return true;
}
- //get the value(Handle) of the Tunable if its JPanel is
enabled(Dependency) and check if we have to validate the values of tunables
- /**
- * get the <i>value,item,string,state...</i> from the GUI component,
and check with the dependencies, if it can be set as the new one
- *
- * <p><pre>
- * If the <code>TunableValidator</code> interface is implemented by
the class that contains the <code>Tunables</code> :
- * <ul>
- * <li>a validate method has to be applied</li>
- * <li>it checks the conditions that have been declared about the
chosen <code>Tunable(s)</code> </li>
- * <li>if validation fails, it displays an error to the user, and new
values are not set</li>
- * </ul>
- * </pre></p>
- * @return success or not of the <code>TunableValidator</code>
validate method
- */
- final public boolean validateAndWriteBackTunables(Object... proxyObjs)
{
+ //get the value(Handle) of the Tunable if its JPanel is
enabled(Dependency) and check if we have to validate the values of tunables
+ /**
+ * get the <i>value,item,string,state...</i> from the GUI component,
and check with the dependencies, if it can be set as the new one
+ *
+ * <p><pre>
+ * If the <code>TunableValidator</code> interface is implemented by the
class that contains the <code>Tunables</code> :
+ * <ul>
+ * <li>a validate method has to be applied</li>
+ * <li>it checks the conditions that have been declared about the
chosen <code>Tunable(s)</code> </li>
+ * <li>if validation fails, it displays an error to the user, and new
values are not set</li>
+ * </ul>
+ * </pre></p>
+ * @return success or not of the <code>TunableValidator</code> validate
method
+ */
+ final public boolean validateAndWriteBackTunables(Object... proxyObjs) {
final Object objectsWithTunables[] =
convertSpringProxyObjs(proxyObjs);
// Update handler list:
@@ -373,11 +376,15 @@
} else if (handlerMap.containsKey(objectWithTunables))
handlers.addAll(handlerMap.get(objectWithTunables).values());
else
- throw new IllegalArgumentException("No Tunables
and no provided GUI exists for Object yet!");
+ // TODO For task factories throwing an
exception is wrong because
+ // their tunables simply haven't been loaded
yet.
+ //throw new IllegalArgumentException("No
Tunables and no provided GUI exists for Object yet!");
+ logger.warn("No Tunables and no provided GUI
exists for Object yet!");
}
- for (final GUITunableHandler h : handlers)
- h.handleDependents();
- return validateTunableInput();
- }
+ for (final GUITunableHandler h : handlers)
+ h.handleDependents();
+
+ return validateTunableInput();
+ }
}
--
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.