Skip to content
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

41 FOR Formatting #133

Merged
merged 22 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ff66089
initial tests
PauliusKu Aug 14, 2024
9886fc2
Merge commit '78179a19053355ff37eff148f9613e5bf72712c1' into 41-for-f…
SSaulenas Aug 26, 2024
e43c32a
Not working new For Formatter
SSaulenas Aug 26, 2024
93e66ec
update
SSaulenas Aug 27, 2024
a1223be
Merge commit '06bc7a8a54ae5940cbc2d703b8f71dbeff6ac3c6' into 41-for-f…
SSaulenas Aug 27, 2024
c1a16f9
update
SSaulenas Aug 27, 2024
bb3c3fa
Update for formatter
SSaulenas Aug 27, 2024
127f932
Merge commit '7fd3eb382f8dab13a8f7575580e89c70aa6a1a3f' into 41-for-f…
SSaulenas Aug 30, 2024
f50de77
changed some block test, because forFormatter was turned on
SSaulenas Aug 30, 2024
802a545
Merge commit '1276b880087e059d1ef0be2eb2fcdc328c8d157f' into 41-for-f…
SSaulenas Aug 30, 2024
645a203
Merge commit '407e8c9e20a416619ddc7c52c47e2dfb94ae0e22' into 41-for-f…
SSaulenas Aug 30, 2024
bed795e
Merge remote-tracking branch 'origin' into 41-for-formatting
Sep 6, 2024
ad49792
Change block node instead of parent
Sep 6, 2024
f1c1be3
Merge branch '174-80-tests-are-failing-on-develop-after-0031-was-merg…
Sep 6, 2024
767ec5b
Merge branch '174-80-tests-are-failing-on-develop-after-0031-was-merg…
Sep 6, 2024
8650ecd
Improve for and block formatting
Sep 6, 2024
e68add4
Update for tests
Sep 6, 2024
3002e9d
Fix for support
Sep 9, 2024
cbecc70
Remove comments ; update package.json
Sep 9, 2024
fe4f6ac
Improve for formatting
Sep 9, 2024
92baa5a
Refactor empty block formatter to body formatter
Sep 9, 2024
9c9869c
Merge remote-tracking branch 'origin' into 41-for-formatting
Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@
"default": "true",
"description": "Enable USING formatting"
},
"AblFormatter.emptyBlockFormatting": {
"AblFormatter.bodyFormatting": {
"order": 1000,
"type": "boolean",
"default": "true",
"description": "Enable EMPTY BLOCK formatting"
"description": "Enable BODY formatting"
},
"AblFormatter.propertyFormatting": {
"order": 1100,
Expand All @@ -202,7 +202,7 @@
"AblFormatter.ifFunctionFormattingAddParentheses": {
"order": 1201,
"type": "string",
"default": "Yes",
"default": "No",
"enum": [
"Yes",
"No"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false}*/
/* { "AblFormatter.bodyFormatting": false,
"AblFormatter.forFormatting": false}*/

for each Customer no-lock:
Customer.var += 1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false}*/
/* { "AblFormatter.bodyFormatting": false,
"AblFormatter.forFormatting": false}*/

for each Customer no-lock:
Customer.var += 1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false}*/
/* { "AblFormatter.bodyFormatting": false,
"AblFormatter.forFormatting": false}*/

for each Customer no-lock:
Customer.var += 1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false}*/
/* { "AblFormatter.bodyFormatting": false,
"AblFormatter.forFormatting": false}*/

for each Customer no-lock:
Customer.var += 1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false}*/
/* { "AblFormatter.bodyFormatting": false,
"AblFormatter.forFormatting": false}*/

for each Customer no-lock:
Customer.var += 1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false}*/
/* { "AblFormatter.bodyFormatting": false,
"AblFormatter.forFormatting": false}*/

for each Customer no-lock:
Customer.var += 1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

repeat:
define variable a as integer no-undo.
end.
end.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formattersettingsoverride */
/* { "AblFormatter.blockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true,
"AblFormatter.forFormatting": false}*/

do transaction:
for each Customer no-lock:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formattersettingsoverride */
/* { "AblFormatter.blockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true,
"AblFormatter.forFormatting": false}*/

do transaction:
for each Customer no-lock:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true,
"AblFormatter.forFormatting": false}*/

for each A no-lock:
for each B no-lock where A.id = B.id:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true,
"AblFormatter.forFormatting": false}*/

for each A no-lock:
for each B no-lock where A.id = B.id:
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/10finally/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

finally:
end finally.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/10finally/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

finally:
end finally.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/11for/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.forFormatting": true}*/

for each Customer by Customer.CreditLimit by Customer.Name:
end.
6 changes: 4 additions & 2 deletions resources/functionalTests/emptyBlock/11for/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.forFormatting": true}*/

for each Customer by Customer.CreditLimit by Customer.Name:
for each Customer
by Customer.CreditLimit
by Customer.Name:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/12function/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

function fun returns integer ():

Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/12function/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

function fun returns integer ():

Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/13method/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class Class final:
method public void mt():
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/13method/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class Class final:
method public void mt():
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/14on_do/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

on choose of b_next, b_prev do:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/14on_do/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

on choose of b_next, b_prev do:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/15on1/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

ON F1 GO. /* F1 will now perform the GO function */
ON F2 HELP. /* F2 will now perform the HELP function */
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/15on1/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

ON F1 GO. /* F1 will now perform the GO function */
ON F2 HELP. /* F2 will now perform the HELP function */
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/16procedure/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

procedure proc:
end procedure.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/16procedure/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

procedure proc:
end procedure.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/17repeat/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

repeat:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/17repeat/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

repeat:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/1catch/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

catch oErr as MyErrorType:
end catch.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/1catch/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

catch oErr as MyErrorType:
end catch.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/2class/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class A inherits B:
end class.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/2class/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class A inherits B:
end class.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/3constructor/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class A inherits B:
constructor private A():
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/3constructor/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class A inherits B:
constructor private A():
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/4destructor/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class A inherits B:
destructor public A():
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/4destructor/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

class A inherits B:
destructor public A():
Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/5do/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/5do/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/6do_on/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do on error undo, throw:

Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/6do_on/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do on error undo, throw:

Expand Down
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/7do_to/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do iCount = iTotal to 5:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/7do_to/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do iCount = iTotal to 5:
end.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do transaction:
end.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do transaction:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/9do_while/input.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do while i < 5:
end.
2 changes: 1 addition & 1 deletion resources/functionalTests/emptyBlock/9do_while/target.p
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* formatterSettingsOverride */
/* { "AblFormatter.emptyBlockFormatting": true}*/
/* { "AblFormatter.blockFormatting": true}*/

do while i < 5:
end.
10 changes: 10 additions & 0 deletions resources/functionalTests/for/1each-false/input.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false,
"AblFormatter.forFormatting": false
}*/

for
each
Customer:
Customer.var += 1.
end.
10 changes: 10 additions & 0 deletions resources/functionalTests/for/1each-false/target.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* formatterSettingsOverride */
/* { "AblFormatter.blockFormatting": false,
"AblFormatter.forFormatting": false
}*/

for
each
Customer:
Customer.var += 1.
end.
Loading