Author: ruschein
Date: 2010-09-28 10:37:58 -0700 (Tue, 28 Sep 2010)
New Revision: 22087
Modified:
cytoscape/trunk/coreplugins/browser/src/main/java/browser/DataEditAction.java
Log:
Fixed a showstopper bug that prevented editing of lists.
Modified:
cytoscape/trunk/coreplugins/browser/src/main/java/browser/DataEditAction.java
===================================================================
---
cytoscape/trunk/coreplugins/browser/src/main/java/browser/DataEditAction.java
2010-09-28 17:34:03 UTC (rev 22086)
+++
cytoscape/trunk/coreplugins/browser/src/main/java/browser/DataEditAction.java
2010-09-28 17:37:58 UTC (rev 22087)
@@ -357,19 +357,25 @@
}
final String escapedString = replaceCStyleEscapes(newValueStr);
- final List origList = attrs.getListAttribute(id, attrName);
+ final int elementType = attrs.getListElementType(attrName);
List newList = null;
- if (origList.isEmpty() || origList.get(0).getClass() ==
String.class)
+ switch (elementType) {
+ case CyAttributes.TYPE_STRING:
newList = parseStringListValue(escapedString);
- else if (origList.get(0).getClass() == Double.class)
+ break;
+ case CyAttributes.TYPE_FLOATING:
newList = parseDoubleListValue(escapedString);
- else if (origList.get(0).getClass() == Integer.class)
+ break;
+ case CyAttributes.TYPE_INTEGER:
newList = parseIntegerListValue(escapedString);
- else if (origList.get(0).getClass() == Boolean.class)
+ break;
+ case CyAttributes.TYPE_BOOLEAN:
newList = parseBooleanListValue(escapedString);
- else
+ break;
+ default:
throw new ClassCastException("can't determined List
type!");
+ }
if (newList == null) {
objectAndEditString = new
ValidatedObjectAndEditString(null, newValueStr, "#ERROR");
--
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.