Skip to content

Commit 9d217fa

Browse files
committed
Simplify breakpoint editors
1 parent 510bf17 commit 9d217fa

File tree

6 files changed

+10
-14
lines changed

6 files changed

+10
-14
lines changed

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ public final class JavaBreakpointConditionEditor extends AbstractJavaBreakpointE
170170
* Creates a new Java breakpoint condition editor.
171171
*/
172172
public JavaBreakpointConditionEditor() {
173+
this(null);
173174
}
174175

175176
/**
@@ -180,7 +181,8 @@ public JavaBreakpointConditionEditor() {
180181
* @since 3.6
181182
*/
182183
public JavaBreakpointConditionEditor(IDialogSettings dialogSettings) {
183-
fConditionHistoryDialogSettings= dialogSettings != null ? dialogSettings : DialogSettings.getOrCreateSection(JDIDebugUIPlugin.getDefault().getDialogSettings(), DS_SECTION_CONDITION_HISTORY);
184+
fConditionHistoryDialogSettings = dialogSettings != null ? dialogSettings
185+
: DialogSettings.getOrCreateSection(JDIDebugUIPlugin.getDefault().getDialogSettings(), DS_SECTION_CONDITION_HISTORY);
184186
}
185187

186188
/**
@@ -842,5 +844,4 @@ private void checkIfUsedInBreakpointsView() {
842844
}
843845
}
844846
}
845-
846847
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/CompositeBreakpointEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class CompositeBreakpointEditor extends AbstractJavaBreakpointEditor {
3131

3232
private AbstractJavaBreakpointEditor[] fEditors;
3333

34-
public CompositeBreakpointEditor(AbstractJavaBreakpointEditor[] editors) {
34+
public CompositeBreakpointEditor(AbstractJavaBreakpointEditor... editors) {
3535
fEditors = editors;
3636
}
3737

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/LineBreakpointDetailPane.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ public LineBreakpointDetailPane() {
4343
*/
4444
@Override
4545
protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
46-
return new CompositeBreakpointEditor(
47-
new AbstractJavaBreakpointEditor[] {new StandardJavaBreakpointEditor(), new JavaBreakpointConditionEditor(null)});
46+
return new CompositeBreakpointEditor(new StandardJavaBreakpointEditor(), new JavaBreakpointConditionEditor());
4847
}
4948

5049
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/MethodBreakpointDetailPane.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ public MethodBreakpointDetailPane() {
4747
*/
4848
@Override
4949
protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
50-
return new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[]
51-
{new MethodBreakpointEditor(), new JavaBreakpointConditionEditor(null)});
50+
return new CompositeBreakpointEditor(new MethodBreakpointEditor(), new JavaBreakpointConditionEditor());
5251
}
5352

5453
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/WatchpointDetailPane.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public WatchpointDetailPane() {
4646
*/
4747
@Override
4848
protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
49-
return new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] { new WatchpointEditor(), new JavaBreakpointConditionEditor(null) });
49+
return new CompositeBreakpointEditor(new WatchpointEditor(), new JavaBreakpointConditionEditor());
5050
}
5151

5252
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,19 +334,16 @@ protected void createTypeSpecificEditors(Composite parent) {
334334
fEditor = new StandardJavaBreakpointEditor();
335335
} else if (JavaLineBreakpoint.JAVA_LINE_BREAKPOINT.equals(type)) {
336336
setTitle(PropertyPageMessages.JavaLineBreakpointPage_18);
337-
fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[]
338-
{new StandardJavaBreakpointEditor(), new JavaBreakpointConditionEditor(null)});
337+
fEditor = new CompositeBreakpointEditor(new StandardJavaBreakpointEditor(), new JavaBreakpointConditionEditor());
339338
} else if (JavaExceptionBreakpoint.JAVA_EXCEPTION_BREAKPOINT.equals(type)) {
340339
setTitle(PropertyPageMessages.JavaExceptionBreakpointPage_5);
341340
fEditor = new ExceptionBreakpointEditor();
342341
} else if (JavaWatchpoint.JAVA_WATCHPOINT.equals(type)) {
343342
setTitle(PropertyPageMessages.JavaLineBreakpointPage_19);
344-
fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] { new WatchpointEditor(),
345-
new JavaBreakpointConditionEditor(null) });
343+
fEditor = new CompositeBreakpointEditor(new WatchpointEditor(), new JavaBreakpointConditionEditor());
346344
} else if (JavaMethodBreakpoint.JAVA_METHOD_BREAKPOINT.equals(type)) {
347345
setTitle(PropertyPageMessages.JavaLineBreakpointPage_20);
348-
fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[]
349-
{new MethodBreakpointEditor(), new JavaBreakpointConditionEditor(null)});
346+
fEditor = new CompositeBreakpointEditor(new MethodBreakpointEditor(), new JavaBreakpointConditionEditor());
350347
} else {
351348
// use standard editor for any other kind of breakpoint (@see bug 325161)
352349
fEditor = new StandardJavaBreakpointEditor();

0 commit comments

Comments
 (0)