feat: enable conditional breakpoints#1398
Conversation
| // removed legacy reflection-based TM4E viewer creation | ||
|
|
||
| private void hookListeners() { | ||
| enableConditionButton.addSelectionListener(widgetSelectedAdapter(e -> { |
Check notice
Code scanning / CodeQL
Useless parameter
| } | ||
| }); | ||
|
|
||
| enableHitConditionButton.addSelectionListener(widgetSelectedAdapter(e -> { |
Check notice
Code scanning / CodeQL
Useless parameter
| } | ||
| }); | ||
|
|
||
| columnSpinner.addSelectionListener(widgetSelectedAdapter(e -> { |
Check notice
Code scanning / CodeQL
Useless parameter
|
Awesome addition! |
|
|
||
| @Override | ||
| public void display(final IStructuredSelection selection) { | ||
| final var selectedBP_ = selectedBP = getSelectedBreakPoint(selection); |
There was a problem hiding this comment.
what about prepending the for this kind of variables instead of appending _? It looks more readable to me.
| final var selectedBP_ = selectedBP = getSelectedBreakPoint(selection); | |
| final var theSelectedBP = selectedBP = getSelectedBreakPoint(selection); |
There was a problem hiding this comment.
I am also not happy with that. However, I’d like to propose an alternative.
I created a custom CodeQL rule that allows the pattern we currently use to satisfy Eclipse null analysis:
final var varname = this.varname;At the same time, the rule disallows both shadowing with non-final assignments:
var varname = this.varname;and assignments of different values:
var varname = this.foobar;
var varname = "somevalue";This strikes a good balance and avoids the usual confusion that variable shadowing can introduce.
93c0873 to
f8a4b2b
Compare
This PR contributes a detail pane to the Break Points View allowing to specify condition (with optional TM4E based syntax highlighting), hit condition and breakpoint column.
Fixes #1136