-
Notifications
You must be signed in to change notification settings - Fork 59
Extended support for in-line chained lambdas #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
205492e to
585495e
Compare
|
@iloveeclipse - Could you please review when you get time ? |
915c89c to
b18cbcf
Compare
|
random Test failure -> #719 |
abeac62 to
698f7ad
Compare
|
@iloveeclipse I have resolved the merge conflicts 👍 |
iloveeclipse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few impressions after a quick black box test, without looking into the code.
In general, the idea is useful, but implementation has at least one major bug and also UI needs to be polished.
Take the file below and try that below:
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
public class BreakpointsTest {
public static void main(String[] args) {
callMe();
}
private static void callMe() {
BreakpointsTest t = new BreakpointsTest();
t.lotOfLambdas();
}
void lotOfLambdas() {
Optional.of("aa").map(this::a6).filter(x -> x.isBlank()).map(this::a6);
List<String> list = Arrays.asList("a", "b", "c");
list.stream().filter(s -> s.length() > 0).map(s -> s.toLowerCase()).filter(x -> x.charAt(0) > 1).map(s -> s.toUpperCase()).filter(k -> k.indexOf(0) < 0).map(s -> s.toLowerCase()).filter(p -> !p.isBlank()).forEach(System.out::println);
list.stream().filter(s -> s.length() > 0).map(s -> s.toLowerCase()).filter(x -> x.charAt(0) > 1).map(s -> s.toUpperCase())
.filter(k -> k.indexOf(0) < 0).map(s -> s.toLowerCase()).filter(p -> !p.isBlank()).forEach(System.out::println);
list.stream().filter(s -> s.length() > 0).map(s -> s.toLowerCase()).filter(x -> x.charAt(0) > 1)
.map(s -> s.toUpperCase()).filter(k -> {
System.out.println(k);
return k.indexOf(0) < 0;
}).map(s -> s.toLowerCase()).filter(p -> !p.isBlank()).forEach(t -> {
if(t.contains("a")) {
System.out.println(t + "!!!");
}
});
}
String a6(String s) {
return s;
}
}
- Major bug: "Toggle Breakpoint" works to create breakpoints but is broken for deleting breakpoints, breakpoints can't be removed from editor anymore (only via Breakpoints view). It seem breakpoints can be "toggled" only on lines where lambda breakpoints can be created via "Toggle Lambda Breakpoint" menu.
- Bug: if one closes lambda proposal dialog by "cancel", no breakpoint is created but on next double click on same line no lambda proposals dialog is shown and a regular breakpoint is created. Expectation is: on "Cancel" nothing is created and no behavior is changed. After playing with that for some time I was not able to show up lambda selection dialog anymore, independently what I've tried - without any error in the log.
- UI problem: the shown list of lambda's is resizable but the content inside is fixed.
- UI problem: extra line added for block expressions:

Thanks for testing, will fix and get back 👍 |
Fixed
Lambda proposal is only shown when user do Right click->Toggle lambda Entry breakpoint . Double click creates Line breakpoint only
Strange. I tried many times and it was working for me, can you try again ? or share the exact same step you tried
Fixed
Handled |
aae6f4e to
f7cdc9e
Compare
62446fb to
fa1c386
Compare
|
@iloveeclipse could you please check this again ? |
fa1c386 to
dc09280
Compare
|
Hi @iloveeclipse |
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
4988790 to
8972eba
Compare
|
Hi @iloveeclipse |
|
I hope to find time tomorrow |
I believe once this sync feature is added one could clearly link with selection because the popup will always open few distance below the actual code |
1d53a41 to
a077106
Compare
I've slightly modified the dialog from my patch. Now user can select something in editor. I would prefer to use this dialog, all what is needed now is to set dialog selection on cursor changes, which you seem to done already in private patch. If you could apply this patch to the dialog, we could be all happy I assume. |
9989b60 to
7c76bce
Compare
b678fe1 to
3cb8f9b
Compare
|
If there are no more changes can this be merged ? |
org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/BreakpointMarkerUpdater.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
|
I will now fix remaining items, squash everyting and update the PR. |
3cb8f9b to
9398bfd
Compare
org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaMethodBreakpoint.java
Outdated
Show resolved
Hide resolved
9398bfd to
75b4138
Compare
PR updated 👍 |
iloveeclipse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did final pass through the changes, see comments.
I will fix all code comments in a dedicated commit to show the differences and then squash all together once again.
org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/BreakpointMarkerUpdater.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Show resolved
Hide resolved
...lipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
Outdated
Show resolved
Hide resolved
...eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/LambdaCollector.java
Outdated
Show resolved
Hide resolved
...eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/LambdaCollector.java
Outdated
Show resolved
Hide resolved
Allow users to put a lambda entry breakpoint on a selected lambda if line contains multiple chained lambda expressions. Fixes : eclipse-jdt#732 Co-authored-by: Andrey Loskutov <[email protected]>
ccda90d to
7acc280
Compare
|
@SougandhS : thanks for the feature. Please provide N&N entry. PS: |




This pr enables users to select a lambda in a single-line chained lambda expressions to put a lambda entry breakpoint + updated chained lambda breakpoint names in breakpoints view
Fixes : #732
On toggling lambda entry breakpoint on chained lambda exps

Debugger will show an UI to select the indented lambda of user's choice
User can select the lambda inside the small popup either by double click or click->select via button,
On selecting, breakpoint will be added specific to that lambda
LambdaNew.mp4
What it does
How to test
Author checklist