From c4212687c8687f198fd31ed356952ecda1796096 Mon Sep 17 00:00:00 2001 From: Dobromir Marinov Date: Wed, 10 Nov 2021 18:22:24 +0000 Subject: [PATCH 1/3] * Added attr unit tests. --- src/test/java/ReconCodeFormattingTests.java | 3 +++ .../formatting/expected/attr-nested-body-collapse.recon | 3 +++ .../testData/formatting/expected/attr-nested-collapse.recon | 1 + .../testData/formatting/expected/attr-nested-format.recon | 1 + .../formatting/input/attr-nested-body-collapse.recon | 5 +++++ .../testData/formatting/input/attr-nested-collapse.recon | 2 ++ src/test/testData/formatting/input/attr-nested-format.recon | 1 + 7 files changed, 16 insertions(+) create mode 100644 src/test/testData/formatting/expected/attr-nested-body-collapse.recon create mode 100644 src/test/testData/formatting/expected/attr-nested-collapse.recon create mode 100644 src/test/testData/formatting/expected/attr-nested-format.recon create mode 100644 src/test/testData/formatting/input/attr-nested-body-collapse.recon create mode 100644 src/test/testData/formatting/input/attr-nested-collapse.recon create mode 100644 src/test/testData/formatting/input/attr-nested-format.recon diff --git a/src/test/java/ReconCodeFormattingTests.java b/src/test/java/ReconCodeFormattingTests.java index c045df9..734e50d 100644 --- a/src/test/java/ReconCodeFormattingTests.java +++ b/src/test/java/ReconCodeFormattingTests.java @@ -13,6 +13,9 @@ public void testFormatting() { tests.add("attr-after-slot-expand.recon"); tests.add("attr-collapse.recon"); tests.add("attr-expand.recon"); + tests.add("attr-nested-body-collapse.recon"); + tests.add("attr-nested-collapse.recon"); + tests.add("attr-nested-format.recon"); tests.add("attr-record-no-change.recon"); tests.add("attr-spaces-between.recon"); tests.add("cellular-collapse.recon"); diff --git a/src/test/testData/formatting/expected/attr-nested-body-collapse.recon b/src/test/testData/formatting/expected/attr-nested-body-collapse.recon new file mode 100644 index 0000000..e17ef11 --- /dev/null +++ b/src/test/testData/formatting/expected/attr-nested-body-collapse.recon @@ -0,0 +1,3 @@ +@first { + @second(@third) +} \ No newline at end of file diff --git a/src/test/testData/formatting/expected/attr-nested-collapse.recon b/src/test/testData/formatting/expected/attr-nested-collapse.recon new file mode 100644 index 0000000..07342d3 --- /dev/null +++ b/src/test/testData/formatting/expected/attr-nested-collapse.recon @@ -0,0 +1 @@ +@first(@attr) \ No newline at end of file diff --git a/src/test/testData/formatting/expected/attr-nested-format.recon b/src/test/testData/formatting/expected/attr-nested-format.recon new file mode 100644 index 0000000..07342d3 --- /dev/null +++ b/src/test/testData/formatting/expected/attr-nested-format.recon @@ -0,0 +1 @@ +@first(@attr) \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-nested-body-collapse.recon b/src/test/testData/formatting/input/attr-nested-body-collapse.recon new file mode 100644 index 0000000..2385ba6 --- /dev/null +++ b/src/test/testData/formatting/input/attr-nested-body-collapse.recon @@ -0,0 +1,5 @@ +@first { + @second + + (@third) +} \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-nested-collapse.recon b/src/test/testData/formatting/input/attr-nested-collapse.recon new file mode 100644 index 0000000..d1baaa4 --- /dev/null +++ b/src/test/testData/formatting/input/attr-nested-collapse.recon @@ -0,0 +1,2 @@ +@first +(@attr) \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-nested-format.recon b/src/test/testData/formatting/input/attr-nested-format.recon new file mode 100644 index 0000000..07342d3 --- /dev/null +++ b/src/test/testData/formatting/input/attr-nested-format.recon @@ -0,0 +1 @@ +@first(@attr) \ No newline at end of file From 423ddda78ec76d1635073b4f6d979516fccf3e21 Mon Sep 17 00:00:00 2001 From: Dobromir Marinov Date: Fri, 10 Dec 2021 14:21:52 +0000 Subject: [PATCH 2/3] * Fix for attributes with body. * Added more unit tests. --- .../swim/formatting/ReconFormattingModelBuilder.java | 5 ++++- src/main/java/org/swim/language/Recon.bnf | 11 +++++++---- src/test/java/ReconCodeFormattingTests.java | 4 ++++ .../expected/attr-in-attr-header-expand.recon | 6 ++++++ .../formatting/expected/attr-nested-expand.recon | 5 +++++ .../formatting/expected/attr-record-collapse.recon | 3 +++ .../formatting/expected/attr-slot-expand.recon | 5 +++++ .../formatting/expected/attr-spaces-between.recon | 4 +--- .../formatting/input/attr-in-attr-header-expand.recon | 1 + .../formatting/input/attr-nested-body-collapse.recon | 4 +--- .../formatting/input/attr-nested-expand.recon | 1 + .../formatting/input/attr-record-collapse.recon | 4 ++++ .../testData/formatting/input/attr-slot-expand.recon | 1 + .../testData/formatting/input/cellular-collapse.recon | 6 +----- .../testData/formatting/input/cellular-expand.recon | 7 ++++++- .../formatting/input/client-config-collapse.recon | 4 +--- src/test/testData/formatting/input/rosa-expand.recon | 3 ++- .../testData/formatting/input/tmforum-expand.recon | 6 +++++- .../formatting/input/trafficware-expand.recon | 4 +++- .../testData/formatting/input/transit-expand.recon | 5 ++++- 20 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 src/test/testData/formatting/expected/attr-in-attr-header-expand.recon create mode 100644 src/test/testData/formatting/expected/attr-nested-expand.recon create mode 100644 src/test/testData/formatting/expected/attr-record-collapse.recon create mode 100644 src/test/testData/formatting/expected/attr-slot-expand.recon create mode 100644 src/test/testData/formatting/input/attr-in-attr-header-expand.recon create mode 100644 src/test/testData/formatting/input/attr-nested-expand.recon create mode 100644 src/test/testData/formatting/input/attr-record-collapse.recon create mode 100644 src/test/testData/formatting/input/attr-slot-expand.recon diff --git a/src/main/java/org/swim/formatting/ReconFormattingModelBuilder.java b/src/main/java/org/swim/formatting/ReconFormattingModelBuilder.java index 7206994..f3a42d6 100644 --- a/src/main/java/org/swim/formatting/ReconFormattingModelBuilder.java +++ b/src/main/java/org/swim/formatting/ReconFormattingModelBuilder.java @@ -60,7 +60,10 @@ private static SpacingBuilder createSpaceBuilder(CodeStyleSettings settings) { builder.after(ReconTypes.OPEN_BRACK).spaces(0); builder.before(ReconTypes.OPEN_BRACK).spaces(0); builder.before(ReconTypes.CLOSE_BRACK).spaces(0); - builder.between(ReconTypes.ATTRIBUTE, ReconTypes.ATTRIBUTE).lineBreakInCode(); + builder.between(ReconTypes.ATTRIBUTE, ReconTypes.ATTRIBUTE).spaces(1); + builder.between(ReconTypes.ATTRIBUTE, ReconTypes.COMPLEX_ATTR_HEADER).none(); + builder.between(ReconTypes.ATTR, ReconTypes.ATTRIBUTE).spaces(1); + builder.between(ReconTypes.CLOSE_BRACK, ReconTypes.ATTRIBUTE).spaces(1); builder.between(ReconTypes.ATTRIBUTE, ReconTypes.PRIMITIVE).lineBreakInCode(); builder.between(ReconTypes.LITERAL, ReconTypes.ATTRIBUTE).lineBreakInCode(); builder.between(ReconTypes.ATTRIBUTE, ReconTypes.RECORD).spaceIf(settings.getCommonSettings(ReconLanguage.INSTANCE.getID()).SPACE_BEFORE_CLASS_LBRACE); diff --git a/src/main/java/org/swim/language/Recon.bnf b/src/main/java/org/swim/language/Recon.bnf index f9aeb6a..0d8cb8e 100644 --- a/src/main/java/org/swim/language/Recon.bnf +++ b/src/main/java/org/swim/language/Recon.bnf @@ -13,20 +13,23 @@ tokenTypeClass="org.swim.language.psi.ReconTokenType" } -reconFile ::= (attribute | record | slots | blockItem | literal | operation | COMMENT | whiteSpace)* +reconFile ::= (slots | attribute | record | blockItem | literal | operation | COMMENT | whiteSpace)* blockItem ::= OPEN_BRACK? SP* (literal SP* (attribute SP* CLOSE_BRACK? operation? whiteSpace* blockItem?)? | ((attribute SP* CLOSE_BRACK? operation?) SP*)+ ((primitive !COL) + | whiteSpace* !(OPEN_CRL_BRACK | ATTR | literal) complexAttrHeader | (blockItem !COL) | record)?) | COMMENT +complexAttrHeader ::= blockItem CLOSE_BRACK? + operation ::= whiteSpace* OPERATOR whiteSpace* primitive ::= DATA | IDENT | STRING | NUM | BOOL | HEX literal ::= record | primitive -attribute ::= ATTR SP* (whiteSpace* OPEN_BRACK attr_block? CLOSE_BRACK)? +attribute ::= ATTR SP* (whiteSpace* OPEN_BRACK (attribute | attr_block)? CLOSE_BRACK)? attribute? attr_block ::= whiteSpace* attr_slots whiteSpace* @@ -34,12 +37,12 @@ attr_slots ::= (empty_slot SP* (NL | SEP) whiteSpace* attr_slots?) | (slot SP* ( slots ::= (empty_slot SP* (NL | SEP) whiteSpace* slots?) | (slot SP* (((whiteSpace* SEP) | NL) whiteSpace* slots?)?) -slot ::= blockItem (whiteSpace* COL whiteSpace* blockItem)? +slot ::= (blockItem | attribute) (whiteSpace* COL whiteSpace* (blockItem | attribute))? empty_slot ::= blockItem whiteSpace* COL block ::= whiteSpace* slots whiteSpace* -record ::= whiteSpace* OPEN_CRL_BRACK block? whiteSpace* CLOSE_CRL_BRACK +record ::= SP* OPEN_CRL_BRACK block? whiteSpace* CLOSE_CRL_BRACK whiteSpace ::= NL | SP \ No newline at end of file diff --git a/src/test/java/ReconCodeFormattingTests.java b/src/test/java/ReconCodeFormattingTests.java index 734e50d..1f9db97 100644 --- a/src/test/java/ReconCodeFormattingTests.java +++ b/src/test/java/ReconCodeFormattingTests.java @@ -13,11 +13,15 @@ public void testFormatting() { tests.add("attr-after-slot-expand.recon"); tests.add("attr-collapse.recon"); tests.add("attr-expand.recon"); + tests.add("attr-in-attr-header-expand.recon"); tests.add("attr-nested-body-collapse.recon"); tests.add("attr-nested-collapse.recon"); + tests.add("attr-nested-expand.recon"); tests.add("attr-nested-format.recon"); + tests.add("attr-record-collapse.recon"); tests.add("attr-record-no-change.recon"); tests.add("attr-spaces-between.recon"); + tests.add("attr-slot-expand.recon"); tests.add("cellular-collapse.recon"); tests.add("cellular-expand.recon"); tests.add("client-config-collapse.recon"); diff --git a/src/test/testData/formatting/expected/attr-in-attr-header-expand.recon b/src/test/testData/formatting/expected/attr-in-attr-header-expand.recon new file mode 100644 index 0000000..9f6aa73 --- /dev/null +++ b/src/test/testData/formatting/expected/attr-in-attr-header-expand.recon @@ -0,0 +1,6 @@ +@tag(@first @second(1) { + 1, + name: 2, + true +} +@test) \ No newline at end of file diff --git a/src/test/testData/formatting/expected/attr-nested-expand.recon b/src/test/testData/formatting/expected/attr-nested-expand.recon new file mode 100644 index 0000000..80fea7a --- /dev/null +++ b/src/test/testData/formatting/expected/attr-nested-expand.recon @@ -0,0 +1,5 @@ +@tag(@first @second(1) { + 1, + name: 2, + true +}) \ No newline at end of file diff --git a/src/test/testData/formatting/expected/attr-record-collapse.recon b/src/test/testData/formatting/expected/attr-record-collapse.recon new file mode 100644 index 0000000..01e412a --- /dev/null +++ b/src/test/testData/formatting/expected/attr-record-collapse.recon @@ -0,0 +1,3 @@ +@attr(a: 1) +{ +} \ No newline at end of file diff --git a/src/test/testData/formatting/expected/attr-slot-expand.recon b/src/test/testData/formatting/expected/attr-slot-expand.recon new file mode 100644 index 0000000..17d15eb --- /dev/null +++ b/src/test/testData/formatting/expected/attr-slot-expand.recon @@ -0,0 +1,5 @@ +@path { + host: "warp://127.0.0.2:9001", + node: foo, + lane: bar +}: 1 \ No newline at end of file diff --git a/src/test/testData/formatting/expected/attr-spaces-between.recon b/src/test/testData/formatting/expected/attr-spaces-between.recon index 789d5af..60ee5bf 100644 --- a/src/test/testData/formatting/expected/attr-spaces-between.recon +++ b/src/test/testData/formatting/expected/attr-spaces-between.recon @@ -1,3 +1 @@ -@foo() -@bar() -@baz() \ No newline at end of file +@foo() @bar() @baz() \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-in-attr-header-expand.recon b/src/test/testData/formatting/input/attr-in-attr-header-expand.recon new file mode 100644 index 0000000..cf3b1f9 --- /dev/null +++ b/src/test/testData/formatting/input/attr-in-attr-header-expand.recon @@ -0,0 +1 @@ +@tag(@first@second(1){1,name:2,true}@test) \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-nested-body-collapse.recon b/src/test/testData/formatting/input/attr-nested-body-collapse.recon index 2385ba6..3419b6d 100644 --- a/src/test/testData/formatting/input/attr-nested-body-collapse.recon +++ b/src/test/testData/formatting/input/attr-nested-body-collapse.recon @@ -1,5 +1,3 @@ @first { - @second - - (@third) + @second (@third) } \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-nested-expand.recon b/src/test/testData/formatting/input/attr-nested-expand.recon new file mode 100644 index 0000000..832cccb --- /dev/null +++ b/src/test/testData/formatting/input/attr-nested-expand.recon @@ -0,0 +1 @@ +@tag(@first @second(1) { 1, name: 2, true }) \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-record-collapse.recon b/src/test/testData/formatting/input/attr-record-collapse.recon new file mode 100644 index 0000000..cbbdc94 --- /dev/null +++ b/src/test/testData/formatting/input/attr-record-collapse.recon @@ -0,0 +1,4 @@ +@attr(a: 1) +{ + +} \ No newline at end of file diff --git a/src/test/testData/formatting/input/attr-slot-expand.recon b/src/test/testData/formatting/input/attr-slot-expand.recon new file mode 100644 index 0000000..dee66fb --- /dev/null +++ b/src/test/testData/formatting/input/attr-slot-expand.recon @@ -0,0 +1 @@ +@path{host: "warp://127.0.0.2:9001",node: foo,lane: bar}:1 \ No newline at end of file diff --git a/src/test/testData/formatting/input/cellular-collapse.recon b/src/test/testData/formatting/input/cellular-collapse.recon index a00bc51..57faf2d 100644 --- a/src/test/testData/formatting/input/cellular-collapse.recon +++ b/src/test/testData/formatting/input/cellular-collapse.recon @@ -108,11 +108,7 @@ optional -cellular - - - -: @fabric { +cellular: @fabric { @plane(class diff --git a/src/test/testData/formatting/input/cellular-expand.recon b/src/test/testData/formatting/input/cellular-expand.recon index 211f2df..2dc677d 100644 --- a/src/test/testData/formatting/input/cellular-expand.recon +++ b/src/test/testData/formatting/input/cellular-expand.recon @@ -1 +1,6 @@ -@kernel(class:"swim.store.db.DbStoreKernel",optional:true)@kernel(class:"swim.cluster.ClusterKernel",optional:true)@kernel(class:"swim.meta.MetaKernel")@kernel(class:"swim.cellular.CellularUiRouter")@web(port:9008){space:"cellular",@websocket{serverCompressionLevel:0,clientCompressionLevel:0}}cellular:@fabric{@plane(class:"swim.cellular.CellularPlane")@mesh{@part{key:partA,predicate:@node("/site/:id")&&@hash(0x00000000,0x7fffffff),@host{primary:true},}@part{key:partB,predicate:@node("/site/:id")&&@hash(0x80000000,0xffffffff),@host{uri:"warp://localhost:9009",primary:true}}@part{key:,predicate:,gateway:true,@host{primary:true}}}@node{pattern:"/site/:id",@agent(class:"swim.cellular.agent.SiteAgent")}@node{pattern:"/site/:id/sector/:sid",@agent(class:"swim.cellular.agent.SectorAgent")}@node{uri:"/country/US/state/AL",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AL.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AL-ran.recon"}}@node{uri:"/country/US/state/AK",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AK.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AK-ran.recon"}}@node{uri:"/country/US/state/AZ",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AZ.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AZ-ran.recon"}}@node{uri:"/country/US/state/AR",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AR.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AR-ran.recon"}}@node{uri:"/country/US/state/CA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CA-ran.recon"}}@node{uri:"/country/US/state/CO",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CO.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CO-ran.recon"}}@node{uri:"/country/US/state/CT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CT-ran.recon"}}@node{uri:"/country/US/state/DE",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/DE.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/DE-ran.recon"}}@node{uri:"/country/US/state/FL",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/FL.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/FL-ran.recon"}}@node{uri:"/country/US/state/GA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/GA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/GA-ran.recon"}}@node{uri:"/country/US/state/HI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/HI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/HI-ran.recon"}}@node{uri:"/country/US/state/ID",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/ID.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/ID-ran.recon"}}@node{uri:"/country/US/state/IL",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/IL.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/IL-ran.recon"}}@node{uri:"/country/US/state/IN",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/IN.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/IN-ran.recon"}}@node{uri:"/country/US/state/IA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/IA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/IA-ran.recon"}}@node{uri:"/country/US/state/KS",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/KS.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/KS-ran.recon"}}@node{uri:"/country/US/state/KY",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/KY.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/KY-ran.recon"}}@node{uri:"/country/US/state/LA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/LA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/LA-ran.recon"}}@node{uri:"/country/US/state/ME",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/ME.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/ME-ran.recon"}}@node{uri:"/country/US/state/MD",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MD.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MD-ran.recon"}}@node{uri:"/country/US/state/MA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MA-ran.recon"}}@node{uri:"/country/US/state/MI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MI-ran.recon"}}@node{uri:"/country/US/state/MN",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MN.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MN-ran.recon"}}@node{uri:"/country/US/state/MS",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MS.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MS-ran.recon"}}@node{uri:"/country/US/state/MO",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MO.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MO-ran.recon"}}@node{uri:"/country/US/state/MT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MT-ran.recon"}}@node{uri:"/country/US/state/NE",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NE.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NE-ran.recon"}}@node{uri:"/country/US/state/NV",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NV.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NV-ran.recon"}}@node{uri:"/country/US/state/NH",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NH.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NH-ran.recon"}}@node{uri:"/country/US/state/NJ",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NJ.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NJ-ran.recon"}}@node{uri:"/country/US/state/NM",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NM.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NM-ran.recon"}}@node{uri:"/country/US/state/NY",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NY.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NY-ran.recon"}}@node{uri:"/country/US/state/NC",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NC.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NC-ran.recon"}}@node{uri:"/country/US/state/ND",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/ND.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/ND-ran.recon"}}@node{uri:"/country/US/state/OH",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/OH.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/OH-ran.recon"}}@node{uri:"/country/US/state/OK",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/OK.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/OK-ran.recon"}}@node{uri:"/country/US/state/OR",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/OR.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/OR-ran.recon"}}@node{uri:"/country/US/state/PA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/PA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/PA-ran.recon"}}@node{uri:"/country/US/state/RI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/RI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/RI-ran.recon"}}@node{uri:"/country/US/state/SC",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/SC.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/SC-ran.recon"}}@node{uri:"/country/US/state/SD",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/SD.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/SD-ran.recon"}}@node{uri:"/country/US/state/TN",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/TN.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/TN-ran.recon"}}@node{uri:"/country/US/state/TX",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/TX.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/TX-ran.recon"}}@node{uri:"/country/US/state/UT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/UT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/UT-ran.recon"}}@node{uri:"/country/US/state/VT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/VT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/VT-ran.recon"}}@node{uri:"/country/US/state/VA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/VA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/VA-ran.recon"}}@node{uri:"/country/US/state/WA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WA-ran.recon"}}@node{uri:"/country/US/state/WV",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WV.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WV-ran.recon"}}@node{uri:"/country/US/state/WI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WI-ran.recon"}}@node{uri:"/country/US/state/WY",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WY.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WY-ran.recon"}}@node{uri:"/country/US/territory/DC",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/territory/DC.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/territory/DC-ran.recon"}}@node{uri:"/country/US",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US.recon"}}} \ No newline at end of file +@kernel(class:"swim.store.db.DbStoreKernel",optional:true) +@kernel(class:"swim.cluster.ClusterKernel",optional:true) +@kernel(class:"swim.meta.MetaKernel") +@kernel(class:"swim.cellular.CellularUiRouter") +@web(port:9008){space:"cellular",@websocket{serverCompressionLevel:0,clientCompressionLevel:0}}cellular:@fabric{@plane(class:"swim.cellular.CellularPlane") +@mesh{@part{key:partA,predicate:@node("/site/:id")&&@hash(0x00000000,0x7fffffff),@host{primary:true},}@part{key:partB,predicate:@node("/site/:id")&&@hash(0x80000000,0xffffffff),@host{uri:"warp://localhost:9009",primary:true}}@part{key:,predicate:,gateway:true,@host{primary:true}}}@node{pattern:"/site/:id",@agent(class:"swim.cellular.agent.SiteAgent")}@node{pattern:"/site/:id/sector/:sid",@agent(class:"swim.cellular.agent.SectorAgent")}@node{uri:"/country/US/state/AL",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AL.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AL-ran.recon"}}@node{uri:"/country/US/state/AK",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AK.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AK-ran.recon"}}@node{uri:"/country/US/state/AZ",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AZ.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AZ-ran.recon"}}@node{uri:"/country/US/state/AR",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/AR.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/AR-ran.recon"}}@node{uri:"/country/US/state/CA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CA-ran.recon"}}@node{uri:"/country/US/state/CO",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CO.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CO-ran.recon"}}@node{uri:"/country/US/state/CT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CT-ran.recon"}}@node{uri:"/country/US/state/DE",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/DE.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/DE-ran.recon"}}@node{uri:"/country/US/state/FL",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/FL.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/FL-ran.recon"}}@node{uri:"/country/US/state/GA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/GA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/GA-ran.recon"}}@node{uri:"/country/US/state/HI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/HI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/HI-ran.recon"}}@node{uri:"/country/US/state/ID",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/ID.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/ID-ran.recon"}}@node{uri:"/country/US/state/IL",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/IL.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/IL-ran.recon"}}@node{uri:"/country/US/state/IN",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/IN.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/IN-ran.recon"}}@node{uri:"/country/US/state/IA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/IA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/IA-ran.recon"}}@node{uri:"/country/US/state/KS",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/KS.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/KS-ran.recon"}}@node{uri:"/country/US/state/KY",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/KY.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/KY-ran.recon"}}@node{uri:"/country/US/state/LA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/LA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/LA-ran.recon"}}@node{uri:"/country/US/state/ME",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/ME.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/ME-ran.recon"}}@node{uri:"/country/US/state/MD",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MD.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MD-ran.recon"}}@node{uri:"/country/US/state/MA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MA-ran.recon"}}@node{uri:"/country/US/state/MI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MI-ran.recon"}}@node{uri:"/country/US/state/MN",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MN.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MN-ran.recon"}}@node{uri:"/country/US/state/MS",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MS.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MS-ran.recon"}}@node{uri:"/country/US/state/MO",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MO.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MO-ran.recon"}}@node{uri:"/country/US/state/MT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/MT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/MT-ran.recon"}}@node{uri:"/country/US/state/NE",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NE.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NE-ran.recon"}}@node{uri:"/country/US/state/NV",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NV.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NV-ran.recon"}}@node{uri:"/country/US/state/NH",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NH.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NH-ran.recon"}}@node{uri:"/country/US/state/NJ",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NJ.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NJ-ran.recon"}}@node{uri:"/country/US/state/NM",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NM.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NM-ran.recon"}}@node{uri:"/country/US/state/NY",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NY.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NY-ran.recon"}}@node{uri:"/country/US/state/NC",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/NC.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/NC-ran.recon"}}@node{uri:"/country/US/state/ND",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/ND.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/ND-ran.recon"}}@node{uri:"/country/US/state/OH",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/OH.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/OH-ran.recon"}}@node{uri:"/country/US/state/OK",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/OK.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/OK-ran.recon"}}@node{uri:"/country/US/state/OR",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/OR.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/OR-ran.recon"}}@node{uri:"/country/US/state/PA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/PA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/PA-ran.recon"}}@node{uri:"/country/US/state/RI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/RI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/RI-ran.recon"}}@node{uri:"/country/US/state/SC",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/SC.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/SC-ran.recon"}}@node{uri:"/country/US/state/SD",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/SD.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/SD-ran.recon"}}@node{uri:"/country/US/state/TN",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/TN.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/TN-ran.recon"}}@node{uri:"/country/US/state/TX",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/TX.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/TX-ran.recon"}}@node{uri:"/country/US/state/UT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/UT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/UT-ran.recon"}}@node{uri:"/country/US/state/VT",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/VT.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/VT-ran.recon"}}@node{uri:"/country/US/state/VA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/VA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/VA-ran.recon"}}@node{uri:"/country/US/state/WA",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WA-ran.recon"}}@node{uri:"/country/US/state/WV",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WV.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WV-ran.recon"}}@node{uri:"/country/US/state/WI",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WI.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WI-ran.recon"}}@node{uri:"/country/US/state/WY",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/WY.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/WY-ran.recon"}}@node{uri:"/country/US/territory/DC",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/territory/DC.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/territory/DC-ran.recon"}}@node{uri:"/country/US",@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US.recon"}}} \ No newline at end of file diff --git a/src/test/testData/formatting/input/client-config-collapse.recon b/src/test/testData/formatting/input/client-config-collapse.recon index dc16b67..6eee6ce 100644 --- a/src/test/testData/formatting/input/client-config-collapse.recon +++ b/src/test/testData/formatting/input/client-config-collapse.recon @@ -1,6 +1,4 @@ -@config - -{ +@config { diff --git a/src/test/testData/formatting/input/rosa-expand.recon b/src/test/testData/formatting/input/rosa-expand.recon index 5e0e0a1..ec1ab98 100644 --- a/src/test/testData/formatting/input/rosa-expand.recon +++ b/src/test/testData/formatting/input/rosa-expand.recon @@ -1 +1,2 @@ -@kernel(class:'swim.meta.MetaKernel')rosa:@fabric{@plane(class:"swim.rosa.RosaPlane")@node{pattern:"/satellite/:id",@agent(class:"swim.rosa.SatelliteAgent")}@node{pattern:"/operator/:id",@agent(class:"swim.rosa.OperatorAgent")}@node{uri:"/notso",@agent(class:"swim.rosa.NotsoAgent")}@node{uri:"/conjunction",@agent(class:"swim.rosa.ConjunctionAgent")}@node{uri:"/spaceTrack",@agent(class:"swim.rosa.SpaceTrackAgent")}}@web(port:9001){space:"rosa",@websocket{serverCompressionLevel:0,clientCompressionLevel:0}} \ No newline at end of file +@kernel(class:'swim.meta.MetaKernel')rosa:@fabric{@plane(class:"swim.rosa.RosaPlane") +@node{pattern:"/satellite/:id",@agent(class:"swim.rosa.SatelliteAgent")}@node{pattern:"/operator/:id",@agent(class:"swim.rosa.OperatorAgent")}@node{uri:"/notso",@agent(class:"swim.rosa.NotsoAgent")}@node{uri:"/conjunction",@agent(class:"swim.rosa.ConjunctionAgent")}@node{uri:"/spaceTrack",@agent(class:"swim.rosa.SpaceTrackAgent")}}@web(port:9001){space:"rosa",@websocket{serverCompressionLevel:0,clientCompressionLevel:0}} \ No newline at end of file diff --git a/src/test/testData/formatting/input/tmforum-expand.recon b/src/test/testData/formatting/input/tmforum-expand.recon index 03e332f..1c41844 100644 --- a/src/test/testData/formatting/input/tmforum-expand.recon +++ b/src/test/testData/formatting/input/tmforum-expand.recon @@ -1 +1,5 @@ -@kernel(class:"swim.store.db.DbStoreKernel",optional:true)@kernel(class:"swim.meta.MetaKernel")@kernel(class:"swim.cellular.CellularUiRouter")@web(port:9003){space:"cellular",@websocket{serverCompressionLevel:0,clientCompressionLevel:0,}}cellular:@fabric{@plane(class:"swim.cellular.CellularPlane")@node{pattern:"/site/:id",@agent(class:"swim.cellular.agent.SiteAgent")}@node{uri:"/country/US/state/CA"@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CA-sites.csv"}}@node{uri:"/country/US"@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US.recon"}}} \ No newline at end of file +@kernel(class:"swim.store.db.DbStoreKernel",optional:true) +@kernel(class:"swim.meta.MetaKernel") +@kernel(class:"swim.cellular.CellularUiRouter") +@web(port:9003){space:"cellular",@websocket{serverCompressionLevel:0,clientCompressionLevel:0,}}cellular:@fabric{@plane(class:"swim.cellular.CellularPlane") +@node{pattern:"/site/:id",@agent(class:"swim.cellular.agent.SiteAgent")}@node{uri:"/country/US/state/CA"@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US/state/CA.recon"}@agent(class:"swim.cellular.agent.RanAgent"){seed:"seed/country/US/state/CA-sites.csv"}}@node{uri:"/country/US"@agent(class:"swim.cellular.agent.RegionAgent"){seed:"seed/country/US.recon"}}} \ No newline at end of file diff --git a/src/test/testData/formatting/input/trafficware-expand.recon b/src/test/testData/formatting/input/trafficware-expand.recon index 2987204..7655a6b 100644 --- a/src/test/testData/formatting/input/trafficware-expand.recon +++ b/src/test/testData/formatting/input/trafficware-expand.recon @@ -1 +1,3 @@ -@kernel(class:'swim.store.db.DbStoreKernel')@kernel(class:'swim.meta.MetaKernel')http:@web(port:9002){space:"traffic-app"@websocket{serverCompressionLevel:0,clientCompressionLevel:0,}}traffic-app:@fabric{@plane(class:"it.swim.traffic.TrafficApp")@node{pattern:"/intersection/:country/:state/:city/:id"@agent(class:"it.swim.traffic.gateway.CityIntersectionAgent")}@node{pattern:"/intersection/:country/:state/:city/:id"@agent(class:"it.swim.traffic.gateway.CityIntersectionAgent")}@node{pattern:"/city/:id"@agent(class:"it.swim.traffic.gateway.CityAgent")}@node{pattern:"/country/:id"@agent(class:"it.swim.traffic.gateway.CountryAgent")}@node{pattern:"/customer/:customer"@agent(class:"it.swim.traffic.gateway.api.CustomerAgent")}@node{uri:"/customers/all"@agent(class:"it.swim.traffic.gateway.api.CustomersAgent")}@node{uri:"/country/US"@agent(class:"it.swim.traffic.gateway.CountryAgent")}@store{path:"/tmp/swim/tw-gateway"}} \ No newline at end of file +@kernel(class:'swim.store.db.DbStoreKernel') +@kernel(class:'swim.meta.MetaKernel')http:@web(port:9002){space:"traffic-app"@websocket{serverCompressionLevel:0,clientCompressionLevel:0,}}traffic-app:@fabric{@plane(class:"it.swim.traffic.TrafficApp") +@node{pattern:"/intersection/:country/:state/:city/:id"@agent(class:"it.swim.traffic.gateway.CityIntersectionAgent")}@node{pattern:"/intersection/:country/:state/:city/:id"@agent(class:"it.swim.traffic.gateway.CityIntersectionAgent")}@node{pattern:"/city/:id"@agent(class:"it.swim.traffic.gateway.CityAgent")}@node{pattern:"/country/:id"@agent(class:"it.swim.traffic.gateway.CountryAgent")}@node{pattern:"/customer/:customer"@agent(class:"it.swim.traffic.gateway.api.CustomerAgent")}@node{uri:"/customers/all"@agent(class:"it.swim.traffic.gateway.api.CustomersAgent")}@node{uri:"/country/US"@agent(class:"it.swim.traffic.gateway.CountryAgent")}@store{path:"/tmp/swim/tw-gateway"}} \ No newline at end of file diff --git a/src/test/testData/formatting/input/transit-expand.recon b/src/test/testData/formatting/input/transit-expand.recon index 26192fc..179e9e8 100644 --- a/src/test/testData/formatting/input/transit-expand.recon +++ b/src/test/testData/formatting/input/transit-expand.recon @@ -1,5 +1,8 @@ # Server A -@kernel(class:'swim.store.db.DbStoreKernel',optional:true)@kernel(class:"swim.meta.MetaKernel",optional: true)@kernel(class:"swim.cluster.ClusterKernel",optional:true)transit:@fabric{@plane(class:"swim.transit.TransitPlane")@mesh{@part{key: partA +@kernel(class:'swim.store.db.DbStoreKernel',optional:true) +@kernel(class:"swim.meta.MetaKernel",optional: true) +@kernel(class:"swim.cluster.ClusterKernel",optional:true)transit:@fabric{@plane(class:"swim.transit.TransitPlane") +@mesh{@part{key: partA predicate:(@node("/country/:id")||@node("/state/:country/:state")||@node("/agency/:country/:state/:id")||@node("/vehicle/:country/:state/:agency/:id"))&&@hash(0x00000000, 0x7fffffff) @host{ #uri: "warp://localhost:9008" From ee65189a895c7a81e3e34179e4eef143ba4f74c3 Mon Sep 17 00:00:00 2001 From: Dobromir Marinov Date: Fri, 10 Dec 2021 14:36:38 +0000 Subject: [PATCH 3/3] Version 1.3.0 * Removed `untilBuild` to avoid incompatibility errors when the IDE is updated to a newer version. --- build.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 9f4f59a..aee5894 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.jetbrains.grammarkit' sourceSets.main.java.srcDirs 'src/main/gen' group 'org.swim' -version '1.1.0' +version '1.2.0' repositories { mavenCentral() @@ -22,8 +22,9 @@ dependencies { // See https://github.com/JetBrains/gradle-intellij-plugin/ intellij { - version '2021.2.3' - plugins = ['PsiViewer:212-SNAPSHOT', 'com.intellij.java'] + version '2021.3' + plugins = ['PsiViewer:213-SNAPSHOT', 'com.intellij.java'] + updateSinceUntilBuild false } patchPluginXml {