Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2012-03-27 17:18:32 -0400
committerPawel Piech2012-04-03 17:17:57 -0400
commit6d107cd42e7ff103990077ed23731619d04d0522 (patch)
tree1d5569327262f8e1a8ad9c114ac7777b49dcff90 /debug/org.eclipse.cdt.debug.ui/src/org
parentdce877458e94b789059f8577454d07f2e1b00bb0 (diff)
downloadorg.eclipse.cdt-6d107cd42e7ff103990077ed23731619d04d0522.tar.gz
org.eclipse.cdt-6d107cd42e7ff103990077ed23731619d04d0522.tar.xz
org.eclipse.cdt-6d107cd42e7ff103990077ed23731619d04d0522.zip
Bug 374512 - breakpointContribution does not support custom
field editors Also addresses: Bug 374514 - breakpointContribution always add Widgets on top of common properties page Bug 374508 - breakpointContribution does not support restrictions
Diffstat (limited to 'debug/org.eclipse.cdt.debug.ui/src/org')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java26
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java105
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java73
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/ICBreakpointsUIContribution.java28
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/IFieldEditorFactory.java38
6 files changed, 215 insertions, 59 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
index 68b8a6beb2..22626082fb 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
@@ -34,6 +34,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IDebugModelProvider;
import org.eclipse.debug.core.model.ILineBreakpoint;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.contexts.IDebugContextProvider;
@@ -462,11 +463,12 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
protected void createFieldEditors() {
ICBreakpoint breakpoint = getBreakpoint();
createMainLabel(breakpoint);
- createContributedFieldEditors(breakpoint);
+ createContributedFieldEditors(breakpoint, ICBreakpointsUIContribution.BREAKPOINT_LABELS);
createTypeSpecificLabelFieldEditors( breakpoint );
createEnabledField( getFieldEditorParent() );
createConditionEditor( getFieldEditorParent() );
createIgnoreCountEditor( getFieldEditorParent() );
+ createContributedFieldEditors(breakpoint, ICBreakpointsUIContribution.BREAKPOINT_EDITORS);
}
private void createMainLabel(ICBreakpoint breakpoint) {
@@ -760,26 +762,34 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
/**
* Creates field editors contributed using breakpointUIContribution extension point
- * @param breakpoint
*/
- private void createContributedFieldEditors(ICBreakpoint breakpoint) {
+ private void createContributedFieldEditors(ICBreakpoint breakpoint, String conMainElement) {
Composite parent = getFieldEditorParent();
+ String[] debugModelIds = CBreakpointUIContributionFactory.DEBUG_MODEL_IDS_DEFAULT;
+ IDebugModelProvider debugModelProvider = (IDebugModelProvider)DebugPlugin.getAdapter(
+ getDebugContext(), IDebugModelProvider.class);
+ if (debugModelProvider != null) {
+ debugModelIds = debugModelProvider.getModelIdentifiers();
+ }
+
try {
ICBreakpointsUIContribution[] cons;
CBreakpointUIContributionFactory factory = CBreakpointUIContributionFactory.getInstance();
IPreferenceStore prefStore = getPreferenceStore();
if (prefStore instanceof CBreakpointPreferenceStore) {
cons = factory.getBreakpointUIContributions(
- breakpoint, ((CBreakpointPreferenceStore) prefStore).getAttributes());
+ debugModelIds, breakpoint, ((CBreakpointPreferenceStore) prefStore).getAttributes());
} else {
cons = factory.getBreakpointUIContributions(breakpoint);
}
for (ICBreakpointsUIContribution con : cons) {
- FieldEditor fieldEditor = con.getFieldEditor(con.getId(), con.getLabel()+":", parent); //$NON-NLS-1$
- if (fieldEditor != null) {
- addField(fieldEditor);
- }
+ if ( conMainElement.equals(con.getMainElement()) ) {
+ FieldEditor fieldEditor = con.getFieldEditor(con.getId(), con.getLabel() + ":", parent); //$NON-NLS-1$
+ if (fieldEditor != null) {
+ addField(fieldEditor);
+ }
+ }
}
} catch (CoreException ce) {
CDebugUIPlugin.log(ce);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java
index 9631e55c38..118d1b4b79 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java
@@ -13,7 +13,9 @@
package org.eclipse.cdt.debug.ui.breakpoints;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
+import java.util.List;
import java.util.Map;
import org.eclipse.cdt.debug.core.CDIDebugModel;
@@ -31,7 +33,6 @@ import org.eclipse.debug.core.model.IBreakpoint;
public class CBreakpointUIContributionFactory {
private static final String EXTENSION_POINT_NAME = "breakpointContribution"; //$NON-NLS-1$
- private static final String MAIN_ELEMENT = "breakpointLabels"; //$NON-NLS-1$
private static CBreakpointUIContributionFactory instance;
protected ArrayList<ICBreakpointsUIContribution> contributions;
@@ -70,22 +71,28 @@ public class CBreakpointUIContributionFactory {
* @throws CoreException if cannot get marker attributes from bearkpoint
* @since 7.2
*/
- public ICBreakpointsUIContribution[] getBreakpointUIContributions(IBreakpoint breakpoint,
- Map<String, Object> attributes)
- throws CoreException
+ public ICBreakpointsUIContribution[] getBreakpointUIContributions(String[] debugModelIDs, IBreakpoint breakpoint,
+ Map<String, Object> attributes) throws CoreException
{
- String debugModelId = breakpoint.getModelIdentifier();
IMarker bmarker = breakpoint.getMarker();
String markerType = CDIDebugModel.calculateMarkerType(breakpoint);
if (bmarker != null) {
markerType = bmarker.getType();
}
- return getBreakpointUIContributions(debugModelId, markerType, attributes);
+ return getBreakpointUIContributions(debugModelIDs, markerType, attributes);
}
+ /**
+ * Default debug model ID list which will cause only the general UI contributions to be returned.
+ * @since 7.2
+ */
+ public final static String[] DEBUG_MODEL_IDS_DEFAULT = new String[] {};
+
/**
* Calculates the breakpoint UI contributions for the given breakpoint.
*
+ * @param debugModelId The debug model ID of the active debug context for
+ * which to calculate contributions.
* @param breakpoint Breakpoint to find UI contributions for.
* @param markerType Marker type of the breakpoint.
* @param attributes Attributes of the breakpoint
@@ -96,25 +103,54 @@ public class CBreakpointUIContributionFactory {
public ICBreakpointsUIContribution[] getBreakpointUIContributions(String debugModelId, String markerType,
Map<String, Object> attributes)
{
- ArrayList<ICBreakpointsUIContribution> list = new ArrayList<ICBreakpointsUIContribution>();
- for (ICBreakpointsUIContribution con : contributions) {
- try {
- if (debugModelId == null || con.getDebugModelId() == null || debugModelId.equals(con.getDebugModelId())) {
- String contributedMarkerType = con.getMarkerType();
- if (isMarkerSubtypeOf(markerType, contributedMarkerType)) {
- if (attributes == null || con.isApplicable(attributes)) {
- list.add(con);
- }
- }
- }
- } catch (Exception e) {
- CDebugUIPlugin.log(e);
- }
-
- }
- return list.toArray(new ICBreakpointsUIContribution[list.size()]);
+ return getBreakpointUIContributions(
+ debugModelId != null ? new String[] { debugModelId } : DEBUG_MODEL_IDS_DEFAULT,
+ markerType,
+ attributes);
+
}
+ /**
+ * Calculates the breakpoint UI contributions for the given breakpoint.
+ *
+ * @param debugModelId The debug model IDs of the active debug context for
+ * which to calculate contributions.
+ * @param breakpoint Breakpoint to find UI contributions for.
+ * @param markerType Marker type of the breakpoint.
+ * @param attributes Attributes of the breakpoint
+ * @return non-null array of ICBreakpointsUIContribution
+ * @throws CoreException
+ * @throws CoreException if cannot get marker attributes from berakpoint
+ *
+ * @since 7.2
+ */
+ public ICBreakpointsUIContribution[] getBreakpointUIContributions(String[] debugModelIds, String markerType,
+ Map<String, Object> attributes)
+ {
+ List<String> debugModelIdsList = Arrays.asList(debugModelIds);
+ ArrayList<ICBreakpointsUIContribution> list = new ArrayList<ICBreakpointsUIContribution>();
+ for (ICBreakpointsUIContribution con : contributions) {
+ try {
+ if (con.getDebugModelId() == null ||
+ con.getDebugModelId().equals(CDIDebugModel.getPluginIdentifier()) ||
+ debugModelIdsList.contains(con.getDebugModelId()))
+ {
+ String contributedMarkerType = con.getMarkerType();
+ if (isMarkerSubtypeOf(markerType, contributedMarkerType)) {
+ if (attributes == null || con.isApplicable(attributes)) {
+ list.add(con);
+ }
+ }
+ }
+ } catch (Exception e) {
+ CDebugUIPlugin.log(e);
+ }
+
+ }
+ return list.toArray(new ICBreakpointsUIContribution[list.size()]);
+ }
+
+
public boolean isMarkerSubtypeOf(String currentType, String type) throws CoreException {
return getWorkspace().getMarkerManager().isSubtype(currentType, type);
}
@@ -132,15 +168,19 @@ public class CBreakpointUIContributionFactory {
IConfigurationElement[] elements = ep.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
IConfigurationElement configurationElement = elements[i];
- if (configurationElement.getName().equals(MAIN_ELEMENT)) {
+ if (configurationElement.getName().equals(ICBreakpointsUIContribution.BREAKPOINT_LABELS) ||
+ configurationElement.getName().equals(ICBreakpointsUIContribution.BREAKPOINT_EDITORS))
+ {
+ String mainElement = configurationElement.getName();
String modelId = configurationElement.getAttribute("debugModelId"); //$NON-NLS-1$
String markerType = getRequired(configurationElement, "markerType"); //$NON-NLS-1$
if (markerType == null)
continue;
IConfigurationElement[] children = configurationElement.getChildren("attribute"); //$NON-NLS-1$
for (IConfigurationElement att : children) {
-
- DefaultCBreakpointUIContribution adapter = new DefaultCBreakpointUIContribution();
+
+ DefaultCBreakpointUIContribution adapter = new DefaultCBreakpointUIContribution(att);
+ adapter.setMainElement(mainElement);
adapter.setMarkerType(markerType);
adapter.setDebugModelId(modelId);
if (processAttribute(att, adapter) == false)
@@ -152,10 +192,13 @@ public class CBreakpointUIContributionFactory {
}
}
- private boolean processAttribute(IConfigurationElement attrElement, DefaultCBreakpointUIContribution adapter) {
+ private boolean processAttribute(IConfigurationElement attrElement,
+ DefaultCBreakpointUIContribution adapter)
+ {
String attrId = getRequired(attrElement, "name"); //$NON-NLS-1$
String attrLabel = getRequired(attrElement, "label"); //$NON-NLS-1$
- String className = attrElement.getAttribute("fieldEditor"); //$NON-NLS-1$
+ String fieldEditorClass = attrElement.getAttribute("fieldEditor"); //$NON-NLS-1$
+ String fieldEditorFactoryClass = attrElement.getAttribute("fieldEditorFactory"); //$NON-NLS-1$
String type = attrElement.getAttribute("type"); //$NON-NLS-1$
String svisible = attrElement.getAttribute("visible"); //$NON-NLS-1$
@@ -174,7 +217,8 @@ public class CBreakpointUIContributionFactory {
}
adapter.setId(attrId);
adapter.setLabel(attrLabel);
- adapter.setControlClass(className);
+ adapter.setControlClass(fieldEditorClass);
+ adapter.setFieldEditorFactory(fieldEditorFactoryClass);
adapter.setType(type);
adapter.setVisible(visible);
addContribution(adapter);
@@ -196,8 +240,9 @@ public class CBreakpointUIContributionFactory {
adapter.addValue(valueId, valueLabel);
IConfigurationElement[] children = valueElement.getChildren("attribute"); //$NON-NLS-1$
for (IConfigurationElement att : children) {
- DefaultCBreakpointUIContribution adapter2 = new DefaultCBreakpointUIContribution();
+ DefaultCBreakpointUIContribution adapter2 = new DefaultCBreakpointUIContribution(att);
// inherit values
+ adapter2.setMainElement(adapter.getMainElement());
adapter2.setMarkerType(adapter.getMarkerType());
adapter2.setDebugModelId(adapter.getDebugModelId());
adapter2.addContionsAll(adapter.getConditions());
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java
index 53c76328c1..953ba4eb1a 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java
@@ -96,7 +96,7 @@ public class CEventBreakpointsLabelProviderFactory implements IAdapterFactory {
if (ignoreCount > 0) {
label.append(' ');
label.append(MessageFormat.format(
- DebugCoreMessages.getString("CDebugUtils.3"), new String[] { Integer.toString(ignoreCount) })); //$NON-NLS-1$
+ DebugCoreMessages.getString("CDebugUtils.3"), new Object[] { Integer.toString(ignoreCount) })); //$NON-NLS-1$
}
return label;
}
@@ -106,7 +106,7 @@ public class CEventBreakpointsLabelProviderFactory implements IAdapterFactory {
if (condition != null && condition.length() > 0) {
buffer.append(' ');
buffer.append(MessageFormat
- .format(DebugCoreMessages.getString("CDebugUtils.4"), new String[] { condition })); //$NON-NLS-1$
+ .format(DebugCoreMessages.getString("CDebugUtils.4"), new Object[] { condition })); //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java
index 65c2bc8139..00d5b6107b 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java
@@ -20,19 +20,31 @@ import java.util.Set;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.preferences.ReadOnlyFieldEditor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.swt.widgets.Composite;
class DefaultCBreakpointUIContribution implements ICBreakpointsUIContribution {
+
+ private final IConfigurationElement fConfig;
+ private String mainElement;
private String attLabel;
private String attId;
private String fieldEditorClassName;
+ private String fieldEditorFactoryClass;
+ private IFieldEditorFactory fieldEditorFactory;
private String markerType;
private String modelId;
private String attType;
private Map<String, String> valueLabels = new LinkedHashMap<String, String>();
private Map<String, String> conditions = new HashMap<String, String>();
+ DefaultCBreakpointUIContribution(IConfigurationElement config) {
+ fConfig = config;
+ }
+
+
@Override
public String getId() {
return attId;
@@ -48,28 +60,43 @@ class DefaultCBreakpointUIContribution implements ICBreakpointsUIContribution {
return modelId;
}
- static private Class[] fieldSignature = new Class[] { String.class, String.class,
+ @Override
+ public String getMainElement() {
+ return mainElement;
+ }
+
+ static private Class<?>[] fieldSignature = new Class[] { String.class, String.class,
Composite.class };
@Override
public FieldEditor getFieldEditor(String name, String labelText, Composite parent) {
- String className = fieldEditorClassName;
- if (fieldEditorClassName == null) {
- className = ReadOnlyFieldEditor.class.getName();
- }
- try {
- Class cclass = Class.forName(className);
- Constructor constructor = cclass.getConstructor(fieldSignature);
- FieldEditor editor = (FieldEditor) constructor.newInstance(name, labelText, parent);
- if (editor instanceof ICBreakpointsUIContributionUser) {
- ((ICBreakpointsUIContributionUser)editor).setContribution(this);
- }
- return editor;
- } catch (Exception e) {
- // cannot happened, would have happened when loading extension
- CDebugUIPlugin.log(e);
- return null;
- }
+ if (fieldEditorFactory != null) {
+ return fieldEditorFactory.createFieldEditor(name, labelText, parent);
+ } else if (fieldEditorFactoryClass != null) {
+ try {
+ fieldEditorFactory = (IFieldEditorFactory) fConfig.createExecutableExtension("fieldEditorFactory"); //$NON-NLS-1$
+ } catch (CoreException e) {
+ CDebugUIPlugin.log(e);
+ return null;
+ }
+ return fieldEditorFactory.createFieldEditor(name, labelText, parent);
+ } else if (fieldEditorClassName != null) {
+ try {
+ @SuppressWarnings("unchecked")
+ Class<FieldEditor> cclass = (Class<FieldEditor>)Class.forName(fieldEditorClassName);
+ Constructor<FieldEditor> constructor = cclass.getConstructor(fieldSignature);
+ FieldEditor editor = constructor.newInstance(name, labelText, parent);
+ if (editor instanceof ICBreakpointsUIContributionUser) {
+ ((ICBreakpointsUIContributionUser)editor).setContribution(this);
+ }
+ return editor;
+ } catch (Exception e) {
+ CDebugUIPlugin.log(e);
+ return null;
+ }
+ } else {
+ return new ReadOnlyFieldEditor(name, labelText, parent);
+ }
}
@Override
@@ -96,7 +123,7 @@ class DefaultCBreakpointUIContribution implements ICBreakpointsUIContribution {
}
@Override
- public boolean isApplicable(Map properties) {
+ public boolean isApplicable(Map<String, Object> 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 a0a5aaf2c9..a21489d4fe 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
@@ -42,6 +62,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 0000000000..0ccb6f985d
--- /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 <code>
+ * org.eclipse.cdt.debug.ui.breakpointContribution</code> extension point.
+ * <p>
+ * 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.
+ * </p>
+ * @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);
+}

Back to the top