Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 298946
Collapse All | Expand All

(-)ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java (-6 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 IBM Corporation and others.
2
 * Copyright (c) 2009, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 166-177 Link Here
166
		fViewer.setInput(document);
166
		fViewer.setInput(document);
167
		String condition = null;
167
		String condition = null;
168
		IType type = null;
168
		IType type = null;
169
		boolean enabled = false;
169
		boolean controlsEnabled = false;
170
		boolean conditionEnabled = false;
170
		boolean whenTrue = true;
171
		boolean whenTrue = true;
171
		if (breakpoint != null) {
172
		if (breakpoint != null) {
173
			controlsEnabled = true;
172
			if (breakpoint.supportsCondition()) {
174
			if (breakpoint.supportsCondition()) {
173
				condition = breakpoint.getCondition();
175
				condition = breakpoint.getCondition();
174
				enabled = breakpoint.isConditionEnabled();
176
				conditionEnabled = breakpoint.isConditionEnabled();
175
				whenTrue = breakpoint.isConditionSuspendOnTrue();
177
				whenTrue = breakpoint.isConditionSuspendOnTrue();
176
				type = BreakpointUtils.getType(breakpoint);
178
				type = BreakpointUtils.getType(breakpoint);
177
			}
179
			}
Lines 217-230 Link Here
217
            	setDirty(PROP_CONDITION);
219
            	setDirty(PROP_CONDITION);
218
            }
220
            }
219
        };
221
        };
220
		fViewer.getDocument().addDocumentListener(fDocumentListener);		
222
		fViewer.getDocument().addDocumentListener(fDocumentListener);
221
		fConditional.setSelection(enabled);
223
		fConditional.setEnabled(controlsEnabled);
224
		fConditional.setSelection(conditionEnabled);
222
		if (whenTrue) {
225
		if (whenTrue) {
223
			fSuspendBehavior.select(0);
226
			fSuspendBehavior.select(0);
224
		} else {
227
		} else {
225
			fSuspendBehavior.select(1);
228
			fSuspendBehavior.select(1);
226
		}
229
		}
227
		setEnabled(enabled && breakpoint != null && breakpoint.supportsCondition(), false);
230
		setEnabled(conditionEnabled && breakpoint != null && breakpoint.supportsCondition(), false);
228
		setDirty(false);
231
		setDirty(false);
229
	}
232
	}
230
	
233
	
(-)ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardJavaBreakpointEditor.java (-4 / +8 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 IBM Corporation and others.
2
 * Copyright (c) 2009, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 124-142 Link Here
124
	protected void setBreakpoint(IJavaBreakpoint breakpoint) throws CoreException {
124
	protected void setBreakpoint(IJavaBreakpoint breakpoint) throws CoreException {
125
		fBreakpoint = breakpoint;
125
		fBreakpoint = breakpoint;
126
		boolean enabled = false;
126
		boolean enabled = false;
127
		boolean hasHitCount = false;
127
		String text = ""; //$NON-NLS-1$
128
		String text = ""; //$NON-NLS-1$
128
		boolean suspendThread = true;
129
		boolean suspendThread = true;
129
		if (breakpoint != null) {
130
		if (breakpoint != null) {
131
			enabled = true;
130
			int hitCount = breakpoint.getHitCount();
132
			int hitCount = breakpoint.getHitCount();
131
			if (hitCount > 0) {
133
			if (hitCount > 0) {
132
				text = new Integer(hitCount).toString();
134
				text = new Integer(hitCount).toString();
133
				enabled = true;
135
				hasHitCount = true;
134
			}
136
			}
135
			suspendThread= breakpoint.getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD;
137
			suspendThread= breakpoint.getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD;
136
		}
138
		}
137
		fHitCountButton.setSelection(enabled);
139
		fHitCountButton.setEnabled(enabled);
138
		fHitCountText.setEnabled(enabled);
140
		fHitCountButton.setSelection(enabled & hasHitCount);
141
		fHitCountText.setEnabled(hasHitCount);
139
		fHitCountText.setText(text);
142
		fHitCountText.setText(text);
143
		fSuspendPolicy.setEnabled(enabled);
140
		if(suspendThread) {
144
		if(suspendThread) {
141
			fSuspendPolicy.select(0);
145
			fSuspendPolicy.select(0);
142
		} else {
146
		} else {

Return to bug 298946