diff options
author | Uwe Stieber | 2011-11-24 17:47:09 +0000 |
---|---|---|
committer | Uwe Stieber | 2011-11-24 17:47:09 +0000 |
commit | b6a18b4dc17dbfeb2cd526dd97d24c00e0a0d7ad (patch) | |
tree | 1dbdcd479e1a6349d85ce65e4ec116171f298aa8 /target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence | |
parent | 32c5289b341814cba4a11fa17f6abdff7c12d0b2 (diff) | |
download | org.eclipse.tcf-b6a18b4dc17dbfeb2cd526dd97d24c00e0a0d7ad.tar.gz org.eclipse.tcf-b6a18b4dc17dbfeb2cd526dd97d24c00e0a0d7ad.tar.xz org.eclipse.tcf-b6a18b4dc17dbfeb2cd526dd97d24c00e0a0d7ad.zip |
Target Explorer: Add extensible model node factory and implement type correct data node recreation from the persistence storage
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence')
2 files changed, 14 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistable.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistable.java index d93f862fd..17368c32a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistable.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistable.java @@ -41,6 +41,18 @@ public interface IPersistable { public URI getURI(Object data);
/**
+ * Returns the interface type name to use for recreating the object from the
+ * persisted object representation.
+ * <p>
+ * <b>Note:</b> The returned string is expected in the format <code>"<bundleId>:<full qualified interface type name>"</code>.
+ * If the bundle id is not present, it is very likely that the object recreation will fail with a {@link ClassNotFoundException}.
+ *
+ * @param data The data object. Must not be <code>null</code>.
+ * @return The interface type or <code>null</code>.
+ */
+ public String getInterfaceTypeName(Object data);
+
+ /**
* Exports the given data object to an external representation.
* <p>
* As a general guide line, it is expected that the external representation contains only base
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java index d18465c6d..8522891c2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java @@ -224,7 +224,8 @@ public class PropertiesFilePersistenceDelegate extends AbstractPersistenceDelega while (line != null) {
Matcher matcher = SECTION.matcher(line);
if (matcher.matches()) {
- currentSection = matcher.group(1).toLowerCase();
+ // Section names are case-sensitive too
+ currentSection = matcher.group(1);
if (sections.get(currentSection) == null) {
sections.put(currentSection, new HashMap<String, Object>());
}
|