aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Tepavich2012-05-22 17:49:16 (EDT)
committerEugene Tarassov2012-05-23 18:10:33 (EDT)
commit37940049e04705a07d89438664c461e761189d8f (patch)
tree6370962150b1fdf01649d2e3efe137d7b79e83c7
parent15514a12599b48f9c829555444bb532b9bf8128e (diff)
downloadorg.eclipse.tcf-37940049e04705a07d89438664c461e761189d8f.zip
org.eclipse.tcf-37940049e04705a07d89438664c461e761189d8f.tar.gz
org.eclipse.tcf-37940049e04705a07d89438664c461e761189d8f.tar.bz2
Corrected expression retrieval logic.
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/preferences/BreakpointPreferencePage.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/preferences/BreakpointPreferencePage.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/preferences/BreakpointPreferencePage.java
index d9f8eac..2733c86 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/preferences/BreakpointPreferencePage.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/preferences/BreakpointPreferencePage.java
@@ -92,15 +92,17 @@ public class BreakpointPreferencePage extends FieldEditorPreferencePage implemen
IDialogSettings dialogSettings = getBreakpointScopeDialogSettings();
String[] returnList = null;
String[] expressionList = null;
+ int index = 0;
if ( dialogSettings != null ) {
expressionList = dialogSettings.getArray(Messages.TCFThreadFilterQueryExpressionStore);
- int index;
// Find if there is a null entry.
- for(index = 0; index < expressionList.length; index++) {
- String member = expressionList[index];
- if (member == null || member.length() == 0) {
- break;
+ if ( expressionList != null ) {
+ for(index = 0; index < expressionList.length; index++) {
+ String member = expressionList[index];
+ if (member == null || member.length() == 0) {
+ break;
+ }
}
}
returnList = new String[index+1];
@@ -109,6 +111,9 @@ public class BreakpointPreferencePage extends FieldEditorPreferencePage implemen
returnList[loop+1] = expressionList[loop];
}
}
+ else
+ returnList = new String[index];
+
return returnList;
}
@@ -136,7 +141,7 @@ public class BreakpointPreferencePage extends FieldEditorPreferencePage implemen
part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
}
if (part != null) {
- ISelection selection = part.getSite().getWorkbenchWindow().getSelectionService().getSelection();
+ ISelection selection = part.getSite().getSelectionProvider().getSelection();
Set<?> enablers = DebugUITools.getToggleBreakpointsTargetManager().getEnabledToggleBreakpointsTargetIDs(part, selection);
if (enablers != null &&