@abaplint/core 2.113.13 → 2.113.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/abaplint.d.ts
CHANGED
|
@@ -305,6 +305,7 @@ class ABAPFileInformation {
|
|
|
305
305
|
identifier: new _identifier_1.Identifier(methodName, this.filename),
|
|
306
306
|
isRedefinition: def.findDirectExpression(Expressions.Redefinition) !== undefined,
|
|
307
307
|
isForTesting: def.concatTokens().toUpperCase().includes(" FOR TESTING"),
|
|
308
|
+
isFinal: def.concatTokens().toUpperCase().includes(" FINAL"),
|
|
308
309
|
isAbstract: def.findDirectExpression(Expressions.Abstract) !== undefined,
|
|
309
310
|
isEventHandler: def.findDirectExpression(Expressions.EventHandler) !== undefined,
|
|
310
311
|
visibility,
|
package/build/src/registry.js
CHANGED
|
@@ -89,6 +89,7 @@ ENDCLASS.`,
|
|
|
89
89
|
};
|
|
90
90
|
const expected = new indent_1.Indent(indentOpts).getExpectedIndents(file);
|
|
91
91
|
const ret = [];
|
|
92
|
+
let previous = undefined;
|
|
92
93
|
for (const statement of file.getStatements()) {
|
|
93
94
|
const position = statement.getFirstToken().getStart();
|
|
94
95
|
if (position instanceof virtual_position_1.VirtualPosition) {
|
|
@@ -123,6 +124,12 @@ ENDCLASS.`,
|
|
|
123
124
|
continue;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
127
|
+
// only apply for the first statement in a chain
|
|
128
|
+
if (statement.getColon() !== undefined
|
|
129
|
+
&& (previous === null || previous === void 0 ? void 0 : previous.getColon()) !== undefined
|
|
130
|
+
&& statement.getColon().getStart().equals(previous.getColon().getStart())) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
126
133
|
if (indent && indent > 0 && indent !== position.getCol()) {
|
|
127
134
|
const expected = indent - 1;
|
|
128
135
|
const fix = edit_helper_1.EditHelper.replaceRange(file, new position_1.Position(position.getRow(), 1), position, " ".repeat(expected));
|
|
@@ -133,6 +140,7 @@ ENDCLASS.`,
|
|
|
133
140
|
break;
|
|
134
141
|
}
|
|
135
142
|
}
|
|
143
|
+
previous = statement;
|
|
136
144
|
}
|
|
137
145
|
return ret;
|
|
138
146
|
}
|
|
@@ -157,6 +157,7 @@ Skips:
|
|
|
157
157
|
}
|
|
158
158
|
let fix = undefined;
|
|
159
159
|
if (i.visibility === visibility_1.Visibility.Private
|
|
160
|
+
|| i.isFinal === true
|
|
160
161
|
|| (i.visibility === visibility_1.Visibility.Protected && this.hasSubClass(obj) === false)) {
|
|
161
162
|
const implementation = this.findMethodImplementation(i, file);
|
|
162
163
|
if (implementation !== undefined) {
|