Skip to content

Commit

Permalink
Merge pull request #243 from BalticAmadeus/236-variable-definition-fo…
Browse files Browse the repository at this point in the history
…rmatter

236 variable definition formatter
  • Loading branch information
PauliusKu authored Oct 18, 2024
2 parents f688439 + 0fb6210 commit 10cc25b
Show file tree
Hide file tree
Showing 100 changed files with 1,199 additions and 142 deletions.
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@
"Same"
]
},
"AblFormatter.variableDefinitionFormatting": {
"order": 1400,
"type": "boolean",
"default": "true",
"description": "Enable DEFINE VARIABLE formatting"
},
"AblFormatter.procedureParameterFormatting": {
"order": 1500,
"type": "boolean",
"default": "true",
"description": "Enable PROCEDURE PARAMETER formatting"
},
"AblFormatter.showTreeInfoOnHover": {
"order": 10100,
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2 number2 = 3333
.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN

number11 = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2 number2 = 3333
.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2
number2 = 3333 .
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2 number2 = 3333.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2 number2 = 33333 .
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2 number2 = 33333
.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN

number11 = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2 number2 = 33333.
4 changes: 0 additions & 4 deletions resources/functionalTests/assign/15assign-noError/input.p
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
number3 = 2
Expand Down
4 changes: 0 additions & 4 deletions resources/functionalTests/assign/15assign-noError/target.p
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
number3 = 2
Expand Down
4 changes: 0 additions & 4 deletions resources/functionalTests/assign/16assign-When/input.p
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
when number3 = 2
Expand Down
4 changes: 0 additions & 4 deletions resources/functionalTests/assign/16assign-When/target.p
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
when number3 = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
when number3 = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN number2 = 2 number11 = 2 when number3 = 2 NO-ERROR
.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
number11 = 2 when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO INITIAL 3.
DEFINE VARIABLE number3 AS INTEGER NO-UNDO INITIAL 3.

ASSIGN
number2 = 2
number11 = 2
Expand Down
3 changes: 0 additions & 3 deletions resources/functionalTests/assign/1formattingFalse/input.p
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 3
Expand Down
3 changes: 0 additions & 3 deletions resources/functionalTests/assign/1formattingFalse/target.p
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 3
Expand Down
3 changes: 0 additions & 3 deletions resources/functionalTests/assign/2inFunction/input.p
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

FUNCTION sumNumbers RETURNS INTEGER (number3 AS INTEGER, number4 AS INTEGER):
DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = number3
number2 = number4
Expand Down
3 changes: 0 additions & 3 deletions resources/functionalTests/assign/2inFunction/target.p
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

FUNCTION sumNumbers RETURNS INTEGER (number3 AS INTEGER, number4 AS INTEGER):
DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = number3
number2 = number4
Expand Down
3 changes: 0 additions & 3 deletions resources/functionalTests/assign/3inProcedure/input.p
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

PROCEDURE sumNumbers:
DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = number3
number2 = number4
Expand Down
3 changes: 0 additions & 3 deletions resources/functionalTests/assign/3inProcedure/target.p
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

PROCEDURE sumNumbers:
DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = number3
number2 = number4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2
number2 = 33333
.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 33333
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 33333
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "New"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 33333
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 3333
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "No",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 3333.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 3333 .
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New aligned"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 3333
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN number11 = 2
number2 = 3333 .
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "New"}*/

DEFINE VARIABLE number11 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number11 = 2
number2 = 3333
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number1 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number1 = 2
number2 = 3333 .
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"AblFormatter.assignFormattingAlignRightExpression": "Yes",
"AblFormatter.assignFormattingEndDotLocation": "Same"}*/

DEFINE VARIABLE number1 AS INTEGER NO-UNDO.
DEFINE VARIABLE number2 AS INTEGER NO-UNDO.

ASSIGN
number1 = 2
number2 = 3333.
Loading

0 comments on commit 10cc25b

Please sign in to comment.