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 310511 | Differences between
and this patch

Collapse All | Expand All

(-)ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java (-2 / +3 lines)
Lines 243-248 Link Here
243
	public Control createControl(Composite parent) {
243
	public Control createControl(Composite parent) {
244
		Composite controls = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
244
		Composite controls = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
245
		fConditional = new Button(controls, SWT.CHECK);
245
		fConditional = new Button(controls, SWT.CHECK);
246
		fConditional.setFont(controls.getFont());
246
		fConditional.setText(processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_0));
247
		fConditional.setText(processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_0));
247
		fConditional.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
248
		fConditional.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
248
		fConditional.addSelectionListener(new SelectionAdapter() {
249
		fConditional.addSelectionListener(new SelectionAdapter() {
Lines 253-261 Link Here
253
			}
254
			}
254
		});
255
		});
255
		Composite radios = SWTFactory.createComposite(controls, controls.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
256
		Composite radios = SWTFactory.createComposite(controls, controls.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
256
		fWhenTrue = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_1));
257
		fWhenTrue = createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_1), 1);
257
		fWhenTrue.setLayoutData(new GridData());
258
		fWhenTrue.setLayoutData(new GridData());
258
		fWhenChange = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_2));
259
		fWhenChange = createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_2), 1);
259
		fWhenChange.setLayoutData(new GridData());
260
		fWhenChange.setLayoutData(new GridData());
260
		fWhenTrue.addSelectionListener(new SelectionAdapter() {
261
		fWhenTrue.addSelectionListener(new SelectionAdapter() {
261
			public void widgetSelected(SelectionEvent e) {
262
			public void widgetSelected(SelectionEvent e) {
(-)ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractJavaBreakpointEditor.java (+53 lines)
Lines 14-19 Link Here
14
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.core.runtime.ListenerList;
15
import org.eclipse.core.runtime.ListenerList;
16
import org.eclipse.jface.action.LegacyActionTools;
16
import org.eclipse.jface.action.LegacyActionTools;
17
import org.eclipse.swt.SWT;
18
import org.eclipse.swt.graphics.Image;
19
import org.eclipse.swt.layout.GridData;
20
import org.eclipse.swt.widgets.Button;
17
import org.eclipse.swt.widgets.Composite;
21
import org.eclipse.swt.widgets.Composite;
18
import org.eclipse.swt.widgets.Control;
22
import org.eclipse.swt.widgets.Control;
19
import org.eclipse.ui.IPropertyListener;
23
import org.eclipse.ui.IPropertyListener;
Lines 32-37 Link Here
32
    private boolean fSuppressPropertyChanges = false;
36
    private boolean fSuppressPropertyChanges = false;
33
	
37
	
34
	/**
38
	/**
39
	 * Avoids the SWT Factory that sets the font to be the dialog font. Does not set dimension hints.
40
	 * 
41
	 * @param parent the parent to add the button to
42
	 * @param label the label for the button
43
	 * @param image the image for the button 
44
	 * @param checked the initial checked state of the button
45
	 * @param hspan the horizontal span to take up in the parent composite
46
	 * @return a new checked button set to the initial checked state
47
	 * @since 3.3
48
	 */
49
	public static Button createCheckButton(Composite parent, String label, Image image, boolean checked, int hspan) {
50
		Button button = new Button(parent, SWT.CHECK);
51
		button.setFont(parent.getFont());
52
		button.setSelection(checked);
53
		if(image != null) {
54
			button.setImage(image);
55
		}
56
		if(label != null) {
57
			button.setText(label);
58
		}
59
		GridData gd = new GridData();
60
		gd.horizontalSpan = hspan;
61
		button.setLayoutData(gd);
62
		return button;
63
	}
64
	
65
	/**
66
	 * Avoids SWT Factory that set the font to be the dialog font. Does not set dimension hints.
67
	 * 
68
	 * @param parent parent control
69
	 * @param label button label or <code>null</code>
70
	 * @param hspan the number of columns to span in the parent composite
71
	 * 
72
	 * @return a new radio button
73
	 * @since 3.6
74
	 */
75
	public static Button createRadioButton(Composite parent, String label, int hspan) {
76
		Button button = new Button(parent, SWT.RADIO);
77
		button.setFont(parent.getFont());
78
		if (label != null) {
79
			button.setText(label);
80
		}
81
		GridData gd = new GridData(GridData.BEGINNING);
82
		gd.horizontalSpan = hspan;
83
		button.setLayoutData(gd);	
84
		return button;	
85
	}	
86
	
87
	/**
35
	 * Adds the given property listener to this editor. Property changes
88
	 * Adds the given property listener to this editor. Property changes
36
	 * are reported on the breakpoint being edited. Property identifiers
89
	 * are reported on the breakpoint being edited. Property identifiers
37
	 * are breakpoint attribute keys.
90
	 * are breakpoint attribute keys.
(-)ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardJavaBreakpointEditor.java (-3 / +3 lines)
Lines 65-71 Link Here
65
	
65
	
66
	protected Control createStandardControls(Composite parent) {
66
	protected Control createStandardControls(Composite parent) {
67
		Composite composite = SWTFactory.createComposite(parent, parent.getFont(), 4, 1, 0, 0, 0);
67
		Composite composite = SWTFactory.createComposite(parent, parent.getFont(), 4, 1, 0, 0, 0);
68
		fHitCountButton = SWTFactory.createCheckButton(composite, processMnemonics(PropertyPageMessages.JavaBreakpointPage_4), null, false, 1);
68
		fHitCountButton = createCheckButton(composite, processMnemonics(PropertyPageMessages.JavaBreakpointPage_4), null, false, 1);
69
		fHitCountButton.setLayoutData(new GridData());
69
		fHitCountButton.setLayoutData(new GridData());
70
		fHitCountButton.addSelectionListener(new SelectionAdapter() {
70
		fHitCountButton.addSelectionListener(new SelectionAdapter() {
71
			public void widgetSelected(SelectionEvent event) {
71
			public void widgetSelected(SelectionEvent event) {
Lines 87-95 Link Here
87
		});
87
		});
88
		SWTFactory.createLabel(composite, "", 1); // spacer //$NON-NLS-1$
88
		SWTFactory.createLabel(composite, "", 1); // spacer //$NON-NLS-1$
89
		Composite radios = SWTFactory.createComposite(composite, composite.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
89
		Composite radios = SWTFactory.createComposite(composite, composite.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
90
		fSuspendThread = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointPage_7), 1);
90
		fSuspendThread = createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointPage_7), 1);
91
		fSuspendThread.setLayoutData(new GridData());
91
		fSuspendThread.setLayoutData(new GridData());
92
		fSuspendVM = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointPage_8), 1);
92
		fSuspendVM = createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointPage_8), 1);
93
		fSuspendVM.setLayoutData(new GridData());
93
		fSuspendVM.setLayoutData(new GridData());
94
		fSuspendThread.addSelectionListener(new SelectionAdapter() {
94
		fSuspendThread.addSelectionListener(new SelectionAdapter() {
95
			public void widgetSelected(SelectionEvent e) {
95
			public void widgetSelected(SelectionEvent e) {

Return to bug 310511