properties) {
for (Object key : properties.keySet()) {
String value = conditions.get(key);
if (value != null) {
@@ -109,6 +136,10 @@ class DefaultCBreakpointUIContribution implements ICBreakpointsUIContribution {
return true;
}
+ public void setMainElement(String mainElement) {
+ this.mainElement = mainElement;
+ }
+
public void setLabel(String attLabel) {
this.attLabel = attLabel;
}
@@ -120,6 +151,10 @@ class DefaultCBreakpointUIContribution implements ICBreakpointsUIContribution {
public void setControlClass(String controlClass) {
this.fieldEditorClassName = controlClass;
}
+
+ public void setFieldEditorFactory(String factoryClass) {
+ fieldEditorFactoryClass = factoryClass;
+ }
public void setMarkerType(String markerId) {
this.markerType = markerId;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/ICBreakpointsUIContribution.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/ICBreakpointsUIContribution.java
index a0a5aaf2c9a..a21489d4fe8 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/ICBreakpointsUIContribution.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/ICBreakpointsUIContribution.java
@@ -19,13 +19,33 @@ import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.swt.widgets.Composite;
+/**
+ * Interface representing a contributed UI element for breakpoint properties
+ * dialogs.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
public interface ICBreakpointsUIContribution {
+ /**
+ * Main element name of breakpoint labels extension element.
+ * @since 7.2
+ */
+ public static final String BREAKPOINT_LABELS = "breakpointLabels"; //$NON-NLS-1$
+
+ /**
+ * Main element name of breakpoint editors extension element.
+ * @since 7.2
+ */
+ public static final String BREAKPOINT_EDITORS = "breakpointEditors"; //$NON-NLS-1$
+
/**
* Attribute id
* @return
*/
public String getId();
+
/**
* Extenralizable label for this attribute id
* @return
@@ -41,6 +61,14 @@ public interface ICBreakpointsUIContribution {
*/
public FieldEditor getFieldEditor(String name, String labelText, Composite parent);
+ /**
+ * Returns the element name under which this attribute was added. The value should either be
+ * "breakpointLabels" or "breakpointEditors".
+ * @return Main element name.
+ * @since 7.2
+ */
+ public String getMainElement();
+
/**
* Get raw field editor class name
* @return class name
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/IFieldEditorFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/IFieldEditorFactory.java
new file mode 100644
index 00000000000..0ccb6f985d3
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/IFieldEditorFactory.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.debug.ui.breakpoints;
+
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Factory for creating field editors contributed through the
+ * org.eclipse.cdt.debug.ui.breakpointContribution
extension point.
+ *
+ * Field editors do not have a non-arg constructor, therefore custom editors
+ * cannot be created directly by the extension point directly. This factory
+ * allows clients to instantiate a custom field editor which is not on the class
+ * path of the CDT debug UI plugin.
+ *
+ * @since 7.2
+ */
+public interface IFieldEditorFactory {
+
+ /**
+ * Creates a field editor with given parameters.
+ *
+ * @param name Field editor's property name.
+ * @param labelText Field editors label.
+ * @param parent Field editors parent control.
+ * @return Newly created field editor.
+ */
+ public FieldEditor createFieldEditor(String name, String labelText, Composite parent);
+}
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF
index 62e756489dc..266cd29f9b8 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.ide,
org.eclipse.cdt.examples.dsf.pda,
org.eclipse.cdt.dsf,
- org.eclipse.cdt.dsf.ui
+ org.eclipse.cdt.dsf.ui,
+ org.eclipse.cdt.debug.ui;bundle-version="7.2.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.examples.dsf.pda.ui,
org.eclipse.cdt.examples.dsf.pda.ui.breakpoints,
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml
index 16608bd2233..4a7413cccf7 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml
@@ -110,5 +110,18 @@
class="org.eclipse.cdt.examples.dsf.pda.ui.viewmodel.VariablePersistableFactory"
id="org.eclipse.cdt.examples.dsf.pda.ui.variablePersitableFactory">
+
+
+
+
+
+
-->
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAWatchpointFunctionFieldEditorFactory.java b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAWatchpointFunctionFieldEditorFactory.java
new file mode 100644
index 00000000000..0c01b97b734
--- /dev/null
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAWatchpointFunctionFieldEditorFactory.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.examples.dsf.pda.ui.breakpoints;
+
+import org.eclipse.cdt.debug.ui.breakpoints.IFieldEditorFactory;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ *
+ */
+public class PDAWatchpointFunctionFieldEditorFactory implements IFieldEditorFactory {
+
+ public FieldEditor createFieldEditor(String name, String labelText, Composite parent) {
+ return new StringFieldEditor(name, labelText, parent);
+ }
+}
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java
index 1a082761534..3b3a18a0bfe 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java
@@ -16,6 +16,7 @@ import java.util.List;
import java.util.Map;
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
+import org.eclipse.cdt.debug.core.model.ICWatchpoint;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.debug.service.BreakpointsMediator;
import org.eclipse.cdt.dsf.debug.service.BreakpointsMediator2;
@@ -59,6 +60,11 @@ public class PDABreakpointAttributeTranslator implements IBreakpointAttributeTra
PDAWatchpoint.MODIFICATION
};
+ private static final String[] fgCDTWatchpointAttributes = {
+ IBreakpoint.ENABLED,
+ PDAWatchpoint.FUNCTION_NAME,
+ };
+
// PDA breakpoints translator doesn't keep any state and it doesn't
// need to initialize or clean up.
public void initialize(BreakpointsMediator2 mediator) {
@@ -71,8 +77,10 @@ public class PDABreakpointAttributeTranslator implements IBreakpointAttributeTra
private List