diff options
author | Yuan Fu <casouri@gmail.com> | 2025-02-13 18:24:41 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2025-03-16 22:44:05 -0700 |
commit | 93cd55f40e5e1788e55d82c572f1fafac1dee499 (patch) | |
tree | a9ec9e9d152f5b4da8c2307871eaaccaba494ad9 /test | |
parent | affb2ba77b4a7ec7c000b18cc5c30d237e1b7165 (diff) | |
download | emacs-93cd55f40e5e1788e55d82c572f1fafac1dee499.tar.gz emacs-93cd55f40e5e1788e55d82c572f1fafac1dee499.tar.bz2 emacs-93cd55f40e5e1788e55d82c572f1fafac1dee499.zip |
Use c-ts-common baseline rule in java-ts-mode (bug#75154)
Use it for function parameters.
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--standalone-predicate): New function.
(java-ts-mode--indent-rules): Comment out rules for function
parameters and statements, and add
c-ts-common-baseline-indent-rule as fallback.
(java-ts-mode): Setup.
(java-ts-mode--first-line-on-multi-line-string): Mark BOL as
unused.
* test/lisp/progmodes/java-ts-mode-resources/indent.erts:
New test.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/progmodes/java-ts-mode-resources/indent.erts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/lisp/progmodes/java-ts-mode-resources/indent.erts b/test/lisp/progmodes/java-ts-mode-resources/indent.erts index 514d2e08977..7cf59340454 100644 --- a/test/lisp/progmodes/java-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/java-ts-mode-resources/indent.erts @@ -141,3 +141,31 @@ public class Java { } } =-=-= + +Name: Method chaining + +=-= +public class FloodFill { +public static void main(String[] args) { +List<Foo> stream = students.stream(MAX_VALUE) +.filter(item -> { +return item.getValue() > 100 && +item.isActive(); +}) +.map() +.collect(); +} +} +=-= +public class FloodFill { + public static void main(String[] args) { + List<Foo> stream = students.stream(MAX_VALUE) + .filter(item -> { + return item.getValue() > 100 && + item.isActive(); + }) + .map() + .collect(); + } +} +=-=-= |