7180a-15894.patch
| new/rules/adm/adm_windows.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 33 | 33 |
** 014 CA 20250226 Allow all ADM windows to be processed, regardless if they have parameters or not. The |
| 34 | 34 |
** fwd-embedded-driver.p and associated emain.p provides ways to run the window with |
| 35 | 35 |
** parameters (by saving all the necessary info at the target 'module'). |
| 36 |
** 015 DDF 20250423 Replaced filename with artifact. |
|
| 37 |
** DDF 20250424 Replaced file with artifact. |
|
| 36 | 38 |
*/ |
| 37 | 39 |
--> |
| 38 | 40 | |
| ... | ... | |
| 355 | 357 |
|
| 356 | 358 |
<post-rules> |
| 357 | 359 |
<rule>embeddedWindow |
| 358 |
<action>embedded.put(this.filename, create("java.util.HashMap"))</action>
|
|
| 360 |
<action>embedded.put(this.artifact.getRelativePath(), create("java.util.HashMap"))</action>
|
|
| 359 | 361 |
</rule> |
| 360 | 362 |
</post-rules> |
| 361 | 363 |
</rule-set> |
| ... | ... | |
| 382 | 384 |
<rule>windowName = null</rule> |
| 383 | 385 |
<rule>admVersion = null</rule> |
| 384 | 386 |
|
| 385 |
<rule>embeddedDetails = embedded.get(this.filename)</rule>
|
|
| 387 |
<rule>embeddedDetails = embedded.get(this.artifact.getRelativePath())</rule>
|
|
| 386 | 388 | |
| 387 | 389 |
<rule>hints = preproc.getHints()</rule> |
| 388 | 390 |
<rule>hints != null and hints.getRoot() != null |
| ... | ... | |
| 403 | 405 |
<rule>hints != null and hints.getRoot() != null |
| 404 | 406 |
<action> |
| 405 | 407 |
printfln("WARNING: Removing %s because no FRAME-NAME symbol is found.",
|
| 406 |
this.filename)
|
|
| 408 |
this.artifact.getRelativePath())
|
|
| 407 | 409 |
</action> |
| 408 | 410 |
</rule> |
| 409 | 411 |
|
| 410 |
<action>embedded.remove(this.filename)</action>
|
|
| 412 |
<action>embedded.remove(this.artifact.getRelativePath())</action>
|
|
| 411 | 413 |
</rule> |
| 412 | 414 | |
| 413 | 415 |
<rule>embeddedDetails != null and windowName == null |
| 414 | 416 |
<rule>hints != null and hints.getRoot() != null |
| 415 | 417 |
<action> |
| 416 | 418 |
printfln("WARNING: Removing %s because no WINDOW-NAME symbol is found.",
|
| 417 |
this.filename)
|
|
| 419 |
this.artifact.getRelativePath())
|
|
| 418 | 420 |
</action> |
| 419 | 421 |
</rule> |
| 420 | 422 | |
| 421 |
<action>embedded.remove(this.filename)</action>
|
|
| 423 |
<action>embedded.remove(this.artifact.getRelativePath())</action>
|
|
| 422 | 424 |
</rule> |
| 423 | 425 |
|
| 424 | 426 |
<rule>embeddedDetails != null and admVersion == null |
| 425 | 427 |
<rule>hints != null and hints.getRoot() != null |
| 426 | 428 |
<action> |
| 427 | 429 |
printfln("WARNING: Removing %s because no ADM-VERSION symbol is found.",
|
| 428 |
this.filename)
|
|
| 430 |
this.artifact.getRelativePath())
|
|
| 429 | 431 |
</action> |
| 430 | 432 |
</rule> |
| 431 | 433 | |
| 432 |
<action>embedded.remove(this.filename)</action>
|
|
| 434 |
<action>embedded.remove(this.artifact.getRelativePath())</action>
|
|
| 433 | 435 |
</rule> |
| 434 | 436 |
|
| 435 |
<rule>embeddedDetails = embedded.get(this.filename)</rule>
|
|
| 437 |
<rule>embeddedDetails = embedded.get(this.artifact.getRelativePath())</rule>
|
|
| 436 | 438 |
|
| 437 | 439 |
<rule>embeddedDetails != null |
| 438 |
<action>embeddedName = this.filename</action>
|
|
| 440 |
<action>embeddedName = this.artifact.getRelativePath()</action>
|
|
| 439 | 441 | |
| 440 | 442 |
<!-- calc the name as it would be used in a Progress RUN statement |
| 441 | 443 |
(which would include any relative pathing such that a PROPATH |
| ... | ... | |
| 506 | 508 |
<action>ref = this.getNextSibling()</action> |
| 507 | 509 |
<action>windowTitle = ecw.evaluateCharacterExpression(ref)</action> |
| 508 | 510 |
<rule>windowTitle == null |
| 509 |
<action>windowTitle = this.filename</action>
|
|
| 511 |
<action>windowTitle = this.artifact.getRelativePath()</action>
|
|
| 510 | 512 |
</rule> |
| 511 | 513 | |
| 512 | 514 |
<action>embeddedDetails.put("window-title", windowTitle)</action>
|
| ... | ... | |
| 541 | 543 |
<rule>!programDetails.containsKey("window-ref-id")
|
| 542 | 544 |
<action> |
| 543 | 545 |
printfln("WARNING: dropping file %s as an embedded program because no window is set",
|
| 544 |
file)
|
|
| 546 |
artifact.getRelativePath())
|
|
| 545 | 547 |
</action> |
| 546 |
<action>embedded.remove(this.filename)</action>
|
|
| 548 |
<action>embedded.remove(this.artifact.getRelativePath())</action>
|
|
| 547 | 549 |
</rule> |
| 548 | 550 |
</rule> |
| 549 | 551 |
</post-rules> |
| ... | ... | |
| 570 | 572 |
<variable name="handleRefs" type="java.util.Map" /> |
| 571 | 573 |
|
| 572 | 574 |
<init-rules> |
| 573 |
<rule>embeddedDetails = embedded.get(this.filename)</rule>
|
|
| 575 |
<rule>embeddedDetails = embedded.get(this.artifact.getRelativePath())</rule>
|
|
| 574 | 576 |
|
| 575 | 577 |
<rule>embeddedDetails != null |
| 576 | 578 |
<rule>inAdmCreateObjects = false</rule> |
| ... | ... | |
| 656 | 658 |
<rule>currentPage >= pages.size() |
| 657 | 659 |
<action> |
| 658 | 660 |
printfln("WARNING: %s has tried to access page %d with %d pages defined!",
|
| 659 |
file, currentPage, pages.size())
|
|
| 661 |
artifact.getRelativePath(), currentPage, pages.size())
|
|
| 660 | 662 |
</action> |
| 661 | 663 |
</rule> |
| 662 | 664 |
|
| ... | ... | |
| 780 | 782 |
</action> |
| 781 | 783 |
</rule> |
| 782 | 784 |
|
| 783 |
<rule>procName = this.filename</rule>
|
|
| 785 |
<rule>procName = this.artifact.getRelativePath()</rule>
|
|
| 784 | 786 |
<rule>embeddedDetails = embedded.get(procName)</rule> |
| 785 | 787 | |
| 786 | 788 |
<!-- generate ASTs for this converted window --> |
| new/rules/annotations/cleanup.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : cleanup.rules |
| 6 | 6 |
** Abstract : handles removal or hiding of unnecessary nodes |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2005-2024, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ __JPRM__ __________________________________Description___________________________________ |
| 11 | 11 |
** 001 GES 20050816 @22140 Handles removal or hiding of unnecessary nodes. |
| ... | ... | |
| 118 | 118 |
** versions, based on node types rather on string paths. |
| 119 | 119 |
** 053 SVL 20240330 Fixed ENABLE/DISABLE statement hidden by mistake if all enabled elements have |
| 120 | 120 |
** WHEN condition. |
| 121 |
** 054 DDF 20250424 Replaced file with artifact. |
|
| 121 | 122 |
*/ |
| 122 | 123 |
--> |
| 123 | 124 |
|
| ... | ... | |
| 529 | 530 |
<!-- uncomment following action if logging is required --> |
| 530 | 531 |
<!-- action> |
| 531 | 532 |
printfln("## INFO: %s: %d: hiding PAGED after PAGE-SIZE",
|
| 532 |
file, paged.line)
|
|
| 533 |
artifact.getRelativePath(), paged.line)
|
|
| 533 | 534 |
</action --> |
| 534 | 535 |
<action>paged.setHidden(true)</action> |
| 535 | 536 |
</rule> |
| new/rules/annotations/collect_names.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : collect_names.rules |
| 6 | 6 |
** Abstract : collect Progress to Java name mappings and store for future use at runtime |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2005-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________ |
| 11 | 11 |
** 001 SIY 20050818 @22167 Initial implementation of the name map collecting rule set. For each |
| ... | ... | |
| 65 | 65 |
** 028 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 66 | 66 |
** versions, based on node types rather on string paths. |
| 67 | 67 |
** 029 ME 20230828 Add missing append/bind flags for table/dataset parameters. |
| 68 |
** 030 DDF 20250423 Replaced file with artifact. |
|
| 68 | 69 |
*/ |
| 69 | 70 |
--> |
| 70 | 71 | |
| ... | ... | |
| 157 | 158 |
<variable name="proot" type="com.goldencode.p2j.convert.NameMappingWorker$MethodInfo" /> |
| 158 | 159 | |
| 159 | 160 |
<init-rules> |
| 160 |
<rule>schema.initializeDictionary(file)</rule>
|
|
| 161 |
<rule>schema.initializeDictionary(artifact)</rule>
|
|
| 161 | 162 |
|
| 162 | 163 |
<!-- gather file-level mapping data --> |
| 163 | 164 |
<rule>relativeName = getNoteString("relative-name")</rule>
|
| new/rules/annotations/copy_view_as_from_schema.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 4 | 4 |
** Module : copy_view_as_from_schema.rules |
| 5 | 5 |
** Abstract : copy VIEW-AS phrases from the schema into the Progress AST |
| 6 | 6 |
** |
| 7 |
** Copyright (c) 2006-2023, Golden Code Development Corporation.
|
|
| 7 |
** Copyright (c) 2006-2025, Golden Code Development Corporation.
|
|
| 8 | 8 |
** |
| 9 | 9 |
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________ |
| 10 | 10 |
** 001 GES 20060507 @26004 All user interface statements that can |
| ... | ... | |
| 28 | 28 |
** and relaseDictionary brackets. |
| 29 | 29 |
** 006 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 30 | 30 |
** versions, based on node types rather on string paths. |
| 31 |
** 007 DDF 20250423 Replaced file with artifact. |
|
| 31 | 32 |
*/ |
| 32 | 33 |
--> |
| 33 | 34 | |
| ... | ... | |
| 106 | 107 |
|
| 107 | 108 |
<init-rules> |
| 108 | 109 |
<!-- get schema dictionary initialized for this source file --> |
| 109 |
<rule>sw.initializeDictionary(file)</rule>
|
|
| 110 |
<rule>sw.initializeDictionary(artifact)</rule>
|
|
| 110 | 111 |
<rule>sdict = sw.getDictionary()</rule> |
| 111 | 112 |
</init-rules> |
| 112 | 113 |
|
| new/rules/annotations/cross_namespace_conflicts.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 6 | 6 |
** Abstract : resolves name conflicts that arise from a mismatch of Progress |
| 7 | 7 |
** and Java namespaces |
| 8 | 8 |
** |
| 9 |
** Copyright (c) 2008-2023, Golden Code Development Corporation.
|
|
| 9 |
** Copyright (c) 2008-2025, Golden Code Development Corporation.
|
|
| 10 | 10 |
** |
| 11 | 11 |
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________ |
| 12 | 12 |
** 001 GES 20080402 @37807 Resolves name conflicts that arise from a |
| ... | ... | |
| 27 | 27 |
** 008 CA 20200412 Added incremental conversion support. |
| 28 | 28 |
** 009 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 29 | 29 |
** versions, based on node types rather on string paths. |
| 30 |
** 010 DDF 20250423 Use artifacts instead of the filename. |
|
| 31 |
** DDF 20250423 Replaced missed filename with an artifact. |
|
| 30 | 32 |
*/ |
| 31 | 33 |
--> |
| 32 | 34 | |
| ... | ... | |
| 86 | 88 |
<rule-set> |
| 87 | 89 | |
| 88 | 90 |
<!-- register worker objects --> |
| 89 |
<worker class="com.goldencode.p2j.uast.ProgressPatternWorker" |
|
| 90 |
namespace="prog" />
|
|
| 91 |
<worker class="com.goldencode.p2j.uast.ProgressPatternWorker" namespace="prog" />
|
|
| 92 |
<worker class="com.goldencode.artifacts.ArtifactWorker" namespace="art" />
|
|
| 91 | 93 | |
| 92 | 94 |
<!-- variables --> |
| 93 | 95 |
<variable name="ref" type="com.goldencode.ast.Aast" /> |
| 94 | 96 |
<variable name="aref" type="com.goldencode.ast.Aast" /> |
| 97 |
<variable name="refArtifact" type="com.goldencode.artifacts.Artifact" /> |
|
| 95 | 98 |
<variable name="incre" type="java.lang.Long" /> |
| 96 | 99 |
<variable name="refid" type="java.lang.Long" /> |
| 97 | 100 |
<variable name="varid" type="java.lang.Long" /> |
| ... | ... | |
| 101 | 104 |
<variable name="newname" type="java.lang.String" /> |
| 102 | 105 |
<variable name="superCls" type="java.lang.String" /> |
| 103 | 106 |
<variable name="clsName" type="java.lang.String" /> |
| 107 |
<variable name="fileName" type="java.lang.String" /> |
|
| 104 | 108 |
<variable name="counter" type="java.util.Map" /> |
| 105 | 109 |
<variable name="clsBufs" type="java.util.Set" /> |
| 106 | 110 |
<variable name="clsVars" type="java.util.Set" /> |
| ... | ... | |
| 144 | 148 |
<rule>bufnames.contains(javaname) |
| 145 | 149 |
|
| 146 | 150 |
<action> |
| 147 |
printfln("## INFO: %s: VAR/BUF name conflict for %s", ref.filename, javaname)
|
|
| 151 |
printfln("## INFO: %s: VAR/BUF name conflict for %s",
|
|
| 152 |
ref.artifact.getRelativePath(), |
|
| 153 |
javaname) |
|
| 148 | 154 |
</action> |
| 149 | 155 |
|
| 150 | 156 |
<!-- we need to make the name unique --> |
| ... | ... | |
| 309 | 315 |
<while>aref.parent != null |
| 310 | 316 |
<action>aref = aref.parent</action> |
| 311 | 317 |
</while> |
| 312 |
|
|
| 313 |
<action>persist(aref, sprintf("%s.ast", aref.filename), true, false)</action>
|
|
| 318 | ||
| 319 |
<action>fileName = sprintf("%s.ast", aref.artifact.getRelativePath())</action>
|
|
| 320 |
<action>refArtifact = art.createArtifact(fileName)</action> |
|
| 321 |
<action>persist(aref, refArtifact, true, false)</action> |
|
| 314 | 322 |
</rule> |
| 315 | 323 |
</rule> |
| 316 | 324 |
|
| new/rules/annotations/database_general.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 141 | 141 |
** 061 SP 20241105 Where clause processing for loops that are converted to bulk deletes |
| 142 | 142 |
** should be using qualified field references in FQL. |
| 143 | 143 |
** 062 CA 20250319 Fixed '-db "some\path\to\file\":U' option (when the string ends with :U). |
| 144 |
** 063 DDF 20250424 Replaced file with artifact. |
|
| 144 | 145 |
--> |
| 145 | 146 | |
| 146 | 147 |
<!-- |
| ... | ... | |
| 1025 | 1026 |
<!-- drop QUERY-TUNING phrase, no equivalent in FWD --> |
| 1026 | 1027 |
<rule>this.type == prog.kw_qry_tune |
| 1027 | 1028 |
<action> |
| 1028 |
printfln("WARNING: dropping QUERY-TUNING phrase in %s @%s:%s", file, this.line, this.column)
|
|
| 1029 |
printfln("WARNING: dropping QUERY-TUNING phrase in %s @%s:%s",
|
|
| 1030 |
artifact.getRelativePath(), |
|
| 1031 |
this.line, |
|
| 1032 |
this.column) |
|
| 1029 | 1033 |
</action> |
| 1030 | 1034 |
<action>copy.remove()</action> |
| 1031 | 1035 |
</rule> |
| new/rules/annotations/early_annotations.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 17 | 17 |
** 007 CA 20220427 Fixup constructor references, so they can be linked when called via THIS-OBJECT or SUPER. |
| 18 | 18 |
** 008 RFB 20241107 Added abbrev_check rule. Ref. #9302. |
| 19 | 19 |
** 009 DDF 20250207 Added annotations/early_javanames rule set. |
| 20 |
** 010 DDF 20250424 Replaced file with artifact. |
|
| 20 | 21 |
*/ |
| 21 | 22 |
--> |
| 22 | 23 |
|
| ... | ... | |
| 143 | 144 |
<action>removeNote("tempidx-file")</action>
|
| 144 | 145 |
<action>fprintf("post_parse_fixups.log",
|
| 145 | 146 |
"VAR_REF %-40s: %-25s @ %05d : %05d\n", |
| 146 |
file,
|
|
| 147 |
artifact.getRelativePath(),
|
|
| 147 | 148 |
this.getSymbolicTokenType(), |
| 148 | 149 |
line, |
| 149 | 150 |
this.getColumn()) |
| ... | ... | |
| 175 | 176 |
<action>removeNote("tempidx-file")</action>
|
| 176 | 177 |
<action>fprintf("post_parse_fixups.log",
|
| 177 | 178 |
"DS_REF %-40s: %-25s @ %05d : %05d\n", |
| 178 |
file,
|
|
| 179 |
artifact.getRelativePath(),
|
|
| 179 | 180 |
this.getSymbolicTokenType(), |
| 180 | 181 |
line, |
| 181 | 182 |
this.getColumn()) |
| ... | ... | |
| 200 | 201 |
<action>removeNote("tempidx-file")</action>
|
| 201 | 202 |
<action>fprintf("post_parse_fixups.log",
|
| 202 | 203 |
"METHOD_REF %-40s: %-25s @ %05d : %05d\n", |
| 203 |
file,
|
|
| 204 |
artifact.getRelativePath(),
|
|
| 204 | 205 |
this.getSymbolicTokenType(), |
| 205 | 206 |
line, |
| 206 | 207 |
this.getColumn()) |
| new/rules/annotations/frame_scoping.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 481 | 481 |
** 206 HC 20240703 Fixed conversion of widget reference in WEB-FILE-UPLOAD statement. |
| 482 | 482 |
** 207 TJD 20230328 Do not backreference default frame for CLEAR. |
| 483 | 483 |
** 208 LS 20250108 Added support for empty DISPLAY. |
| 484 |
** 209 DDF 20250424 Replaced file with artifact. |
|
| 484 | 485 |
*/ |
| 485 | 486 |
--> |
| 486 | 487 | |
| ... | ... | |
| 1222 | 1223 |
<action>to.put(fd, #(long) (-1))</action> |
| 1223 | 1224 |
<action> |
| 1224 | 1225 |
printfln("## INFO: %s: changing %s from 1 to 0 for %s",
|
| 1225 |
file, fd,
|
|
| 1226 |
artifact.getRelativePath(), fd,
|
|
| 1226 | 1227 |
to.get(frameName)) |
| 1227 | 1228 |
</action> |
| 1228 | 1229 |
</rule> |
| ... | ... | |
| 1233 | 1234 |
<!-- TODO: FWD fails to change DOWN to the 'from's DOWN value, if explicitly set --> |
| 1234 | 1235 |
<action> |
| 1235 | 1236 |
printfln("## INFO: %s: attempt to change %s %d to %d for %s",
|
| 1236 |
file, fd,
|
|
| 1237 |
artifact.getRelativePath(), fd,
|
|
| 1237 | 1238 |
to.get(fd), |
| 1238 | 1239 |
from.get(fd), |
| 1239 | 1240 |
to.get(frameName)) |
| ... | ... | |
| 1377 | 1378 |
parent.parent.parent == null |
| 1378 | 1379 |
<action> |
| 1379 | 1380 |
printfln("## INFO: %s: assuming DOWN set to 1 for %s at %s",
|
| 1380 |
file, var.get(frameName), this.lookupTokenName(this.type))
|
|
| 1381 |
artifact.getRelativePath(), var.get(frameName), this.lookupTokenName(this.type))
|
|
| 1381 | 1382 |
</action> |
| 1382 | 1383 |
<rule>type == prog.define_frame |
| 1383 | 1384 |
<action> |
| ... | ... | |
| 1460 | 1461 |
<action>frame = #(java.util.Map) |
| 1461 | 1462 |
lookupDictionaryObject(currScope, frameVar) |
| 1462 | 1463 |
</action> |
| 1463 |
<action>printfln("## WARN: %s: Using frame='%s' for %s/%s/%s (%s)",
|
|
| 1464 |
file, frame.get(frameName), ref.parent.parent, ref.parent, ref, text)</action> |
|
| 1464 |
<action> |
|
| 1465 |
printfln("## WARN: %s: Using frame='%s' for %s/%s/%s (%s)",
|
|
| 1466 |
artifact.getRelativePath(), |
|
| 1467 |
frame.get(frameName), |
|
| 1468 |
ref.parent.parent, |
|
| 1469 |
ref.parent, |
|
| 1470 |
ref, |
|
| 1471 |
text) |
|
| 1472 |
</action> |
|
| 1465 | 1473 |
</rule> |
| 1466 | 1474 |
</rule> |
| 1467 | 1475 |
</rule> |
| ... | ... | |
| 4839 | 4847 |
<rule>bbList.get(this.firstChild.text.toLowerCase()) != null |
| 4840 | 4848 |
<action on="false"> |
| 4841 | 4849 |
printfln("## WARN: %s: unable to locate browse (%s)",
|
| 4842 |
file, firstChild.text)
|
|
| 4850 |
artifact.getRelativePath(), firstChild.text)
|
|
| 4843 | 4851 |
</action> |
| 4844 | 4852 |
<action>tmp = execLib("search_widget", this.firstChild)</action>
|
| 4845 | 4853 |
<action>evalLib("add_node_ex", tmp, copy.firstChild)</action>
|
| ... | ... | |
| 5705 | 5713 |
<rule>tmp != null |
| 5706 | 5714 |
<action on="false"> |
| 5707 | 5715 |
printfln("## INFO: %s: unable to locate frame for %s/%s/%s %s",
|
| 5708 |
file, parent.parent, parent, this, text)
|
|
| 5716 |
artifact.getRelativePath(), parent.parent, parent, this, text)
|
|
| 5709 | 5717 |
</action> |
| 5710 | 5718 |
<action>evalLib("add_node_ex", tmp, copy)</action>
|
| 5711 | 5719 |
<action>evalLib("put_accessor_ex", copy, tmp)</action>
|
| ... | ... | |
| 5722 | 5730 |
<rule>tmp != null |
| 5723 | 5731 |
<action on="false"> |
| 5724 | 5732 |
printfln("## INFO: %s: unable to locate frame %s/%s/%s %s",
|
| 5725 |
file, parent.parent, parent, this, text)
|
|
| 5733 |
artifact.getRelativePath(), parent.parent, parent, this, text)
|
|
| 5726 | 5734 |
</action> |
| 5727 | 5735 |
<action>evalLib("add_node_ex", tmp, copy)</action>
|
| 5728 | 5736 |
<action>evalLib("put_accessor_ex", copy, tmp)</action>
|
| ... | ... | |
| 5743 | 5751 |
<rule>tmp != null |
| 5744 | 5752 |
<action on="false"> |
| 5745 | 5753 |
printfln("## INFO: %s: unable to locate frame %s/%s/%s %s",
|
| 5746 |
file, parent.parent, parent, this, text)
|
|
| 5754 |
artifact.getRelativePath(), parent.parent, parent, this, text)
|
|
| 5747 | 5755 |
</action> |
| 5748 | 5756 |
<action>evalLib("add_node_ex", tmp, copy)</action>
|
| 5749 | 5757 |
<action>evalLib("put_accessor_ex", copy, tmp)</action>
|
| ... | ... | |
| 5829 | 5837 |
|
| 5830 | 5838 |
<action on="false"> |
| 5831 | 5839 |
printfln("## WARN: %s: no frame found for %s/%s/%s (%s)",
|
| 5832 |
file, parent.parent, parent, this, text)
|
|
| 5840 |
artifact.getRelativePath(), parent.parent, parent, this, text)
|
|
| 5833 | 5841 |
</action> |
| 5834 | 5842 |
</rule> |
| 5835 | 5843 |
|
| new/rules/annotations/i18n.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : i18n.rules |
| 6 | 6 |
** Abstract : i18n processing |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2021-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2021-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _______________________________________Description_______________________________________ |
| 11 | 11 |
** 001 HC 20210926 Created initial version. |
| 12 | 12 |
** 002 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 13 | 13 |
** versions, based on node types rather on string paths. |
| 14 |
** 003 DDF 20250423 Replaced filename with artifact. |
|
| 14 | 15 |
--> |
| 15 | 16 | |
| 16 | 17 |
<!-- |
| ... | ... | |
| 106 | 107 | |
| 107 | 108 |
<!-- source reference --> |
| 108 | 109 |
<rule>txt.append("#: ")</rule>
|
| 109 |
<rule>txt.append(node.filename)</rule>
|
|
| 110 |
<rule>txt.append(node.artifact.getRelativePath())</rule>
|
|
| 110 | 111 |
<rule>txt.append(":")</rule>
|
| 111 | 112 |
<rule>txt.append(node.line)</rule> |
| 112 | 113 |
<rule>txt.append(":")</rule>
|
| ... | ... | |
| 133 | 134 |
<rule>txt.append("msgstr ")</rule>
|
| 134 | 135 |
<rule>txt.append('"')</rule>
|
| 135 | 136 |
<rule>targetLang != null |
| 136 |
<rule>target = trw.resolveTMTranslation(targetLang, node.filename, node.line, progressMsg)</rule> |
|
| 137 |
<rule> |
|
| 138 |
target = trw.resolveTMTranslation(targetLang, |
|
| 139 |
node.artifact.getRelativePath(), |
|
| 140 |
node.line, |
|
| 141 |
progressMsg) |
|
| 142 |
</rule> |
|
| 137 | 143 |
<rule>target != null |
| 138 | 144 |
<action>txt.append(sprintf("%s", target))</action>
|
| 139 | 145 |
</rule> |
| new/rules/annotations/implicit_where_clause.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 4 | 4 |
** Module : implicit_where_clause.rules |
| 5 | 5 |
** Abstract : convert implicit where clauses into explicit additions |
| 6 | 6 |
** |
| 7 |
** Copyright (c) 2005-2020, Golden Code Development Corporation.
|
|
| 7 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 8 | 8 |
** |
| 9 | 9 |
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________ |
| 10 | 10 |
** 001 GES 20051013 @23065 Convert implicit where clauses into explicit additions. |
| ... | ... | |
| 25 | 25 |
** 012 AL2 20240529 Release the schema dictionary at the very end. Otherwise, it will cause NPE |
| 26 | 26 |
** in other rule sets that use the schema dictionary at the same time. |
| 27 | 27 |
** 013 ES 20241030 Added isFind parameter to pushRecordPhrase method. |
| 28 |
** 014 DDF 20250423 Replaced file with artifact. |
|
| 28 | 29 |
*/ |
| 29 | 30 |
--> |
| 30 | 31 | |
| ... | ... | |
| 177 | 178 |
|
| 178 | 179 |
<!-- init the schema dictionary and ensure it has the source |
| 179 | 180 |
file specific temp-table data --> |
| 180 |
<action>schemaw.initializeDictionary(file)</action>
|
|
| 181 |
<action>schemaw.initializeDictionary(artifact)</action>
|
|
| 181 | 182 |
<action>schemaDict = schemaw.dictionary</action> |
| 182 | 183 |
<action>sym.schemaDictionary = schemaDict</action> |
| 183 | 184 |
|
| new/rules/annotations/index_selection.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 4 | 4 |
** Module : index_selection.rules |
| 5 | 5 |
** Abstract : duplicate the index selection decision of the Progress compiler |
| 6 | 6 |
** |
| 7 |
** Copyright (c) 2004-2024, Golden Code Development Corporation.
|
|
| 7 |
** Copyright (c) 2004-2025, Golden Code Development Corporation.
|
|
| 8 | 8 |
** |
| 9 | 9 |
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________ |
| 10 | 10 |
** 001 GES 20051014 @23066 Duplicates the index selection decision of |
| ... | ... | |
| 129 | 129 |
** RAA 20240904 Added risk factor for indeterminate sorting queries. |
| 130 | 130 |
** RAA 20240910 When computing the order by, also receive a set with the legacy name criteria. |
| 131 | 131 |
** 051 ES 20241030 Added isFind parameter to pushRecordPhrase method. |
| 132 |
** 052 DDF 20250423 Replaced file with artifact. |
|
| 132 | 133 |
*/ |
| 133 | 134 |
--> |
| 134 | 135 | |
| ... | ... | |
| 351 | 352 |
<rule>tablesList = create("java.lang.StringBuilder")</rule>
|
| 352 | 353 |
<rule>countingTables = false</rule> |
| 353 | 354 |
<rule>tableCount = 0</rule> |
| 354 |
<rule>schema.initializeDictionary(file)</rule>
|
|
| 355 |
<rule>schema.initializeDictionary(artifact)</rule>
|
|
| 355 | 356 |
|
| 356 | 357 |
<rule>functypes = create("java.util.ArrayList")</rule>
|
| 357 | 358 |
<rule>functypes.add(prog.func_char)</rule> |
| new/rules/annotations/legacy_services.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 32 | 32 |
** 008 CA 20230705 Legacy REST services which can be mapped in the .paar file(s) must be marked as "fwd", to |
| 33 | 33 |
** not be removed in legacy_annotations_post.rules. |
| 34 | 34 |
** 009 CA 20250219 Check if the file has an extension, when computing the file name for an operation. |
| 35 |
** 010 DDF 20250423 Replaced file with artifact. |
|
| 36 |
** DDF 20250424 Replaced remaining file with artifact. |
|
| 35 | 37 |
*/ |
| 36 | 38 |
--> |
| 37 | 39 |
|
| ... | ... | |
| 329 | 331 |
</func-library> |
| 330 | 332 | |
| 331 | 333 |
<init-rules> |
| 332 |
<rule>schema.initializeDictionary(file)</rule>
|
|
| 334 |
<rule>schema.initializeDictionary(artifact)</rule>
|
|
| 333 | 335 | |
| 334 | 336 |
<rule>deleteDictionary("annotation")</rule>
|
| 335 | 337 |
|
| ... | ... | |
| 351 | 353 |
</rule> |
| 352 | 354 |
|
| 353 | 355 |
<rule>oname = lower(oname)</rule> |
| 354 |
<rule>iter = srv.getSoapOperations(file, oname, null).iterator()</rule>
|
|
| 356 |
<rule>iter = srv.getSoapOperations(artifact.getRelativePath(), oname, null).iterator()</rule>
|
|
| 355 | 357 |
<while>iter.hasNext() |
| 356 | 358 |
<action>soapOp = iter.next()</action> |
| 357 | 359 |
|
| ... | ... | |
| 397 | 399 |
<action>iename = #(java.lang.String) ref.getAnnotation("name")</action>
|
| 398 | 400 |
</rule> |
| 399 | 401 |
|
| 400 |
<rule>iter = srv.getSoapOperations(file, oname, iename).iterator()</rule>
|
|
| 402 |
<rule>iter = srv.getSoapOperations(artifact.getRelativePath(), oname, iename).iterator()</rule>
|
|
| 401 | 403 |
<while>iter.hasNext() |
| 402 | 404 |
<action>soapOp = iter.next()</action> |
| 403 | 405 |
<action>hasSrvs = true</action> |
| ... | ... | |
| 568 | 570 |
|
| 569 | 571 |
<rule>hasSrvs |
| 570 | 572 |
<action>putNote("with_services", true)</action>
|
| 571 |
<action>withServicesFile(file)</action>
|
|
| 573 |
<action>withServicesFile(artifact.getRelativePath())</action>
|
|
| 572 | 574 |
</rule> |
| 573 | 575 |
</post-rules> |
| 574 | 576 |
</rule-set> |
| new/rules/annotations/load_controls.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 4 | 4 |
** Module : load_controls.rules |
| 5 | 5 |
** Abstract : component-handle:LoadControls rules. |
| 6 | 6 |
** |
| 7 |
** Copyright (c) 2019, Golden Code Development Corporation. |
|
| 7 |
** Copyright (c) 2019-2025, Golden Code Development Corporation.
|
|
| 8 | 8 |
** |
| 9 | 9 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 10 | 10 |
** 001 HC 20190810 Initial version. |
| 11 |
** 002 DDF 20250424 Replaced file with artifact. |
|
| 11 | 12 |
*/ |
| 12 | 13 |
--> |
| 13 | 14 |
<!-- |
| ... | ... | |
| 86 | 87 |
<init-rules> |
| 87 | 88 |
<rule>sections = null</rule> |
| 88 | 89 | |
| 89 |
<rule>fHints = sprintf("%s.ext-hints", file)</rule>
|
|
| 90 |
<rule>fHints = sprintf("%s.ext-hints", artifact.getRelativePath())</rule>
|
|
| 90 | 91 |
<rule>fileWorker.isFile(fHints, true) |
| 91 | 92 |
<action on="false">xmlHintsRoot = null</action> |
| 92 | 93 | |
| new/rules/annotations/naming.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : naming.rules |
| 6 | 6 |
** Abstract : handles adding class and package names |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2005-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ __JPRM__ __________________________________Description__________________________________ |
| 11 | 11 |
** 001 SIY 20051103 @23186 Initial implementation. |
| ... | ... | |
| 66 | 66 |
** @Override annotation. |
| 67 | 67 |
** 022 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 68 | 68 |
** versions, based on node types rather on string paths. |
| 69 |
** 023 DDF 20250424 Replaced file with artifact. |
|
| 69 | 70 |
*/ |
| 70 | 71 |
--> |
| 71 | 72 |
|
| ... | ... | |
| 239 | 240 |
</rule> |
| 240 | 241 | |
| 241 | 242 |
<!-- calc the base Java class name (no pathing and no .java or .class) --> |
| 242 |
<rule>convertedClasses.containsKey(file)
|
|
| 243 |
<action>classname = convertedClasses.get(file)</action>
|
|
| 243 |
<rule>convertedClasses.containsKey(artifact.getRelativePath())
|
|
| 244 |
<action>classname = convertedClasses.get(artifact.getRelativePath())</action>
|
|
| 244 | 245 |
<action>classname = classname.substring(fullpkg.length() + 1)</action> |
| 245 | 246 | |
| 246 | 247 |
<rule on="false">true |
| 247 |
<rule>classname = execLib("convert_classname", file)</rule>
|
|
| 248 |
<rule>classname = execLib("convert_classname", artifact.getRelativePath())</rule>
|
|
| 248 | 249 |
<rule>execLib("checkClassName")</rule>
|
| 249 | 250 |
<rule>classnm = classname</rule> |
| 250 | 251 |
|
| ... | ... | |
| 255 | 256 |
|
| 256 | 257 |
<action>idx = idx + 1</action> |
| 257 | 258 |
</while> |
| 258 |
<rule>convertedClasses.put(file, classfile)</rule>
|
|
| 259 |
<rule>convertedClasses.put(artifact.getRelativePath(), classfile)</rule>
|
|
| 259 | 260 |
</rule> |
| 260 | 261 |
</rule> |
| 261 | 262 |
|
| 262 | 263 |
<rule>putNote("classname", classname)</rule>
|
| 263 |
<rule>srv.isLegacyProxyClient(file)
|
|
| 264 |
<rule>srv.isLegacyProxyClient(artifact.getRelativePath())
|
|
| 264 | 265 |
<variable name="proxyMethodName" type="java.lang.String" /> |
| 265 |
<action>proxyMethodName = file</action>
|
|
| 266 |
<action>proxyMethodName = artifact.getRelativePath()</action>
|
|
| 266 | 267 |
<action>proxyMethodName = execLib("simple_filename", proxyMethodName)</action>
|
| 267 | 268 |
<action>idx = proxyMethodName.lastIndexOf('.')</action>
|
| 268 | 269 |
<rule>idx < 0 |
| ... | ... | |
| 281 | 282 |
<!-- calc the name as it would be used in a Progress RUN statement |
| 282 | 283 |
(which would include any relative pathing such that a PROPATH |
| 283 | 284 |
lookup will find the file) --> |
| 284 |
<rule>relfile = file.substring(basepath.length() + 1)</rule>
|
|
| 285 |
<rule>relfile = artifact.getRelativePath().substring(basepath.length() + 1)</rule>
|
|
| 285 | 286 |
<!-- force to use '/' Linux style file separator for name_map.xml class mapping entries --> |
| 286 | 287 |
<rule>projectsep = "/"</rule> |
| 287 | 288 |
<rule>projectsep != fileSep |
| ... | ... | |
| 335 | 336 |
<!-- store the qualified OO class or interface name at the root --> |
| 336 | 337 |
<action>ooname = text</action> |
| 337 | 338 |
<!-- this needs to be done first --> |
| 338 |
<action>setConvertedClassName(file, ooname, fullpkg, classname)</action>
|
|
| 339 |
<action>setConvertedClassName(artifact.getRelativePath(), ooname, fullpkg, classname)</action>
|
|
| 339 | 340 |
<!-- map the source file name to the converted class naming info --> |
| 340 |
<action>clsdef = loadConvertedClass(file, true, this)</action>
|
|
| 341 |
<action>clsdef = loadConvertedClass(artifact.getRelativePath(), true, this)</action>
|
|
| 341 | 342 |
|
| 342 | 343 |
<!-- save the converted default constructor name at the root node --> |
| 343 | 344 |
<rule>relativePath(this, prog.class_def, prog.kw_class, prog.symbol) |
| new/rules/annotations/native_api.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 4 | 4 |
** Module : native_api.rules |
| 5 | 5 |
** Abstract : Convert usages of Native API functions. |
| 6 | 6 |
** |
| 7 |
** Copyright (c) 2018-2020, Golden Code Development Corporation.
|
|
| 7 |
** Copyright (c) 2018-2025, Golden Code Development Corporation.
|
|
| 8 | 8 |
** |
| 9 | 9 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 10 | 10 |
** 001 HC 20181209 Initial version. |
| ... | ... | |
| 12 | 12 |
** HC 20190206 Fixed resolution of external library name. |
| 13 | 13 |
** HC 20190305 Fixed conversion of memptr parameter type. |
| 14 | 14 |
** 003 HC 20200324 Added missing memptr type mapping. |
| 15 |
** 004 DDF 20250424 Replaced file with artifact. |
|
| 15 | 16 |
*/ |
| 16 | 17 |
--> |
| 17 | 18 |
<!-- |
| ... | ... | |
| 90 | 91 |
<variable name="lnum" type="java.lang.Long" /> |
| 91 | 92 | |
| 92 | 93 |
<init-rules> |
| 93 |
<rule>fHints = sprintf("%s.ext-hints", file)</rule>
|
|
| 94 |
<rule>fHints = sprintf("%s.ext-hints", artifact.getRelativePath())</rule>
|
|
| 94 | 95 |
<rule>fileWorker.isFile(fHints, true) |
| 95 | 96 |
<action on="false">xmlHintsRoot = null</action> |
| 96 | 97 | |
| new/rules/annotations/ocx_conversion.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 4 | 4 |
** Module : ocx_conversion.rules |
| 5 | 5 |
** Abstract : Converts supported OCX objects to 4GL widgets. |
| 6 | 6 |
** |
| 7 |
** Copyright (c) 2018-2024, Golden Code Development Corporation.
|
|
| 7 |
** Copyright (c) 2018-2025, Golden Code Development Corporation.
|
|
| 8 | 8 |
** |
| 9 | 9 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 10 | 10 |
** 001 HC 20181127 Initial version. |
| ... | ... | |
| 94 | 94 |
** versions, based on node types rather on string paths. |
| 95 | 95 |
** 015 CA 20240115 Do not annotate a function or OO method call with 'wrap', instead annotate any literal |
| 96 | 96 |
** argument, as the parent call can be used as an argument itself. |
| 97 |
** 016 DDF 20250424 Replaced file with artifact. |
|
| 97 | 98 |
*/ |
| 98 | 99 |
--> |
| 99 | 100 | |
| ... | ... | |
| 243 | 244 |
<rule>dropProc = null</rule> |
| 244 | 245 |
<rule>dropNodes = create("java.util.HashSet")</rule>
|
| 245 | 246 | |
| 246 |
<rule>fHints = sprintf("%s.ext-hints", file)</rule>
|
|
| 247 |
<rule>fHints = sprintf("%s.ext-hints", artifact.getRelativePath())</rule>
|
|
| 247 | 248 |
<rule>fileWorker.isFile(fHints, true) |
| 248 | 249 |
<action on="false">xmlHintsRoot = null</action> |
| 249 | 250 | |
| new/rules/annotations/proxy_programs.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : proxy_programs.xml |
| 6 | 6 |
** Abstract : mark legacy services proxy programs |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2022-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2022-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _______________________________________Description________________________________________ |
| 11 | 11 |
** 001 CA 20220513 Created initial version, extracted from legacy_services.rules. |
| 12 | 12 |
** CA 20230125 Ignore FORWARD functions. |
| 13 | 13 |
** 002 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 14 | 14 |
** versions, based on node types rather on string paths. |
| 15 |
** 003 DDF 20250424 Replaced file with artifact. |
|
| 15 | 16 |
*/ |
| 16 | 17 |
--> |
| 17 | 18 | |
| ... | ... | |
| 80 | 81 | |
| 81 | 82 |
<rule-set> |
| 82 | 83 |
<init-rules> |
| 83 |
<rule>proxyClient = srv.isLegacyProxyClient(file)</rule>
|
|
| 84 |
<rule>proxyClient = srv.isLegacyProxyClient(artifact.getRelativePath())</rule>
|
|
| 84 | 85 |
</init-rules> |
| 85 | 86 |
|
| 86 | 87 |
<walk-rules>> |
| new/rules/annotations/record_field_expansion.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : record_field_expansion.rules |
| 6 | 6 |
** Abstract : convert implicit field refs into explicit versions |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2005-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________ |
| 11 | 11 |
** 001 GES 20051103 @23224 Some UI and I/O language statements support syntax where a record |
| ... | ... | |
| 33 | 33 |
** versions, based on node types rather on string paths. |
| 34 | 34 |
** 013 AL2 20240529 Release the schema dictionary at the very end. Otherwise, it will cause NPE |
| 35 | 35 |
** in other rule sets that use the schema dictionary at the same time. |
| 36 |
** 014 DDF 20250423 Replaced file with artifact. |
|
| 36 | 37 |
*/ |
| 37 | 38 |
--> |
| 38 | 39 | |
| ... | ... | |
| 191 | 192 |
|
| 192 | 193 |
<!-- init the schema dictionary and ensure it has the source |
| 193 | 194 |
file specific temp-table data --> |
| 194 |
<action>schemaw.initializeDictionary(file)</action>
|
|
| 195 |
<action>schemaw.initializeDictionary(artifact)</action>
|
|
| 195 | 196 |
<action>sym.schemaDictionary = schemaw.dictionary</action> |
| 196 | 197 |
|
| 197 | 198 |
<!-- obtain the source nodes to expand, cache some key info and |
| new/rules/annotations/return_statements.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : return_statements.rules |
| 6 | 6 |
** Abstract : differentiate between function style and procedure style returns |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2005-2022, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ __JPRM__ __________________________________Description____________________________________ |
| 11 | 11 |
** 001 GES 20050919 @22808 Annotate return statements to note if executed from a function or |
| ... | ... | |
| 22 | 22 |
** 007 CA 20200324 For RETURN ERROR, void OO methods are not functions. |
| 23 | 23 |
** 008 CA 20220520 RETURN statements returning an unknown OO var must strong-type the 'object' |
| 24 | 24 |
** instance with the function's/method's return qualified type. |
| 25 |
** 009 DDF 20250424 Replaced file with artifact. |
|
| 25 | 26 |
*/ |
| 26 | 27 |
--> |
| 27 | 28 |
|
| ... | ... | |
| 181 | 182 |
<rule>btype == prog.trigger_block and descendant(prog.kw_error, 1) |
| 182 | 183 |
<action> |
| 183 | 184 |
printfln("## WARNING: %s: %d: RETURN ERROR invalid in TRIGGER",
|
| 184 |
file,
|
|
| 185 |
artifact.getRelativePath(),
|
|
| 185 | 186 |
copy.line) |
| 186 | 187 |
</action> |
| 187 | 188 |
</rule> |
| new/rules/callgraph/events.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : events.rules |
| 6 | 6 |
** Abstract : Process events and trigger calls. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2017-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2017-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _______________________________________Description_______________________________________ |
| 11 | 11 |
** 001 CA 20170522 Call graph analysis v3. |
| ... | ... | |
| 13 | 13 |
** OM 20220330 Moved database conversion artifacts to ${cvtpath} folder.
|
| 14 | 14 |
** 003 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 15 | 15 |
** versions, based on node types rather on string paths. |
| 16 |
** 004 DDF 20250423 Replaced file with artifact. |
|
| 17 |
** DDF 20250423 Replaced filename with artifact. |
|
| 16 | 18 |
*/ |
| 17 | 19 |
--> |
| 18 | 20 | |
| ... | ... | |
| 122 | 124 |
</func-library> |
| 123 | 125 |
|
| 124 | 126 |
<init-rules> |
| 125 |
<rule>sw.initializeDictionary(file)</rule>
|
|
| 127 |
<rule>sw.initializeDictionary(artifact)</rule>
|
|
| 126 | 128 |
<rule>schemaConfig = sw.getSchemaConfig()</rule> |
| 127 | 129 |
<rule>sdict = sw.getDictionary()</rule> |
| 128 | 130 |
<rule>dbname = null</rule> |
| ... | ... | |
| 151 | 153 |
<rule>dbV == null |
| 152 | 154 |
<!-- add the vertex for the source file --> |
| 153 | 155 |
<action> |
| 154 |
schemafile = cgw.createFileResource("Schema File", prog.schema_file, dbRef.filename)
|
|
| 156 |
schemafile = cgw.createFileResource("Schema File",
|
|
| 157 |
prog.schema_file, |
|
| 158 |
dbRef.artifact.getRelativePath()) |
|
| 155 | 159 |
</action> |
| 156 | 160 |
<action>cgw.property(schemafile, "srcfile", dbRef.getAnnotation("srcfile"))</action>
|
| 157 | 161 |
|
| new/rules/callgraph/function_calls.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 6 | 6 |
** Abstract : processing of the function calls and (explicit and dynamic) for the |
| 7 | 7 |
** generate_call_graph.xml |
| 8 | 8 |
** |
| 9 |
** Copyright (c) 2017-2023, Golden Code Development Corporation.
|
|
| 9 |
** Copyright (c) 2017-2025, Golden Code Development Corporation.
|
|
| 10 | 10 |
** |
| 11 | 11 |
** _#_ _I_ __Date__ ________________________________Description___________________________________ |
| 12 | 12 |
** 001 CA 20170517 Call graph analysis v3. |
| ... | ... | |
| 18 | 18 |
** CA 20180525 Callgraph improvements - changes in tx management, vertex caching and more. |
| 19 | 19 |
** 004 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 20 | 20 |
** versions, based on node types rather on string paths. |
| 21 |
** 005 DDF 20250423 Replaced filename with artifact. |
|
| 21 | 22 |
*/ |
| 22 | 23 |
--> |
| 23 | 24 | |
| ... | ... | |
| 184 | 185 |
<action>callSiteKey = prog.function_call</action> |
| 185 | 186 | |
| 186 | 187 |
<action> |
| 187 |
targetV = execLib("resolve_function_vertex", target, this.filename)
|
|
| 188 |
targetV = execLib("resolve_function_vertex", target, this.artifact.getRelativePath())
|
|
| 188 | 189 |
</action> |
| 189 | 190 | |
| 190 | 191 |
<action>execLib("link_to_target_vertex", container, callSite, callSiteKey, targetV)</action>
|
| ... | ... | |
| 223 | 224 |
</rule> |
| 224 | 225 | |
| 225 | 226 |
<!-- check for ADM/ADM2 related calls --> |
| 226 |
<rule>this.filename.endsWith("adm2/containr.p")
|
|
| 227 |
<rule>this.artifact.getRelativePath().endsWith("adm2/containr.p")
|
|
| 227 | 228 |
<action>procV = cgw.findParentAstVertex(container, prog.internal_procedure)</action> |
| 228 | 229 |
<rule>procV != null |
| 229 | 230 |
<rule>cgw.property(procV, "procedure").equals("assignpageproperty")
|
| new/rules/callgraph/generate_call_graph.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : generate_call_graph.xml |
| 6 | 6 |
** Abstract : build call graph and unused files list. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2005-2020, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ __JPRM__ ____________________________Description______________________________ |
| 11 | 11 |
** 001 SIY 20050719 @21724 Generate call graph and dead files list. |
| ... | ... | |
| 22 | 22 |
** CA 20180525 Callgraph improvements - changes in tx management, vertex caching and |
| 23 | 23 |
** more. |
| 24 | 24 |
** 007 CA 20200412 Added incremental conversion support. |
| 25 |
** 008 DDF 20250423 Replaced filename with artifact. |
|
| 25 | 26 |
*/ |
| 26 | 27 |
--> |
| 27 | 28 | |
| ... | ... | |
| 112 | 113 |
<variable name="hintCounters" type="java.util.Map"/> |
| 113 | 114 |
|
| 114 | 115 |
<init-rules> |
| 115 |
<rule>thisAdmProgram = evalLib("is_adm_program", this.filename)</rule>
|
|
| 116 |
<rule>procfile = cgw.findUniqueNode("filename", cgw.prepareFilename(this.filename))</rule>
|
|
| 116 |
<rule>thisAdmProgram = evalLib("is_adm_program", this.artifact.getRelativePath())</rule>
|
|
| 117 |
<rule> |
|
| 118 |
procfile = cgw.findUniqueNode("filename", cgw.prepareFilename(this.artifact.getRelativePath()))
|
|
| 119 |
</rule> |
|
| 117 | 120 |
<rule>cgw.markReachable(procfile)</rule> |
| 118 | 121 |
<rule>cgw.markLive(procfile)</rule> |
| 119 | 122 |
<rule>app_entry_point = cgw.property(procfile, "app-entry-point")</rule> |
| new/rules/callgraph/generate_call_graph_post.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : generate_call_graph_post.xml |
| 6 | 6 |
** Abstract : rules executed once the initial graph is completed. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2017-2018, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2017-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ ________________________________Description___________________________________ |
| 11 | 11 |
** 001 CA 20170604 Call graph analysis v3. |
| 12 | 12 |
** 002 CA 20180328 Performance optimizations. |
| 13 | 13 |
** 003 CA 20180525 Callgraph improvements - changes in tx management, vertex caching and more. |
| 14 |
** 004 DDF 20250423 Replaced filename with artifact. |
|
| 14 | 15 |
*/ |
| 15 | 16 |
--> |
| 16 | 17 | |
| ... | ... | |
| 95 | 96 |
<variable name="hintCounters" type="java.util.Map"/> |
| 96 | 97 |
|
| 97 | 98 |
<init-rules> |
| 98 |
<rule>procfile = cgw.findUniqueNode("filename", cgw.prepareFilename(this.filename))</rule>
|
|
| 99 |
<rule> |
|
| 100 |
procfile = cgw.findUniqueNode("filename", cgw.prepareFilename(this.artifact.getRelativePath()))
|
|
| 101 |
</rule> |
|
| 99 | 102 |
<rule>extproc = cgw.findNodeById(prog.external_procedure, this.id)</rule> |
| 100 | 103 |
<rule>hintCounters = create("java.util.HashMap")</rule>
|
| 101 | 104 | |
| new/rules/callgraph/list_ambiguous.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : list_ambiguous.rules |
| 6 | 6 |
** Abstract : Tool to list all ambiguous call sites. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2014-2017, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 11 | 11 |
** 001 CA 20140313 Created initial version. |
| 12 | 12 |
** 002 CA 20140403 Fixed filename output on windows OS. |
| 13 | 13 |
** 003 GES 20170426 Call graph analysis v3. |
| 14 |
** 004 DDF 20250423 Replaced filename with artifact. |
|
| 14 | 15 |
*/ |
| 15 | 16 |
--> |
| 16 | 17 | |
| ... | ... | |
| 85 | 86 |
<rule>this.parent == null |
| 86 | 87 |
<action>first = true</action> |
| 87 | 88 | |
| 88 |
<action>fhname = sprintf("%s.hints", this.filename)</action>
|
|
| 89 |
<action>fhname = sprintf("%s.hints", this.artifact.getRelativePath())</action>
|
|
| 89 | 90 |
<rule>createEmptyHints |
| 90 | 91 |
<action>io.deleteFile(fhname, false)</action> |
| 91 | 92 |
</rule> |
| ... | ... | |
| 100 | 101 |
<action>iter = cgw.edgeIterator(out, "ambiguous")</action> |
| 101 | 102 |
|
| 102 | 103 |
<rule>first and iter.hasNext() |
| 103 |
<action>fprintf(fname, "\nFilename: %s\n", fixupFileName(this.filename))</action> |
|
| 104 |
<action> |
|
| 105 |
fprintf(fname, "\nFilename: %s\n", fixupFileName(this.artifact.getRelativePath())) |
|
| 106 |
</action> |
|
| 104 | 107 |
<action>first = false</action> |
| 105 | 108 | |
| 106 | 109 |
<rule>createEmptyHints |
| new/rules/callgraph/list_dead_files.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : list_dead_files.rules |
| 6 | 6 |
** Abstract : Tool to list all dead files. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2014-2017, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 11 | 11 |
** 001 CA 20140313 Created initial version. |
| 12 | 12 |
** 002 CA 20140403 Fixed filename output on windows OS. |
| 13 | 13 |
** 003 CA 20140513 Fixed a problem when determining if an include file is dead or not. |
| 14 | 14 |
** 004 GES 20170501 Call graph v3. |
| 15 |
** 005 DDF 20250423 Replaced filename with artifact. |
|
| 15 | 16 |
*/ |
| 16 | 17 |
--> |
| 17 | 18 | |
| ... | ... | |
| 87 | 88 |
#(java.lang.Boolean) cgw.property(out, "app-entry-point") == false |
| 88 | 89 |
<action>iter = cgw.vertexTraversalInE(out)</action> |
| 89 | 90 |
<rule>!iter.hasNext() |
| 90 |
<action>fprintf(fname, "%s\n", fixupFileName(this.filename))</action>
|
|
| 91 |
<action>fprintf(fname, "%s\n", fixupFileName(this.artifact.getRelativePath()))</action>
|
|
| 91 | 92 | |
| 92 | 93 |
<!-- collect all the include nodes in the include sub-graph for this dead file --> |
| 93 | 94 |
<action>iter = cgw.traversalIterator(out, "includes")</action> |
| new/rules/callgraph/list_dependencies.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : list_dependencies.rules |
| 6 | 6 |
** Abstract : List the direct dependencies for all external procedures. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2014-2017, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 11 | 11 |
** 001 CA 20140313 Created initial version. |
| 12 | 12 |
** 002 CA 20140403 Fixed filename output on windows OS. |
| 13 | 13 |
** 003 GES 20170426 Call graph analysis v3. |
| 14 |
** 004 DDF 20250423 Replaced filename with artifact. |
|
| 14 | 15 |
*/ |
| 15 | 16 |
--> |
| 16 | 17 | |
| ... | ... | |
| 99 | 100 |
</action> |
| 100 | 101 |
|
| 101 | 102 |
<rule>first and iter.hasNext() |
| 102 |
<action>fprintf(fname, "\nFilename: %s\n", fixupFileName(this.filename))</action> |
|
| 103 |
<action> |
|
| 104 |
fprintf(fname, "\nFilename: %s\n", fixupFileName(this.artifact.getRelativePath())) |
|
| 105 |
</action> |
|
| 103 | 106 |
<action>first = false</action> |
| 104 | 107 |
</rule> |
| 105 | 108 |
|
| new/rules/callgraph/list_external_targets.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : list_external_targets.rules |
| 6 | 6 |
** Abstract : Tool to list all external dependencies. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2014-2017, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 11 | 11 |
** 001 CA 20140313 Created initial version. List all nodes marked as "external" and the location |
| 12 | 12 |
** where they are called. |
| 13 | 13 |
** 002 CA 20140403 Fixed filename output on windows OS. |
| 14 | 14 |
** 003 GES 20170426 Call graph analysis v3. |
| 15 |
** 004 DDF 20250423 Replaced filename with artifact. |
|
| 15 | 16 |
*/ |
| 16 | 17 |
--> |
| 17 | 18 | |
| ... | ... | |
| 101 | 102 |
|
| 102 | 103 |
<rule>cgw.property(in, "external") != null |
| 103 | 104 |
<rule>first |
| 104 |
<action>fprintf(fname, "\nFilename: %s\n", fixupFileName(this.filename))</action> |
|
| 105 |
<action> |
|
| 106 |
fprintf(fname, "\nFilename: %s\n", fixupFileName(this.artifact.getRelativePath())) |
|
| 107 |
</action> |
|
| 105 | 108 |
<action>first = false</action> |
| 106 | 109 |
</rule> |
| 107 | 110 |
|
| new/rules/callgraph/list_missing.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : list_missing.rules |
| 6 | 6 |
** Abstract : Tool to list all missing 4GL programs and include files. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2014-2017, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 11 | 11 |
** 001 CA 20140313 Created initial version. |
| 12 | 12 |
** 002 CA 20140403 Fixed filename output on windows OS. |
| 13 | 13 |
** 003 GES 20170426 Call graph analysis v3. |
| 14 |
** 004 DDF 20250423 Replaced filename with artifact. |
|
| 14 | 15 |
*/ |
| 15 | 16 |
--> |
| 16 | 17 | |
| ... | ... | |
| 103 | 104 |
<rule>inType == prog.missing |
| 104 | 105 |
<rule>first |
| 105 | 106 |
<action> |
| 106 |
fprintf(fname, "\nFilename: %s\n", fixupFileName(this.filename))
|
|
| 107 |
fprintf(fname, "\nFilename: %s\n", fixupFileName(this.artifact.getRelativePath()))
|
|
| 107 | 108 |
</action> |
| 108 | 109 |
<action>first = false</action> |
| 109 | 110 |
</rule> |
| new/rules/callgraph/load_code_set.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : load_code_set.xml |
| 6 | 6 |
** Abstract : Load all the legacy files for the entire code set. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2014-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _______________________________________Description_______________________________________ |
| 11 | 11 |
** 001 CA 20140306 Created initial version. Loads all the legacy files (4GL programs and |
| ... | ... | |
| 18 | 18 |
** 006 CA 20200428 Legacy DEFINE ENUM conversion support. |
| 19 | 19 |
** 007 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 20 | 20 |
** versions, based on node types rather on string paths. |
| 21 |
** 008 DDF 20250423 Replaced filename with artifact. |
|
| 21 | 22 |
*/ |
| 22 | 23 |
--> |
| 23 | 24 | |
| ... | ... | |
| 146 | 147 |
<init-rules> |
| 147 | 148 |
<!-- check if the procedure file node exists --> |
| 148 | 149 |
<rule> |
| 149 |
procfile = cgw.findUniqueNode("os-filename", this.filename)
|
|
| 150 |
procfile = cgw.findUniqueNode("os-filename", this.artifact.getRelativePath())
|
|
| 150 | 151 |
</rule> |
| 151 | 152 | |
| 152 | 153 |
<rule>procfile == null |
| ... | ... | |
| 154 | 155 |
<action> |
| 155 | 156 |
procfile = cgw.createFileResource("Procedure File",
|
| 156 | 157 |
prog.procedure_file, |
| 157 |
this.filename)
|
|
| 158 |
this.artifact)
|
|
| 158 | 159 |
</action> |
| 159 | 160 |
|
| 160 |
<rule>evalLib("is_adm_program", this.filename)
|
|
| 161 |
<rule>evalLib("is_adm_program", this.artifact.getRelativePath())
|
|
| 161 | 162 |
<action>cgw.property(procfile, "adm-program", true)</action> |
| 162 | 163 |
</rule> |
| 163 | 164 |
</rule> |
| ... | ... | |
| 171 | 172 |
extproc = cgw.createAstNode(procfile, this, prog.external_procedure, true) |
| 172 | 173 |
</action> |
| 173 | 174 |
<action>cgw.property(extproc, "node-key", "external-procedure")</action> |
| 174 |
<action>cgw.property(extproc, "external-procedure", this.filename)</action>
|
|
| 175 |
<action>cgw.property(extproc, "external-procedure", this.artifact.getRelativePath())</action>
|
|
| 175 | 176 | |
| 176 | 177 |
<!-- this is a new AST, load its include graph --> |
| 177 | 178 |
<action>cgw.createIncludeGraph(this)</action> |
| new/rules/callgraph/load_code_set_post.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : load_code_set_post.xml |
| 6 | 6 |
** Abstract : Rules to be executed after the code-set was loaded. |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2017-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2017-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ _______________________________________Description_______________________________________ |
| 11 | 11 |
** 001 CA 20170517 Call graph analysis v3. |
| ... | ... | |
| 23 | 23 |
** 005 CA 20191015 Used is_builtin_cls to check if a class ref is built-in. |
| 24 | 24 |
** 006 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 25 | 25 |
** versions, based on node types rather on string paths. |
| 26 |
** 007 DDF 20250423 Replaced filename with artifact. |
|
| 26 | 27 |
*/ |
| 27 | 28 |
--> |
| 28 | 29 | |
| ... | ... | |
| 165 | 166 |
<init-rules> |
| 166 | 167 |
<rule>hintCounters = create("java.util.HashMap")</rule>
|
| 167 | 168 | |
| 168 |
<rule>procfile = cgw.findUniqueNode("filename", cgw.prepareFilename(this.filename))</rule>
|
|
| 169 |
<rule> |
|
| 170 |
procfile = cgw.findUniqueNode("filename", cgw.prepareFilename(this.artifact.getRelativePath()))
|
|
| 171 |
</rule> |
|
| 169 | 172 |
<rule>extproc = cgw.findNodeById(prog.external_procedure, this.id)</rule> |
| 170 | 173 |
<rule>container = extproc</rule> |
| 171 | 174 | |
| new/rules/callgraph/load_schema_triggers.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 6 | 6 |
** Abstract : Loads all the tables with defined schema-triggers and links them with the |
| 7 | 7 |
** target external program. |
| 8 | 8 |
** |
| 9 |
** Copyright (c) 2014-2018, Golden Code Development Corporation.
|
|
| 9 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 10 | 10 |
** |
| 11 | 11 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 12 | 12 |
** 001 CA 20140313 Created initial version. |
| ... | ... | |
| 22 | 22 |
** with NO_PROCEDURE_SPECIFIED_AT_TRIGGER_DEFINITION. |
| 23 | 23 |
** 006 CA 20191007 Fixed some issues after changes in the .schema AST (nodes were moved to |
| 24 | 24 |
** annotations). |
| 25 |
** 007 DDF 20250423 Replaced file with artifact. |
|
| 26 |
** DDF 20250423 Replaced filename with artifact. |
|
| 25 | 27 |
*/ |
| 26 | 28 |
--> |
| 27 | 29 | |
| ... | ... | |
| 105 | 107 |
<variable name="tIter" type="java.util.Iterator" /> |
| 106 | 108 |
|
| 107 | 109 |
<init-rules> |
| 108 |
<rule>sw.initializeDictionary(file)</rule>
|
|
| 110 |
<rule>sw.initializeDictionary(artifact)</rule>
|
|
| 109 | 111 |
<rule>sw.loadNonDefaults()</rule> |
| 110 | 112 |
<rule>sdict = sw.getDictionary()</rule> |
| 111 | 113 | |
| ... | ... | |
| 122 | 124 |
<action> |
| 123 | 125 |
schemafile = cgw.createFileResource("Schema File",
|
| 124 | 126 |
prog.schema_file, |
| 125 |
this.filename)
|
|
| 127 |
this.artifact)
|
|
| 126 | 128 |
</action> |
| 127 | 129 |
<action>cgw.property(schemafile, "srcfile", getNoteString("srcfile"))</action>
|
| 128 | 130 |
|
| new/rules/callgraph/run_statements.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 5 | 5 |
** Module : run_statements.rules |
| 6 | 6 |
** Abstract : processing of the run statements for the generate_call_graph.xml |
| 7 | 7 |
** |
| 8 |
** Copyright (c) 2005-2023, Golden Code Development Corporation.
|
|
| 8 |
** Copyright (c) 2005-2025, Golden Code Development Corporation.
|
|
| 9 | 9 |
** |
| 10 | 10 |
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________ |
| 11 | 11 |
** 001 SIY 20050719 @21730 Extracted from the generate_call_graph.xml. |
| ... | ... | |
| 25 | 25 |
** more. |
| 26 | 26 |
** 008 OM 20230115 Replaced absolutePath(), relativePath(), upPath() and downPath() with faster |
| 27 | 27 |
** versions, based on node types rather on string paths. |
| 28 |
** 009 DDF 20250423 Replaced filename with artifact. |
|
| 28 | 29 |
*/ |
| 29 | 30 |
--> |
| 30 | 31 | |
| ... | ... | |
| 357 | 358 |
<action>target = chRef.text.toLowerCase()</action> |
| 358 | 359 |
<action>callSiteKey = prog.run_int_proc</action> |
| 359 | 360 |
<action> |
| 360 |
targetV = execLib("resolve_internal_procedure_vertex", target, this.filename)
|
|
| 361 |
targetV = execLib("resolve_internal_procedure_vertex",
|
|
| 362 |
target, |
|
| 363 |
this.artifact.getRelativePath()) |
|
| 361 | 364 |
</action> |
| 362 | 365 | |
| 363 | 366 |
<rule>targetV != null |
| ... | ... | |
| 401 | 404 |
fetchfirst or fetchlast --> |
| 402 | 405 |
<action>procV = cgw.findParentAstVertex(container, prog.function)</action> |
| 403 | 406 |
<rule>procV != null and cgw.property(procV, "function").equals("openquery")
|
| 404 |
<rule>this.filename.endsWith("adm2/query.p") and
|
|
| 407 |
<rule>this.artifact.getRelativePath().endsWith("adm2/query.p") and
|
|
| 405 | 408 |
downPath(this, prog.kw_value, prog.expression, prog.plus, prog.string) |
| 406 | 409 |
<action> |
| 407 | 410 |
target = this.firstChild.firstChild.firstChild.firstChild.text |
| ... | ... | |
| 415 | 418 |
</rule> |
| 416 | 419 |
</rule> |
| 417 | 420 | |
| 418 |
<rule>this.filename.endsWith("adm2/data.p")
|
|
| 421 |
<rule>this.artifact.getRelativePath().endsWith("adm2/data.p")
|
|
| 419 | 422 |
<action> |
| 420 | 423 |
procV = cgw.findParentAstVertex(container, prog.internal_procedure) |
| 421 | 424 |
</action> |
| ... | ... | |
| 467 | 470 |
</rule> |
| 468 | 471 |
</rule> |
| 469 | 472 | |
| 470 |
<rule>this.filename.endsWith("adm2/containr.p")
|
|
| 473 |
<rule>this.artifact.getRelativePath().endsWith("adm2/containr.p")
|
|
| 471 | 474 |
<action> |
| 472 | 475 |
procV = cgw.findParentAstVertex(container, prog.internal_procedure) |
| 473 | 476 |
</action> |
| ... | ... | |
| 490 | 493 |
</rule> |
| 491 | 494 |
</rule> |
| 492 | 495 | |
| 493 |
<rule>this.filename.endsWith("adm2/smart.p")
|
|
| 496 |
<rule>this.artifact.getRelativePath().endsWith("adm2/smart.p")
|
|
| 494 | 497 |
<action> |
| 495 | 498 |
procV = cgw.findParentAstVertex(container, prog.internal_procedure) |
| 496 | 499 |
</action> |
| ... | ... | |
| 589 | 592 | |
| 590 | 593 |
<action>callSiteKey = prog.run_int_proc</action> |
| 591 | 594 |
<action> |
| 592 |
targetV = execLib("resolve_internal_procedure_vertex", target, this.filename)
|
|
| 595 |
targetV = execLib("resolve_internal_procedure_vertex",
|
|
| 596 |
target, |
|
| 597 |
this.artifact.getRelativePath()) |
|
| 593 | 598 |
</action> |
| 594 | 599 | |
| 595 | 600 |
<rule>targetV != null |
| new/rules/callgraph/verify_schema_triggers.rules 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 6 | 6 |
** Abstract : Tool to verify problems in schema trigger definitions or external programs defined |
| 7 | 7 |
** as a schema trigger. |
| 8 | 8 |
** |
| 9 |
** Copyright (c) 2014-2017, Golden Code Development Corporation.
|
|
| 9 |
** Copyright (c) 2014-2025, Golden Code Development Corporation.
|
|
| 10 | 10 |
** |
| 11 | 11 |
** _#_ _I_ __Date__ _________________________________Description__________________________________ |
| 12 | 12 |
** 001 CA 20140313 Created initial version. |
| 13 | 13 |
** 002 CA 20140403 Fixed filename output on windows OS. |
| 14 | 14 |
** 003 CA 20140715 Fixed typo related to node type "trigger-type". |
| 15 | 15 |
** 004 GES 20170426 Call graph analysis v3. |
| 16 |
** 005 DDF 20250423 Replaced filename with artifact. |
|
| 16 | 17 |
*/ |
| 17 | 18 |
--> |
| 18 | 19 | |
| ... | ... | |
| 81 | 82 | |
| 82 | 83 |
<rule>first |
| 83 | 84 |
<action> |
| 84 |
fprintf(fname, sprintf("\nFilename: %s\n", fixupFileName(this.filename)))
|
|
| 85 |
fprintf(fname, sprintf("\nFilename: %s\n", fixupFileName(this.artifact.getRelativePath())))
|
|
| 85 | 86 |
</action> |
| 86 | 87 |
<action>first = false</action> |
| 87 | 88 |
</rule> |
| new/rules/convert/frame_generator.xml 2025-05-09 07:59:16 +0000 | ||
|---|---|---|
| 420 | 420 |
** 228 EM 20241002 Suppressed the display of database labels in FORM if NO-LABELS is present. |
| 421 | 421 |
** EM 20241010 Suppressed the display of database labels in FRAME if NO-LABELS is present. |
| 422 | 422 |
** 229 AOG 20250217 Changed the way filename is extracted for image phrases / button images. |
| 423 |
** 230 DDF 20250423 Refactor usage of filenames and replace them with artifacts. |
|
| 424 |
** DDF 20250424 Replaced file with artifact. |
|
| 423 | 425 |
*/ |
| 424 | 426 |
--> |
| 425 | 427 | |
| ... | ... | |
| 520 | 522 |
<worker class="com.goldencode.p2j.pattern.TemplateWorker" namespace="tw" /> |
| 521 | 523 |
<worker class="com.goldencode.p2j.convert.ExpressionConversionWorker" namespace="ecw" /> |
| 522 | 524 |
<worker class="com.goldencode.p2j.convert.I18nWorker" namespace="trw" /> |
| 525 |
<worker class="com.goldencode.artifacts.ArtifactWorker" namespace="art" /> |
|
| 523 | 526 |
|
| 524 | 527 |
<!-- expression libraries --> |
| 525 | 528 |
<include name="common-progress" /> |
| ... | ... | |
| 1043 | 1046 |
<!-- generate Java AST --> |
| 1044 | 1047 |
<function name="init_jast"> |
| 1045 | 1048 |
<parameter name="fnode" type="com.goldencode.ast.Aast" /> |
| 1046 |
<return name="fname" type="java.lang.String" />
|
|
| 1049 |
<return name="fartifact" type="com.goldencode.artifacts.Artifact" />
|
|
| 1047 | 1050 |
<variable name="cname" type="java.lang.String" /> |
| 1048 | 1051 |
<variable name="ext" type="java.lang.String" /> |
| 1049 | 1052 |
<variable name="rule" type="java.lang.String" /> |
| 1050 | 1053 |
<variable name="pkgname" type="java.lang.String" /> |
| 1051 | 1054 |
<variable name="acc" type="java.lang.String" /> |
| 1052 | 1055 |
<variable name="id" init="javaRootId" /> |
| 1053 |
|
|
| 1056 | ||
| 1054 | 1057 |
<rule>true |
| 1055 | 1058 |
<action>cname = execLib("gen_cname", fnode, true)</action>
|
| 1056 |
<action>fname = execLib("gen_fname", cname)</action>
|
|
| 1057 |
|
|
| 1059 |
<action>fartifact = execLib("gen_fartifact", cname)</action>
|
|
| 1060 | ||
| 1058 | 1061 |
<action>pkgname = #(java.lang.String) fnode.getAnnotation("pkgname")</action>
|
| 1059 |
|
|
| 1060 |
<action>createJavaFile(fname, true)</action>
|
|
| 1062 | ||
| 1063 |
<action>createJavaFile(fartifact, true)</action>
|
|
| 1061 | 1064 |
<action>createJavaAst(java.kw_package, pkgname, javaRootId)</action> |
| 1062 | 1065 |
|
| 1063 | 1066 |
<action>createImport("com.goldencode.p2j.util.*")</action>
|
| ... | ... | |
| 2970 | 2973 |
<rule>ref.type == prog.kw_x_of or ref.type == prog.kw_col_of |
| 2971 | 2974 |
<action> |
| 2972 | 2975 |
printfln("## Error:: unsupported option %s/%s in %s %d",
|
| 2973 |
ref.parent, ref, file, line)
|
|
| 2976 |
ref.parent, ref, artifact.getRelativePath(), line)
|
|
| 2974 | 2977 |
</action> |
| 2975 | 2978 |
</rule> |
| 2976 | 2979 |
<rule>ref.type == prog.kw_y_of or ref.type == prog.kw_row_of |
| 2977 | 2980 |
<action> |
| 2978 | 2981 |
printfln("## Error:: unsupported option %s/%s in %s %d",
|
| 2979 |
ref.parent, ref, file, line)
|
|
| 2982 |
ref.parent, ref, artifact.getRelativePath(), line)
|
|
| 2980 | 2983 |
</action> |
| 2981 | 2984 |
</rule> |
| 2982 | 2985 | |
| ... | ... | |
| 3417 | 3420 |
<rule>ref.type == prog.kw_x_of or ref.type == prog.kw_col_of |
| 3418 | 3421 |
<action> |
| 3419 | 3422 |
printfln("## Error:: unsupported option %s/%s in %s %d",
|
| 3420 |
ref.parent, ref, file, line)
|
|
| 3423 |
ref.parent, ref, artifact.getRelativePath(), line)
|
|
| 3421 | 3424 |
</action> |
| 3422 | 3425 |
</rule> |
| 3423 | 3426 |
<rule>ref.type == prog.kw_y_of or ref.type == prog.kw_row_of |
| 3424 | 3427 |
<action> |
| 3425 | 3428 |
printfln("## Error:: unsupported option %s/%s in %s %d",
|
| 3426 |
ref.parent, ref, file, line)
|
|
| 3429 |
ref.parent, ref, artifact.getRelativePath(), line)
|
|
| 3427 | 3430 |
</action> |
| 3428 | 3431 |
</rule> |
| 3429 | 3432 | |
| ... | ... | |
| 5906 | 5909 |
<function name="gen_interface"> |
| 5907 | 5910 |
<parameter name="frame" type="java.util.Map" /> |
| 5908 | 5911 |
<variable name="fnode" type="com.goldencode.ast.Aast" /> |
| 5909 |
<variable name="fname" type="java.lang.String" /> |
|
| 5910 | 5912 |
<variable name="cname" type="java.lang.String" /> |
| 5911 | 5913 |
<variable name="pkgname" type="java.lang.String" /> |
| 5912 | 5914 |
<variable name="map" type="java.util.Map" /> |
| ... | ... | |
| 5914 | 5916 |
<variable name="node" type="com.goldencode.ast.Aast" /> |
| 5915 | 5917 |
<variable name="inn" type="com.goldencode.ast.Aast" /> |
| 5916 | 5918 |
<variable name="lastId" type="java.lang.Long" /> |
| 5919 |
<variable name="fartifact" type="com.goldencode.artifacts.Artifact" /> |
|
| 5917 | 5920 |
|
| 5918 | 5921 |
<rule>true |
| 5919 | 5922 |
<action>fnode = execLib("get_fnode", frame)</action>
|
| 5920 | 5923 |
<action>cname = #(java.lang.String) fnode.getAnnotation("fr_interface")</action>
|
| 5921 |
<action>fname = #(java.lang.String) execLib("gen_fname", cname)</action>
|
|
| 5924 |
<action>fartifact = execLib("gen_fartifact", cname)</action>
|
|
| 5922 | 5925 |
<action>pkgname = #(java.lang.String) fnode.getAnnotation("pkg_int")</action>
|
| 5923 | 5926 |
|
| 5924 |
<action>createJavaFile(fname, true)</action>
|
|
| 5927 |
<action>createJavaFile(fartifact, true)</action>
|
|
| 5925 | 5928 |
<action>createJavaAst(java.kw_package, pkgname, javaRootId)</action> |
| 5926 | 5929 |
<action>createImport("com.goldencode.p2j.util.*")</action>
|
| 5927 | 5930 |
<action>createImport("com.goldencode.p2j.ui.*")</action>
|
| ... | ... | |
| 5943 | 5946 |
<action>execLib("gen_method_signatures", map)</action>
|
| 5944 | 5947 |
|
| 5945 | 5948 |
<!-- persist JAST --> |
| 5946 |
<rule>persistJavaFile(fname)</rule>
|
|
| 5949 |
<rule>persistJavaFile(fartifact)</rule>
|
|
| 5947 | 5950 |
</rule> |