(oldKeySet); removedKeys.removeAll(newKeySet);
+
+ // Add the modified attributes
+ for (String key : commonKeys) {
+ if (!(oldAttributes.get(key).equals(newAttributes.get(key))))
+ delta.put(key, newAttributes.get(key));
+ }
+
+ // Add the new attributes
+ for (String key : addedKeys) {
+ delta.put(key, newAttributes.get(key));
+ }
+
+ // Remove the deleted attributes
+ for (String key : removedKeys) {
+ delta.put(key, null);
+ }
+
+ return delta;
+ }
+}
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpointAttributeTranslator.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpointAttributeTranslator.java
index 3d7761d0d37..e17a086cb7f 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpointAttributeTranslator.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpointAttributeTranslator.java
@@ -13,29 +13,62 @@ package org.eclipse.cdt.dsf.debug.service;
import java.util.List;
import java.util.Map;
+import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
import org.eclipse.cdt.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.model.IBreakpoint;
/**
- * Breakpoint attribute translator interface
+ * Breakpoint attribute translator is used by the {@link BreakpointsMediator}
+ * to map IDE breakpoint attributes to debugger breakpoint attributes.
+ *
+ * Note: The attribute translator is expected to access IDE breakpoint manager
+ * objects which are synchronized using the resource system. Therefore all the
+ * translator methods are called using background threads. When the attribute
+ * translator needs to access DSF services, it needs to schedule a runnable using
+ * the DSF session executable.
*
+ * @see BreakpointMediator
* @since 1.0
*/
-
@ThreadSafeAndProhibitedFromDsfExecutor("")
public interface IBreakpointAttributeTranslator {
- public void initialize(BreakpointsMediator mediator);
-
- public void dispose();
-
- public List