@abaplint/transpiler 2.11.2 → 2.11.4
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.
|
@@ -52,7 +52,7 @@ class SetHandlerTranspiler {
|
|
|
52
52
|
def = traversal.findClassDefinition(def.getSuperClass(), scope);
|
|
53
53
|
}
|
|
54
54
|
if (def === undefined) {
|
|
55
|
-
throw new Error(`SetHandlerTranspiler: findEventClass "${mdef.getEventClass()}" not found`);
|
|
55
|
+
throw new Error(`SetHandlerTranspiler: findEventClass, class or interface "${mdef.getEventClass()}" not found`);
|
|
56
56
|
}
|
|
57
57
|
return traversal.buildInternalName(def.getName(), def);
|
|
58
58
|
}
|
|
@@ -118,6 +118,14 @@ class ClassImplementationTranspiler {
|
|
|
118
118
|
}
|
|
119
119
|
ret += traversal_1.Traversal.escapeNamespace(clasName) + "." + alias.getName().toLowerCase() + " = " + traversal_1.Traversal.escapeNamespace(clasName) + "." + traversal_1.Traversal.escapeNamespace(alias.getComponent().replace("~", "$")) + ";\n";
|
|
120
120
|
}
|
|
121
|
+
for (const e of cdef.getEvents()) {
|
|
122
|
+
if (e.isStatic() === false) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
const fname = traversal_1.Traversal.escapeNamespace(e.getName().toLowerCase());
|
|
126
|
+
const name = traversal.buildInternalName(clasName, cdef);
|
|
127
|
+
ret += traversal_1.Traversal.escapeNamespace(clasName) + "." + fname + " = {\"EVENT_NAME\": \"" + e.getName().toUpperCase() + "\", \"EVENT_CLASS\": \"" + name + "\"};\n";
|
|
128
|
+
}
|
|
121
129
|
// this is not correct, ABAP does not invocate the class constructor at require time,
|
|
122
130
|
// but this will probably work
|
|
123
131
|
if (traversal.getCurrentObject().getType() === "CLAS") {
|