mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Reformat with context on postponed formatting: fixed groovy test data
This commit is contained in:
+9
-9
@@ -322,7 +322,7 @@ def foo = {String s ->
|
||||
|
||||
foo('a')
|
||||
''', '''
|
||||
def foo = {String s, Closure closure ->
|
||||
def foo = { String s, Closure closure ->
|
||||
s+=2
|
||||
<selection>closure(s)</selection>
|
||||
}
|
||||
@@ -342,7 +342,7 @@ class X {
|
||||
new X().foo('a')
|
||||
''', '''
|
||||
class X {
|
||||
def foo = {Closure closure ->
|
||||
def foo = { Closure closure ->
|
||||
<selection>closure()</selection>
|
||||
}
|
||||
}
|
||||
@@ -362,7 +362,7 @@ def foo = {String s ->
|
||||
|
||||
foo('a')
|
||||
''', '''
|
||||
def foo = {Closure closure ->
|
||||
def foo = { Closure closure ->
|
||||
closure()
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ class X {
|
||||
new X().foo('a')
|
||||
''', '''
|
||||
class X {
|
||||
def foo = {Closure closure ->
|
||||
def foo = { Closure closure ->
|
||||
<selection>closure()</selection>
|
||||
}
|
||||
def bar(){}
|
||||
@@ -407,7 +407,7 @@ def foo = {int x, int y ->
|
||||
|
||||
foo(2, 3)
|
||||
''', '''
|
||||
def foo = {Closure closure ->
|
||||
def foo = { Closure closure ->
|
||||
int a = 5
|
||||
<selection>closure(a)</selection>
|
||||
}
|
||||
@@ -430,7 +430,7 @@ def adventure = {
|
||||
|
||||
adventure()
|
||||
''', '''
|
||||
def adventure = {Closure closure ->
|
||||
def adventure = { Closure closure ->
|
||||
|
||||
try {
|
||||
<caret>closure()
|
||||
@@ -463,7 +463,7 @@ def killMonsters(){2}
|
||||
def collectLoot(){3}
|
||||
def becomeTownGuard(){}
|
||||
''', '''
|
||||
def adventure = {Closure<Integer> closure ->
|
||||
def adventure = { Closure<Integer> closure ->
|
||||
try {
|
||||
def skill = <selection>closure()</selection>
|
||||
} catch (ArrowToKneeException e) {
|
||||
@@ -499,7 +499,7 @@ class Some {
|
||||
private static int smth = 1
|
||||
private static void doSmth() {}
|
||||
|
||||
void m1 = {<caret>Closure closure ->
|
||||
void m1 = {<caret> Closure closure ->
|
||||
|
||||
closure()
|
||||
}
|
||||
@@ -520,7 +520,7 @@ void foo = {
|
||||
}
|
||||
foo()
|
||||
''', '''
|
||||
void foo = {Closure<Character> closure ->
|
||||
void foo = { Closure<Character> closure ->
|
||||
def s = <selection><caret>closure()</selection>
|
||||
}
|
||||
foo { return "zxcvbn".substring(2).charAt(1) }
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ def cl = {
|
||||
}
|
||||
cl()
|
||||
''', '''\
|
||||
def cl = {String anObject ->
|
||||
def cl = { String anObject ->
|
||||
print 'a' + anObject<caret> + 'c'
|
||||
}
|
||||
cl('b')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
foo(1, 2, 3) <begin>{x->x}<end>
|
||||
-----
|
||||
def preved = {x->x}
|
||||
def preved = { x->x}
|
||||
foo(1, 2, 3, preved<caret>)
|
||||
@@ -1,4 +1,4 @@
|
||||
foo(1, 2, 3) {x -> x} {x -> y} <all>{x->x}<end> {x -> z}
|
||||
-----
|
||||
def preved = {x->x}
|
||||
foo(1, 2, 3, preved, { x -> y }, preved<caret>) {x -> z}
|
||||
def preved = { x->x}
|
||||
foo(1, 2, 3, preved, { x -> y }, preved<caret>) { x -> z}
|
||||
@@ -1,4 +1,4 @@
|
||||
foo(1, 2, 3) {x -> x} {x -> y} <begin>{x->x}<end> {x -> z}
|
||||
-----
|
||||
def preved = {x->x}
|
||||
foo(1, 2, 3, { x -> x }, { x -> y }, preved<caret>) {x -> z}
|
||||
def preved = { x->x}
|
||||
foo(1, 2, 3, { x -> x }, { x -> y }, preved<caret>) { x -> z}
|
||||
@@ -2,5 +2,5 @@
|
||||
foo {x->x} {x->x} {x->x} (3) {x->x}
|
||||
|
||||
-----
|
||||
def preved = {x->x}<caret>
|
||||
def preved = { x->x}<caret>
|
||||
foo(preved, preved, preved)(3, preved)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<all>{x->x}<end>
|
||||
if (true) ({x->x})
|
||||
-----
|
||||
def preved = {x->x}<caret>
|
||||
def preved = { x->x}<caret>
|
||||
if (true) preved
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
def foo = {Map params, jjj ->
|
||||
def foo = { Map params, jjj ->
|
||||
println params.iii
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ def foo = { Map attrs, cl1 ->
|
||||
attrs.cl2.call()
|
||||
}
|
||||
|
||||
foo(cl2: { y -> y }) {x->x}
|
||||
foo(cl2: { y -> y }) { x->x}
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
Closure clos = {String anObject -> println anObject }
|
||||
Closure clos = { String anObject -> println anObject }
|
||||
if ([1, 2, 3].length()>1) {clos.call("test")}
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
Closure clos = {String anObject -> println anObject }
|
||||
Closure clos = { String anObject -> println anObject }
|
||||
[1, 2, 3].each {clos}
|
||||
+1
-1
@@ -4,7 +4,7 @@ clos = {print "foo"}
|
||||
clos()
|
||||
clos.call()
|
||||
|
||||
clos = {String anObject -> print anObject }
|
||||
clos = { String anObject -> print anObject }
|
||||
clos("foo")
|
||||
clos.call("foo")
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
def a = {int x, int anObject ->
|
||||
def a = { int x, int anObject ->
|
||||
print x+ anObject
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
def a = {int x, int z, int anObject ->
|
||||
def a = { int x, int z, int anObject ->
|
||||
print anObject + x+z
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
Closure clos
|
||||
clos= {String anObject -> print anObject }
|
||||
clos= { String anObject -> print anObject }
|
||||
clos("foo")
|
||||
clos.call("foo")
|
||||
|
||||
Reference in New Issue
Block a user