NatTable Persistence problem [message #1695194] |
Tue, 12 May 2015 10:53  |
Eclipse User |
|
|
|
Hello,
This is the code from PersistanceUtils
/**
* Parse the persisted property and create a TreeMap<Integer, String> from it.
* Works in conjunction with the {@link PersistenceUtils#mapAsString(Map)}.
*
* @param property from the properties file.
*/
public static Map<Integer, String> parseString(Object property) {
TreeMap<Integer, String> map = new TreeMap<Integer, String>();
if (property != null) {
String value = (String) property;
String[] renamedColumns = value.split("\\|"); //$NON-NLS-1$
for (String token : renamedColumns) {
String[] split = token.split(":"); //$NON-NLS-1$
String index = split[0];
String label = split[1];
map.put(Integer.valueOf(index), label);
}
}
return map;
}
Notice the line:
label = split[1]
This part of the code makes everything after the colon (":") be mapped to label. This way a string of the following format is parsed correctly:
%d:%s (key:value)
However, what if value has colons insid of it as well (value looks like %s:%s),
Part of the value will be missing -> Bug.
Now I need a fast solution for this... What do I do???
I can't seem to override your code...
Thanks!!
|
|
|
|
|
|
|
Re: NatTable Persistence problem [message #1695230 is a reply to message #1695228] |
Tue, 12 May 2015 17:19  |
Eclipse User |
|
|
|
Quote:I encountered painting issues in nattable 1.3 so I downgraded back...
I suggest to search why this happens and fix your setup so it works with 1.3.0. I'm not sure what causes this behavior in your case. But we have fixed really a lot of issues since then and we added quite a lot of features. Staying with 1.0.0 is a risk IMHO.
Quote:Out of curiosity. How did you fix the persistence issue in the new versions?
As I already explained, we introduced a replacement string for colons.
|
|
|
Powered by
FUDForum. Page generated in 0.52645 seconds