Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2008-04-25 21:23:39 +0000
committerJohn Cortell2008-04-25 21:23:39 +0000
commita602cd182669b17b0c19edfd22548b19162b1e37 (patch)
treec86be6198c8517e623e65d6105c608f93dba756c /debug/org.eclipse.cdt.debug.ui/src/org
parent21bce066fdf28a753732990f16e4f9a27538dbeb (diff)
downloadorg.eclipse.cdt-a602cd182669b17b0c19edfd22548b19162b1e37.tar.gz
org.eclipse.cdt-a602cd182669b17b0c19edfd22548b19162b1e37.tar.xz
org.eclipse.cdt-a602cd182669b17b0c19edfd22548b19162b1e37.zip
Refactoring to use "BreakpointEvent" instead of "Catchpoint" to be consistent with how we refer to the feature at the UI level.
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/actions/ActionMessages.properties4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddEventBreakpointActionDelegate.java (renamed from debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddCatchpointActionDelegate.java)16
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java (renamed from debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddCatchpointDialog.java)22
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/DialogMessages.properties2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java (renamed from debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CCatchpointsLabelProviderFactory.java)30
6 files changed, 39 insertions, 39 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
index 1f2b9468bd9..d71baff2ef8 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
@@ -121,5 +121,5 @@ ToggleDetailPaneAction.7=Hide the Detail Pane so that only the Main Tree View is
AddRegisterGroupActionDelegate.0=Error
AddRegisterGroupActionDelegate.1=Error(s) occurred adding register group.
EditRegisterGroupActionDelegate.0=Unable to edit register group.
-AddCatchpointActionDelegate.0=Error adding Event Breakpoint
-AddCatchpointActionDelegate.2=Action is not supported by installed debuggers
+AddEventBreakpointActionDelegate.0=Error adding Event Breakpoint
+AddEventBreakpointActionDelegate.2=Action is not supported by installed debuggers
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddCatchpointActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddEventBreakpointActionDelegate.java
index a13670ac465..cb8d1266955 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddCatchpointActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddEventBreakpointActionDelegate.java
@@ -13,7 +13,7 @@
package org.eclipse.cdt.debug.internal.ui.actions;
import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.internal.ui.dialogs.AddCatchpointDialog;
+import org.eclipse.cdt.debug.internal.ui.dialogs.AddEventBreakpointDialog;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.UIMessages;
import org.eclipse.core.resources.IResource;
@@ -29,7 +29,7 @@ import org.eclipse.ui.actions.ActionDelegate;
/**
* A delegate for the "Add Event Breakpoint" action.
*/
-public class AddCatchpointActionDelegate extends ActionDelegate implements IViewActionDelegate {
+public class AddEventBreakpointActionDelegate extends ActionDelegate implements IViewActionDelegate {
private IViewPart fView;
@@ -52,24 +52,24 @@ public class AddCatchpointActionDelegate extends ActionDelegate implements IView
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run(IAction action) {
- AddCatchpointDialog dlg = new AddCatchpointDialog(CDebugUIPlugin.getActiveWorkbenchShell());
+ AddEventBreakpointDialog dlg = new AddEventBreakpointDialog(CDebugUIPlugin.getActiveWorkbenchShell());
if (dlg.isActive() == false) {
- String message = ActionMessages.getString("AddCatchpointActionDelegate.2");
+ String message = ActionMessages.getString("AddEventBreakpointActionDelegate.2");
MessageDialog.openError( getView().getSite().getShell(), UIMessages.getString( "CDebugUIPlugin.0" ), message);
} else {
if (dlg.open() == Window.OK) {
- addCatchpoint(dlg.getEventTypeId(), dlg.getEventArgument());
+ addEventBreakpoint(dlg.getEventTypeId(), dlg.getEventArgument());
}
}
}
- protected void addCatchpoint(String id, String arg) {
+ protected void addEventBreakpoint(String id, String arg) {
if (getResource() == null)
return;
try {
- CDIDebugModel.createCatchpoint(id, arg, true); //$NON-NLS-1$
+ CDIDebugModel.createEventBreakpoint(id, arg, true); //$NON-NLS-1$
} catch (CoreException ce) {
- CDebugUIPlugin.errorDialog(ActionMessages.getString("AddCatchpointActionDelegate.0"), ce); //$NON-NLS-1$
+ CDebugUIPlugin.errorDialog(ActionMessages.getString("AddEventBreakpointActionDelegate.0"), ce); //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddCatchpointDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java
index 0eaab8a0b14..f299abec588 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddCatchpointDialog.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java
@@ -16,8 +16,8 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.cdt.debug.core.CDIDebugModel;
-import org.eclipse.cdt.debug.core.model.ICCatchpoint;
-import org.eclipse.cdt.debug.internal.core.breakpoints.CCatchpoint;
+import org.eclipse.cdt.debug.core.model.ICEventBreakpoint;
+import org.eclipse.cdt.debug.internal.core.breakpoints.CEventBreakpoint;
import org.eclipse.cdt.debug.internal.ui.propertypages.CBreakpointPreferenceStore;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.breakpoints.CBreakpointUIContributionFactory;
@@ -43,7 +43,7 @@ import org.eclipse.swt.widgets.Shell;
/**
* The "Add Catchpoint" dialog of the "Add catchpoint" action.
*/
-public class AddCatchpointDialog extends Dialog implements ModifyListener, SelectionListener {
+public class AddEventBreakpointDialog extends Dialog implements ModifyListener, SelectionListener {
private Combo fEventTypeInput;
private String fEventType;
@@ -75,12 +75,12 @@ public class AddCatchpointDialog extends Dialog implements ModifyListener, Selec
Composite parent = getFieldEditorParent();
try {
Map map = new HashMap();
- map.put(ICCatchpoint.EVENT_TYPE_ID, eventType);
+ map.put(ICEventBreakpoint.EVENT_TYPE_ID, eventType);
ICBreakpointsUIContribution cons[] = CBreakpointUIContributionFactory.getInstance()
- .getBreakpointUIContributions(modelId, CCatchpoint.getMarkerType(), map);
+ .getBreakpointUIContributions(modelId, CEventBreakpoint.getMarkerType(), map);
for (ICBreakpointsUIContribution con : cons) {
- if (con.getId().equals(ICCatchpoint.EVENT_TYPE_ID)) continue;
+ if (con.getId().equals(ICEventBreakpoint.EVENT_TYPE_ID)) continue;
FieldEditor fieldEditor = con.getFieldEditor(con.getId(), con.getLabel(),
parent);
getPreferenceStore().setValue(con.getId(),"");
@@ -100,7 +100,7 @@ public class AddCatchpointDialog extends Dialog implements ModifyListener, Selec
*
* @param parentShell
*/
- public AddCatchpointDialog(Shell parentShell) {
+ public AddEventBreakpointDialog(Shell parentShell) {
super(parentShell);
setShellStyle(getShellStyle() | SWT.RESIZE);
factory = CBreakpointUIContributionFactory.getInstance();
@@ -115,10 +115,10 @@ public class AddCatchpointDialog extends Dialog implements ModifyListener, Selec
private void loadEventTypes() {
ICBreakpointsUIContribution[] cons = factory.getBreakpointUIContributions(debugModelId,
- CCatchpoint.getMarkerType(), null);
+ CEventBreakpoint.getMarkerType(), null);
for (int i = 0; i < cons.length; i++) {
ICBreakpointsUIContribution con = cons[i];
- if (con.getId().equals(ICCatchpoint.EVENT_TYPE_ID)) {
+ if (con.getId().equals(ICEventBreakpoint.EVENT_TYPE_ID)) {
String[] possibleValues = con.getPossibleValues();
for (String value : possibleValues) {
fIdLabelMap.put(value, con.getLabelForValue(value));
@@ -228,7 +228,7 @@ public class AddCatchpointDialog extends Dialog implements ModifyListener, Selec
*/
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
- newShell.setText(DialogMessages.getString("AddCatchpointDialog.2")); //$NON-NLS-1$
+ newShell.setText(DialogMessages.getString("AddEventBreakpointDialog.2")); //$NON-NLS-1$
}
/*
@@ -244,7 +244,7 @@ public class AddCatchpointDialog extends Dialog implements ModifyListener, Selec
page.performOk();
IPreferenceStore preferenceStore = page.getPreferenceStore();
if (preferenceStore != null) {
- fEventArgument = preferenceStore.getString(ICCatchpoint.EVENT_ARG);
+ fEventArgument = preferenceStore.getString(ICEventBreakpoint.EVENT_ARG);
}
else
fEventArgument = null;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/DialogMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/DialogMessages.properties
index fd7df6a9a5e..42d934661a2 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/DialogMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/DialogMessages.properties
@@ -1 +1 @@
-AddCatchpointDialog.2=Add Event Breakpoint...
+AddEventBreakpointDialog.2=Add Event Breakpoint...
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java
index d2344200955..749a4f2c242 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java
@@ -17,7 +17,7 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICCatchpoint;
+import org.eclipse.cdt.debug.core.model.ICEventBreakpoint;
import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
import org.eclipse.cdt.debug.core.model.ICWatchpoint;
@@ -372,7 +372,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
return PropertyPageMessages.getString("CBreakpointPropertyPage.4");
if (breakpoint instanceof ICLineBreakpoint)
return PropertyPageMessages.getString("CBreakpointPropertyPage.8");
- if (breakpoint instanceof ICCatchpoint)
+ if (breakpoint instanceof ICEventBreakpoint)
return PropertyPageMessages.getString("CBreakpointPropertyPage.21");
if (breakpoint instanceof ICWatchpoint) {
ICWatchpoint watchpoint = (ICWatchpoint) breakpoint;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CCatchpointsLabelProviderFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java
index bf25402f25e..b93ee2a4019 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CCatchpointsLabelProviderFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CEventBreakpointsLabelProviderFactory.java
@@ -16,7 +16,7 @@ import java.text.MessageFormat;
import org.eclipse.cdt.debug.core.DebugCoreMessages;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
-import org.eclipse.cdt.debug.core.model.ICCatchpoint;
+import org.eclipse.cdt.debug.core.model.ICEventBreakpoint;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdapterFactory;
@@ -31,15 +31,15 @@ import org.eclipse.swt.graphics.Image;
/**
* Factory for event breakpoint label provider
*/
-public class CCatchpointsLabelProviderFactory implements IAdapterFactory {
- public static final String IMG_OBJS_CATCHPOINT_ENABLED = "icons/obj16/catchpoint_obj.gif"; //$NON-NLS-1$
- public static final String IMG_OBJS_CATCHPOINT_DISABLED = "icons/obj16/catchpointd_obj.gif"; //$NON-NLS-1$
+public class CEventBreakpointsLabelProviderFactory implements IAdapterFactory {
+ public static final String IMG_OBJS_EVENTBREAKPOINT_ENABLED = "icons/obj16/eventbreakpoint_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_EVENTBREAKPOINT_DISABLED = "icons/obj16/eventbreakpointd_obj.gif"; //$NON-NLS-1$
private static ILabelProvider fLabelProvider = new LabelProvider() {
@Override
public String getText(Object element) {
- if (element instanceof ICCatchpoint) {
+ if (element instanceof ICEventBreakpoint) {
try {
- ICCatchpoint breakpoint = (ICCatchpoint) element;
+ ICEventBreakpoint breakpoint = (ICEventBreakpoint) element;
ICBreakpointsUIContribution bscs[] = CBreakpointUIContributionFactory.getInstance()
.getBreakpointUIContributions(breakpoint);
@@ -51,7 +51,7 @@ public class CCatchpointsLabelProviderFactory implements IAdapterFactory {
for (ICBreakpointsUIContribution con : bscs) {
Object attValue = breakpoint.getMarker().getAttribute(con.getId());
- if (con.getId().equals(ICCatchpoint.EVENT_TYPE_ID)) {
+ if (con.getId().equals(ICEventBreakpoint.EVENT_TYPE_ID)) {
buffer.append(con.getLabelForValue((String) attValue));
continue;
}
@@ -80,12 +80,12 @@ public class CCatchpointsLabelProviderFactory implements IAdapterFactory {
@Override
public Image getImage(Object element) {
try {
- if (element instanceof ICCatchpoint) {
- ICCatchpoint catchpoint = (ICCatchpoint) element;
- if (catchpoint.isEnabled())
- return CDebugUIPlugin.getDefault().getImage(IMG_OBJS_CATCHPOINT_ENABLED);
+ if (element instanceof ICEventBreakpoint) {
+ ICEventBreakpoint eventBkpt = (ICEventBreakpoint) element;
+ if (eventBkpt.isEnabled())
+ return CDebugUIPlugin.getDefault().getImage(IMG_OBJS_EVENTBREAKPOINT_ENABLED);
else
- return CDebugUIPlugin.getDefault().getImage(IMG_OBJS_CATCHPOINT_DISABLED);
+ return CDebugUIPlugin.getDefault().getImage(IMG_OBJS_EVENTBREAKPOINT_DISABLED);
}
} catch (CoreException e) {
CDebugUIPlugin.log(e);
@@ -118,7 +118,7 @@ public class CCatchpointsLabelProviderFactory implements IAdapterFactory {
protected String getLabel(TreePath elementPath, IPresentationContext context, String columnId)
throws CoreException {
- ICCatchpoint cp = (ICCatchpoint) elementPath.getLastSegment();
+ ICEventBreakpoint cp = (ICEventBreakpoint) elementPath.getLastSegment();
return fLabelProvider.getText(cp);
}
@@ -133,12 +133,12 @@ public class CCatchpointsLabelProviderFactory implements IAdapterFactory {
*/
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adapterType.equals(IElementLabelProvider.class)) {
- if (adaptableObject instanceof ICCatchpoint) {
+ if (adaptableObject instanceof ICEventBreakpoint) {
return fElementLabelProvider;
}
}
if (adapterType.equals(ILabelProvider.class)) {
- if (adaptableObject instanceof ICCatchpoint) {
+ if (adaptableObject instanceof ICEventBreakpoint) {
return fLabelProvider;
}
}

Back to the top