diff --git a/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF b/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF
index 65aff97d985..39a907f9f87 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF
+++ b/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.dsf.ui;singleton:=true
-Bundle-Version: 2.4.100.qualifier
+Bundle-Version: 2.5.0.qualifier
Bundle-Activator: org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
diff --git a/dsf/org.eclipse.cdt.dsf.ui/plugin.xml b/dsf/org.eclipse.cdt.dsf.ui/plugin.xml
index c7565f7e41a..e8b4e79abf5 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/plugin.xml
+++ b/dsf/org.eclipse.cdt.dsf.ui/plugin.xml
@@ -890,4 +890,11 @@
targetId="org.eclipse.cdt.ui.cCode">
+
+
+
+
diff --git a/dsf/org.eclipse.cdt.dsf.ui/pom.xml b/dsf/org.eclipse.cdt.dsf.ui/pom.xml
index 448e33611fd..0a24192276b 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/pom.xml
+++ b/dsf/org.eclipse.cdt.dsf.ui/pom.xml
@@ -11,7 +11,7 @@
../../pom.xml
- 2.4.100-SNAPSHOT
+ 2.5.0-SNAPSHOT
org.eclipse.cdt.dsf.ui
eclipse-plugin
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java
new file mode 100644
index 00000000000..534c50a27b4
--- /dev/null
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java
@@ -0,0 +1,148 @@
+/*****************************************************************
+ * Copyright (c) 2011, 2014 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *****************************************************************/
+package org.eclipse.cdt.dsf.debug.ui.viewmodel;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ * Generic persistable for storing a map of simple values.
+ *
+ * Currently supported value types are {@link Integer} and {@link String}.
+ *
+ * @since 2.5
+ */
+public class SimpleMapPersistable implements IPersistableElement, IAdaptable {
+
+ private static final String KEY_TYPE = "type"; //$NON-NLS-1$
+ private static final String KEY_NAME = "name"; //$NON-NLS-1$
+ private static final String KEY_VALUE = "value"; //$NON-NLS-1$
+
+ private Class fType;
+ private Map fValues = new TreeMap();
+
+ @SuppressWarnings("unchecked")
+ public SimpleMapPersistable(IMemento memento) throws CoreException {
+ IMemento type = memento.getChild(KEY_TYPE);
+ if (type == null) {
+ throw new CoreException(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE,
+ "Missing key for type.", null)); //$NON-NLS-1$
+ }
+
+ try {
+ fType = (Class)Class.forName(type.getTextData());
+ } catch (ClassNotFoundException e) {
+ throw new CoreException(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE,
+ e.getMessage(), e));
+ }
+
+ IMemento[] list = memento.getChildren(KEY_NAME);
+ Map values = new TreeMap();
+ for (IMemento elem : list) {
+ values.put(elem.getID(), getValue(elem));
+ }
+
+ synchronized(fValues) {
+ // We should not assign 'values' directly to 'fValues'
+ // if we want synchronization to work. Instead, we must use
+ // the same map as before for 'fValues'
+ fValues.clear();
+ fValues.putAll(values);
+ }
+ }
+
+ public SimpleMapPersistable(Class type) {
+ fType = type;
+ }
+
+ @Override
+ public void saveState(IMemento memento) {
+ Map values = null;
+ synchronized (fValues) {
+ values = new TreeMap(fValues);
+ }
+
+ IMemento type = memento.createChild(KEY_TYPE);
+ synchronized (fType) {
+ type.putTextData(fType.getName());
+ }
+ for (Map.Entry entry : values.entrySet()) {
+ IMemento value = memento.createChild(KEY_NAME, entry.getKey());
+ putValue(value, entry.getValue());
+ }
+ }
+
+ private void putValue(IMemento memento, Object value) {
+ if (value instanceof String) {
+ memento.putString(KEY_VALUE, (String)value);
+ } else if (value instanceof Integer) {
+ memento.putInteger(KEY_VALUE, (Integer)value);
+ }
+ else {
+ assert false;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private V getValue(IMemento memento) {
+ synchronized (fType) {
+ if (String.class.equals(fType)) {
+ return (V)memento.getString(KEY_VALUE);
+ } else if (Integer.class.equals(fType)) {
+ return (V)memento.getInteger(KEY_VALUE);
+ } else {
+ assert false;
+ }
+ }
+ return null;
+ }
+
+
+ public V getValue(String key) {
+ if (key == null)
+ return null;
+ synchronized (fValues) {
+ return fValues.get(key);
+ }
+ }
+
+ public void setValue(String key, V value) {
+ synchronized (fValues) {
+ if (value == null) {
+ fValues.remove(key);
+ } else {
+ fValues.put(key, value);
+ }
+ }
+ }
+
+ @Override
+ public String getFactoryId() {
+ return SimpleMapPersistableFactory.getFactoryId();
+ }
+
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if (adapter.isInstance(this)) {
+ return this;
+ }
+ return null;
+ }
+}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistableFactory.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistableFactory.java
new file mode 100644
index 00000000000..fd087562810
--- /dev/null
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistableFactory.java
@@ -0,0 +1,46 @@
+/*****************************************************************
+ * Copyright (c) 2011, 2014 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *****************************************************************/
+package org.eclipse.cdt.dsf.debug.ui.viewmodel;
+
+import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.IElementFactory;
+import org.eclipse.ui.IMemento;
+
+/**
+ * Persistable factory the simple map persistable.
+ *
+ * @since 2.5
+ *
+ * @see SimpleMapPersistable
+ */
+public class SimpleMapPersistableFactory implements IElementFactory {
+
+ public static String getFactoryId() {
+ // Must be the same id as the one used in the plugin.xml file
+ return "org.eclipse.cdt.dsf.ui.simpleMapPersistableFactory"; //$NON-NLS-1$
+ }
+
+ @Override
+ public IAdaptable createElement(IMemento memento) {
+ try {
+ SimpleMapPersistable