Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints')
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java4
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFToggleBreakpointAdapter.java60
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties4
3 files changed, 52 insertions, 16 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
index 3abd2586d..91d3657e8 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2012, 2015 Wind River Systems, Inc. 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
@@ -31,6 +31,8 @@ public class Messages extends NLS {
public static String TCFThreadFilterEditorNoOpenChannel;
public static String TCFBreakpointPreferencesEnableDefaultTriggerScope;
public static String TCFBreakpointPreferencesTriggerScopeExpression;
+ public static String TCFBreakpointPreferencesEnableLineOffsetLimit;
+ public static String TCFBreakpointPreferencesLineOffsetLimit;
public static String TCFBreakpointPreferencesDescription;
public static String TCFBreakpointToggle;
public static String TCFBreakpointPrefrencesError;
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFToggleBreakpointAdapter.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFToggleBreakpointAdapter.java
index a83da11f6..0cfcfedae 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFToggleBreakpointAdapter.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFToggleBreakpointAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2015 Wind River Systems, Inc. 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
@@ -76,17 +76,42 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
null);
}
- static Map<String, Object> getDefaultAttributes ( IWorkbenchPart part, final String toggleType) {
+ static boolean isLineOffsetLimitEnabled() {
+ return Platform.getPreferencesService().getBoolean(
+ Activator.PLUGIN_ID,
+ PreferenceConstants.PREF_LINE_OFFSET_LIMIT_ENABLED,
+ false,
+ null);
+ }
+
+ static String getLineOffsetLimit() {
+ return Platform.getPreferencesService().getString(
+ Activator.PLUGIN_ID,
+ PreferenceConstants.PREF_LINE_OFFSET_LIMIT,
+ "0",
+ null);
+ }
+
+ static Map<String, Object> getDefaultAttributes(IWorkbenchPart part, final String toggleType) {
Map<String, Object> attributes = new TreeMap<String, Object>();
- if ( part != null ) {
+ if (part != null) {
Object obj = getDebugContext(part).getFirstElement();
- if ( obj instanceof TCFNode || obj instanceof TCFLaunch ) {
- if ( toggleType.length() != 0) {
- attributes.clear();
- if (isDefaultBPContextQueryEnabled() == true) {
+ if (obj instanceof TCFNode || obj instanceof TCFLaunch) {
+ if (toggleType.length() != 0) {
+ if (isDefaultBPContextQueryEnabled()) {
String query = getDefaultBPContextQuery();
attributes.put(TCFBreakpointsModel.ATTR_CONTEXT_QUERY, query);
}
+ if (isLineOffsetLimitEnabled()) {
+ BigInteger n = null;
+ try {
+ n = new BigInteger(getLineOffsetLimit());
+ }
+ catch (Exception x) {
+ n = BigInteger.ZERO;
+ }
+ attributes.put(TCFBreakpointsModel.ATTR_LINE_OFFSET, n.intValue());
+ }
}
}
}
@@ -181,7 +206,8 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
public void toggleLineBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
if (part instanceof IDisassemblyPart) {
fDisassemblyToggleDelegate.toggleLineBreakpoints(part, selection);
- } else {
+ }
+ else {
super.toggleLineBreakpoints(part, selection);
}
}
@@ -191,7 +217,8 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
public boolean canToggleLineBreakpoints( IWorkbenchPart part, ISelection selection ) {
if (part instanceof IDisassemblyPart) {
return fDisassemblyToggleDelegate.canToggleLineBreakpoints(part, selection);
- } else {
+ }
+ else {
return super.canToggleLineBreakpoints(part, selection);
}
}
@@ -201,7 +228,8 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
public void toggleBreakpoints( IWorkbenchPart part, ISelection selection ) throws CoreException {
if (part instanceof IDisassemblyPart) {
fDisassemblyToggleDelegate.toggleBreakpoints(part, selection);
- } else {
+ }
+ else {
super.toggleBreakpoints(part, selection);
}
}
@@ -211,7 +239,8 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
public boolean canToggleBreakpoints( IWorkbenchPart part, ISelection selection ) {
if (part instanceof IDisassemblyPart) {
return fDisassemblyToggleDelegate.canToggleBreakpoints(part, selection);
- } else {
+ }
+ else {
return super.canToggleBreakpoints(part, selection);
}
}
@@ -221,7 +250,8 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
public void toggleBreakpointsWithEvent(IWorkbenchPart part, ISelection selection, Event event) throws CoreException {
if (part instanceof IDisassemblyPart) {
fDisassemblyToggleDelegate.toggleBreakpointsWithEvent(part, selection, event);
- } else {
+ }
+ else {
super.toggleBreakpointsWithEvent(part, selection, event);
}
}
@@ -231,7 +261,8 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
public void createLineBreakpointsInteractive(IWorkbenchPart part, ISelection selection) throws CoreException {
if (part instanceof IDisassemblyPart) {
fDisassemblyToggleDelegate.createLineBreakpointsInteractive(part, selection);
- } else {
+ }
+ else {
super.createLineBreakpointsInteractive(part, selection);
}
}
@@ -241,7 +272,8 @@ public class TCFToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter
public boolean canCreateLineBreakpointsInteractive(IWorkbenchPart part, ISelection selection) {
if (part instanceof IDisassemblyPart) {
return fDisassemblyToggleDelegate.canCreateLineBreakpointsInteractive(part, selection);
- } else {
+ }
+ else {
return super.canCreateLineBreakpointsInteractive(part, selection);
}
}
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties
index 1e06211dd..34c7a99c8 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+# Copyright (c) 2012, 2015 Wind River Systems, Inc. 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
@@ -20,6 +20,8 @@ TCFThreadFilterEditorFormatError=Unquoted text must contain alphanumeric charact
TCFThreadFilterEditorNoOpenChannel=No open connection to target
TCFBreakpointPreferencesEnableDefaultTriggerScope=Apply scope to new breakpoints
TCFBreakpointPreferencesTriggerScopeExpression=Default Scope Expression
+TCFBreakpointPreferencesEnableLineOffsetLimit=Apply relocation limit to new line breakpoints
+TCFBreakpointPreferencesLineOffsetLimit=Max lines to move breakpoint
TCFBreakpointPreferencesDescription=Breakpoint settings for debuggers using Target Communication Framework (TCF)
TCFBreakpointPrefrencesError=TCF Breakpoint Types must be selected for these options
TCFBreakpointToggle=C/C++ Breakpoints ( Scope: {0} )

Back to the top