Project

General

Profile

4384g.3821c.patch

Marian Edu, 02/01/2021 03:13 AM

Download (3.86 MB)

View differences:

build.gradle 2020-11-16 21:38:16 +0000
64 64
** 037 HC  20200726 Initial implementation of SPREADSHEET widget and related changes.
65 65
**     CA  20200914 Added aspectjtools to fwdConvert group.
66 66
**     CA  20200915 Upgraded to Jetty 9.4.22.
67
**     CA  20201011 Added RoaringBitmap, a fast access bitmap for integer or long values, which can be used 
68
**                  instead of hash sets.
69
**     ECF 20201116 Changed version of fwd-h2 to 1.4.200-5. Note the naming convention change, by which the
70
**                  last component of the name is now the fwd-h2 revision number, rather than a sortable
71
**                  date.
67 72
*/
68 73

  
69 74
/*
......
307 312

  
308 313
    fwdConvertServer group: 'org.jboss.logging', name: 'jboss-logging', version: '3.1.0.GA'
309 314
    fwdConvertServer group: 'antlr', name: 'antlr', version: '2.7.7'
310
    fwdConvertServer group: 'com.goldencode', name: 'fwd-h2', version: '1.4.200-20200727'
315
    fwdConvertServer group: 'com.goldencode', name: 'fwd-h2', version: '1.4.200-5'
311 316
    fwdConvertServer group: 'javax.transaction', name: 'jta', version: '1.1'
312 317

  
313 318
    fwdConvertClient (group: 'com.google.guava', name: 'guava', version: '19.0') {
......
353 358
    fwdClientServer group: 'org.shredzone.acme4j', name: 'acme4j-client', version: '0.10'
354 359
    fwdClientServer group: 'org.shredzone.acme4j', name: 'acme4j-utils', version: '0.10'
355 360
    fwdClientServer group: 'com.esotericsoftware', name: 'reflectasm', version: '1.11.3'
361
    fwdClientServer group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.9.0'
356 362

  
357 363
    fwdServer group: 'org.apache.tuscany.sdo', name: 'tuscany-sdo-impl', version: '1.1.1'
358 364
    fwdServer group: 'org.apache.tuscany.sdo', name: 'tuscany-sdo-tools', version: '1.1.1'
build.xml 2021-01-05 13:24:19 +0000
195 195
** 101 VVT 20200203          Added cursor UI resources (.cur files) to jar location.
196 196
** 102 OM  20200108          DMO Impl generation TRPL dropped from runtime support.
197 197
** 103 HC  20200726          Initial implementation of SPREADSHEET widget and related changes.
198
*/
198
**     HC  20201020          Removed ext sheet sources from javadoc target. Javadoc is handled by the sheet
199
**                           project itself.
200
**
199 201
 -->
200 202

  
201 203
<!--
......
420 422

  
421 423
  <path id="javadoc.path">
422 424
    <pathelement path="${src.home}"/>
423
    <pathelement path="ext/sheet/src/main/java"/>
424 425
  </path>
425 426

  
426 427

  
......
1380 1381
                    com/goldencode/p2j/*
1381 1382
                    com/goldencode/expr/*
1382 1383
                    com/goldencode/util/*
1384
                    com/goldencode/p2j/persist/h2/*
1383 1385
                    p2jpl.ddr"
1384 1386
          excludes="com/goldencode/p2j/spi/*
1385 1387
                    com/goldencode/p2j/SpiVersion.class"
pl/p2jpl.ddr 2020-12-03 12:27:31 +0000
67 67
** 031 CA  20190722          Added datetimetz comparators, as <op>(record, text).
68 68
**     GES 20190819          Added missing drop function statements for <op>(record, text) and
69 69
**                           <op>(text, record).
70
** 032 IAS 20201121          Added 'words' functions.
70 71
*/
71 72

  
72 73
/*
......
1898 1899
      'java.lang.String=
1899 1900
          com.goldencode.p2j.persist.pl.Functions.getFWDVersion()'
1900 1901
      language java immutable;
1902
 
1903
       create function words(text)
1904
       returns text[]
1905
       as 'java.lang.String[]=com.goldencode.p2j.persist.pl.Functions.words(java.lang.String)'
1906
       language java immutable;
1907
 
1908
       create function words(text, boolean)
1909
       returns text[]
1910
       as 'java.lang.String[]=com.goldencode.p2j.persist.pl.Functions.words(java.lang.String, boolean)'
1911
       language java immutable;
1901 1912
   END INSTALL",
1902 1913
   
1903 1914
   "BEGIN REMOVE
......
2166 2177
      drop function reportPrecisionScale(numeric);
2167 2178
      drop function getFWDVersion();
2168 2179
      
2180
      drop function words(text);      
2181
      drop function words(text, boolean);      
2169 2182
   END REMOVE"
2170 2183
}
rules/annotations/annotations.xml 2021-01-21 22:49:45 +0000
251 251
** 102 CA  20200412          Added incremental conversion support.
252 252
** 103 HC  20200325          Added ocx_conversion_post.rules.
253 253
** 104 CA  20200514          Added support for SOAP web services.
254
** 105 OM  20201215          Added early type-checking.
254 255
*/
255 256
 -->
256 257
 
......
485 486
   <!-- second pass, finally remove unreachable code -->
486 487
   <rule-set name="annotations/remove_unreachable2" />
487 488
   
489
   <!-- early type-checking -->
490
   <rule-set input="tree" load-condition="runtime-query">
491
      <ascent-rules>
492
         <!--TODO: improve the list below -->
493
         <rule>copy.type == prog.assign or
494
               copy.type == prog.equals or
495
               copy.type == prog.lt     or
496
               copy.type == prog.lte    or
497
               copy.type == prog.gt     or
498
               copy.type == prog.gte
499
            <variable name="ch1type" type="java.lang.String" />
500
            <variable name="ch2type" type="java.lang.String" />
501
            <variable name="child"   type="com.goldencode.ast.Aast" />
502
            <action>child = copy.firstChild</action> 
503
            <action>ch1type = ecw.getCompatibilityClass(child)</action>
504
            
505
            <action>child = child.nextSibling</action>
506
            <rule>ch1type != null                 and
507
                  !ch1type.equals("unknown")      and
508
                  !ch1type.equals("basedatatype") and
509
                  !child.isAnnotation("read-only attribute helper")
510
               <!--
511
                 | Skip further investigations if:
512
                 |   * the type of first child could not be detected (null/unknown/BaseDataType)
513
                 |   * this child was marked as helper for a read-only attribute, 
514
                -->
515
               <action>ch2type = ecw.getCompatibilityClass(child)</action>
516
               
517
               <rule>!ch1type.equals(ch2type)
518
                  <rule>!isRuntimeConfig()
519
                     <!-- In static conversion just print out the warning to allow conversion to continue,
520
                          eventual stopping on more critical events. -->
521
                     <action>
522
                        printfln("WARNING: Incompatible data types in expression or assignment. The generated code may not compile or may work incorrectly.")
523
                     </action>
524
                  </rule>
525
                  <action>
526
                     printfln("Additional info: ch1type=%s ch2type=%s\n%s", ch1type, ch2type, copy.dumpTree(true))
527
                  </action>
528
                  <rule>isRuntimeConfig()
529
                     <!-- In the dynamic conversion we stop here with same error as ABL compiler. -->
530
                     <action>compileError(223, "Incompatible data types in expression or assignment")</action>
531
                  </rule>
532
               </rule>
533
            </rule>
534
         </rule>
535
      </ascent-rules>
536
   </rule-set>
537
   
488 538
   <!-- convert OCX objects to 4GL widgets -->
489 539
   <rule-set name="annotations/ocx_conversion" />
490 540
   <rule-set name="annotations/ocx_conversion_post" />
491

  
541
   
492 542
   <!-- component-handle:LoadControls conversion -->
493 543
   <rule-set name="annotations/load_controls" />
494

  
544
   
495 545
   <!-- customer-specific tree rewriting -->
496 546
   <rule-set name="customer_specific_annotations_prep" optional="true" />
497 547
   
rules/annotations/database_general.rules 2021-01-21 22:49:45 +0000
5 5
** Module   : database_general.rules
6 6
** Abstract : database related annotations
7 7
**
8
** Copyright (c) 2005-2020, Golden Code Development Corporation.
8
** Copyright (c) 2005-2021, Golden Code Development Corporation.
9 9
**
10
** _#_ _I_ __Date__ __JPRM__ ____________________________Description_____________________________
10
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________
11 11
** 001 ECF 20051207   @23763 Created initial version. Miscellaneous rules
12 12
**                           for annotating various database language
13 13
**                           statements and functions.
......
91 91
**                           connect options.
92 92
** 035 ECF 20170820          Added support for read-xml and write-xml methods.
93 93
** 036 OM  20170823          Fixed DISABLE TRIGGERS statement.
94
** 037 GES 20170827          CONNECT_TEXT nodes can have quoted text in which the quotes were
95
**                           being doubled.
96
** 038 ECF 20171025          Added -ct (max connection retries) to supported CONNECT statement
97
**                           options.
94
** 037 GES 20170827          CONNECT_TEXT nodes can have quoted text in which the quotes were being doubled.
95
** 038 ECF 20171025          Added -ct (max connection retries) to supported CONNECT statement options.
98 96
** 039 OM  20171215          Force fields to have alias only if the quick-delete has subqueries.
99 97
** 040 ECF 20180118          API name change in SchemaWorker.
100 98
** 041 OM  20180309          The id-related functions are converted earlier into corresponding
......
108 106
**                           currently is not implemented.
109 107
** 046 ECF 20181208          Added support for read-json and write-json methods.
110 108
** 047 CA  20181221          Fixed FIND-CURRENT lock literals.
111
** 048 ECF 20190214          Rearrange BUF_{COPY|COMP} statement child nodes for easier downstream
112
**                           conversion.
109
** 048 ECF 20190214          Rearrange BUF_{COPY|COMP} statement child nodes for easier downstream conversion.
113 110
**     CA  20190323          FOR EACH ... DELETE. blocks conversion to EMPTY TEMP-TABLE must be 
114 111
**                           done only after buffer scopes are computed.
115 112
** 049 OM  20190327          Renamed DataSource to avoid conflicts with DataSet source.
......
121 118
** 054 IAS 20200212          Added support for new CONNECT options.
122 119
** 055 ECF 20200906          New ORM implementation.
123 120
** 056 CA  20200910          Added BUFFER:SERIALIZE-ROW() method conversion.
121
**     OM  20210120          Kept resource type parameter in order to validate it at runtime.
124 122
-->
125 123

  
126 124
<!--
......
909 907
      
910 908
      <!-- prepare {READ|WRITE}-{XML[SCHEMA]|JSON} and SERIALIZE-ROW methods -->
911 909
      <rule>parent.type == prog.meth_logical
912
      
913 910
         <action>oldtype = parent.getAnnotation("oldtype")</action>
914 911
         
915 912
         <rule>oldtype == prog.kw_read_xsc or
......
922 919
            
923 920
            <action>pos1 = this.indexPos</action>
924 921
            
925
            <!-- special handling for first parameter -->
926
            <rule>(pos1 == 0 and oldtype != prog.kw_serialzr) or (pos1 == 1 and oldtype == prog.kw_serialzr)
927
            
928
               <!-- the first parameter in a converted READ-{XML[SCHEMA]|JSON} method is always
929
                    superfluous -->
930
               <rule>oldtype == prog.kw_read_xml or
931
                     oldtype == prog.kw_read_jsn or
932
                     oldtype == prog.kw_read_xsc
933
                  <action>copy.setHidden(true)</action>
934
               </rule>
935
               
936
               <!-- the first parameter in a converted WRITE-{XML[SCHEMA]|JSON} method is superfluous
937
                    when the second evaluates to a memptr or longchar type -->
938
               <rule>oldtype == prog.kw_wr_xml  or
939
                     oldtype == prog.kw_wr_json or
940
                     oldtype == prog.kw_wr_xmlsc or
941
                     oldtype == prog.kw_serialzr
942
                  <action>
943
                     javaname = ecw.expressionType(#(com.goldencode.ast.Aast) this.nextSibling)
944
                  </action>
945
                  <rule>javaname == "memptr" or javaname == "longchar"
946
                     <action>copy.setHidden(true)</action>
947
                  </rule>
948
               </rule>
949
               
950
            </rule>
951
            
952
            <!-- the first two (or just the second) parameters are used with the SourceData or
953
                 TargetData constructor; subsequent parameters should emit into the readXml or
954
                 writeXml method, with literals wrapped -->
922
            <!-- the first two (or just the second) parameters are used with the SourceData or TargetData
923
                 constructor; subsequent parameters should emit into the readXml or writeXml method, with
924
                 literals wrapped -->
955 925
            <rule>(pos1 >= 2 and oldtype != prog.kw_serialzr) or 
956 926
                  ((pos1 == 0 or pos1 >= 3) and oldtype == prog.kw_serialzr)
957 927
               <action>putNote("use-method-peerid", true)</action>
rules/annotations/legacy_services.rules 2021-01-13 21:04:41 +0000
12 12
** 002 CA  20190703 Added support for WebHandler services.
13 13
** 003 CA  20200514 Added support for SOAP web services.
14 14
** 004 GES 20200723 Added address attribute for REST.
15
** 005 CA  20201008 Annotate any temp-table, dataset, parameter, internal procedure and program which must be
15
**     CA  20201008 Annotate any temp-table, dataset, parameter, internal procedure and program which must be
16 16
**                  generated into the legacy open client proxy Java program.
17 17
*/
18 18
 -->
rules/annotations/ocx_conversion.rules 2021-01-13 21:04:41 +0000
51 51
**         20200608 Added NODECLICK, BEFORELABELEDIT, AFTERLABELEDIT event triggers.
52 52
** 012 SBI 20200619 Changed NODECLICK, BEFORELABELEDIT, AFTERLABELEDIT to be according with FWD
53 53
**                  widget events naming convention, AFTERLABELEDIT can update the label's value.
54
** 013 SBI 20200722 Added mapping for child, previous, next, firstsibling, lastsibling.
54
**     SBI 20200722 Added mapping for child, previous, next, firstsibling, lastsibling.
55 55
**     HC  20200726 Improved OCX conversion of COM properties.
56 56
**     HC  20200827 Fixed conversion of assignment of COM properties with multiple indexes.
57
**     CA  20201109 Expose the CALENDAR:VALUE as a 'CalendarValue' attribute which follows the 4GL's datetime
58
**                  string representation, and not ISO-8601.
57 59
*/
58 60
 -->
59 61
<!--
......
351 353
         
352 354
         <!-- Calendar -->
353 355
         <action>map6 = create("java.util.HashMap")</action>
354
         <action>map6.put("value"            , "DateTimeValue")</action>
356
         <action>map6.put("value"            , "CalendarValue")</action>
355 357
         <action>map6.put("checkbox"         , "Checked")</action>
356 358
         <action>map6.put("font"             , "FontInfo")</action>
357 359
         <action>map6.put("format"           , "FormatStyle")</action>
rules/annotations/record_scoping.rules 2020-10-30 14:02:14 +0000
5 5
** Module   : record_scoping.rules
6 6
** Abstract : calculates record scopes
7 7
**
8
** Copyright (c) 2005-2019, Golden Code Development Corporation.
8
** Copyright (c) 2005-2020, Golden Code Development Corporation.
9 9
**
10
** _#_ _I_ __Date__ __JPRM__ ________________Description_________________
10
** _#_ _I_ __Date__ __JPRM__ _________________________________Description__________________________________
11 11
** 001 GES 20050919   @22811 Calculates record scopes in a Progress
12 12
**                           compatible manner, including support for
13 13
**                           all of the implicit scope expansion rules.
......
61 61
** 019 CA  20190128          Track buffer's static state (if OO).
62 62
** 020 CA  20190513          Fixed buffer usage from super-classes, in OO.
63 63
** 021 CA  20190530          Fixed staging of buffer parameters for OO methods or constructors.
64
** 022 ECF 20201029          Create a buffer scope for NEW SHARED defined buffers, in case the buffer is
65
**                           not used elsewhere in the procedure where it was defined.
64 66
*/
65 67
 -->
66 68
<!--
......
152 154
   
153 155
   <walk-rules>
154 156
   
155
      <!-- push a new scope for each block that has the record scoping
156
           property -->
157
      <!-- push a new scope for each block that has the record scoping property -->
157 158
      <rule>type == prog.block and getNoteBoolean("recordScoping")
158 159
         <action>buf.pushScope(copy)</action>
159 160
         
......
167 168
         
168 169
      </rule>
169 170
      
170
      <!-- shared buffer imports (no kw_new) always have a single scope which
171
           is associated with the external procedure (you cannot define
172
           a shared buffer in a function or internal procedure) -->
171
      <!-- shared buffer imports always have a single scope which is associated with the external
172
           procedure (you cannot define a shared buffer in a function or internal procedure) -->
173
      <!-- this must occur for both NEW SHARED and non-NEW SHARED cases -->
173 174
      <!-- temp-tables and work-tables are currently scoped to the external
174 175
           procedure but this is NOT CORRECT -->
175 176
      <rule>
176
         ((type == prog.define_buffer and this.getChildAt(0).type == prog.kw_shared) or
177
          type == prog.define_temp_table                                             or
177
         ((type == prog.define_buffer and this.getImmediateChild(prog.kw_shared, null) != null) or
178
          type == prog.define_temp_table                                                        or
178 179
          type == prog.define_work_table) and not ancestor(prog.interface_def, -1)
179 180
         
180
         <!-- find the target record reference -->
181
         <rule>type == prog.define_buffer and this.getChildAt(0).type == prog.kw_shared
181
         <!-- find the target record reference (for both NEW SHARED and non-NEW SHARED cases)-->
182
         <rule>type == prog.define_buffer and this.getImmediateChild(prog.kw_shared, null) != null
182 183
            <action>ref = copy.getImmediateChild(prog.kw_for, null)</action>
183 184
            <rule>ref.downPath("TEMP_TABLE")
184 185
               <action>ref = ref.getImmediateChild(prog.temp_table, null)</action>
rules/convert/builtin_functions.rules 2021-01-13 21:04:41 +0000
7 7
**
8 8
** Copyright (c) 2005-2020, Golden Code Development Corporation.
9 9
**
10
** _#_ _I_ __Date__ __JPRM__ ____________________________Description_____________________________
10
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________
11 11
** 001 GES 20050721   @21759 Good working version which supports a wide
12 12
**                           range of the most common builtin functions
13 13
**                           including all type conversion, math, string
......
176 176
**     GES 20200506          Changed the name of DYNAMIC-ENUM().
177 177
**     SBI 20200529          Implemented LOAD-PICTURE.
178 178
** 102 CA  20200811          SUPER() function has as first argument the caller's return type.
179
**     EVL 20201216          Adding function to interrupt metafile recording.
180
**     OM  20201120          Added DATA-SOURCE-MODIFIED function. Changed converted ERROR signature.
179 181
*/
180 182
 -->
181 183
 
......
265 267
            ftype == prog.kw_mf_gfsd or ftype == prog.kw_mf_gfsr  or ftype == prog.kw_mf_gph   or
266 268
            ftype == prog.kw_mf_gpn  or ftype == prog.kw_mf_gpw   or ftype == prog.kw_mf_gtw   or
267 269
            ftype == prog.kw_mf_gxy  or ftype == prog.kw_mf_gzf   or ftype == prog.kw_mf_init  or
268
            ftype == prog.kw_mf_mpdf or ftype == prog.kw_mf_p2mu  or ftype == prog.kw_mf_rp    or
269
            ftype == prog.kw_mf_sf   or ftype == prog.kw_mf_sfc   or ftype == prog.kw_mf_sfh   or
270
            ftype == prog.kw_mf_si   or ftype == prog.kw_mf_sia   or ftype == prog.kw_mf_sla   or
271
            ftype == prog.kw_mf_slc  or ftype == prog.kw_mf_slm   or ftype == prog.kw_mf_sls   or
272
            ftype == prog.kw_mf_snp  or ftype == prog.kw_mf_sntl  or ftype == prog.kw_mf_spf   or
273
            ftype == prog.kw_mf_spn  or ftype == prog.kw_mf_spnp  or ftype == prog.kw_mf_spnt  or
274
            ftype == prog.kw_mf_spo  or ftype == prog.kw_mf_sr    or ftype == prog.kw_mf_sta   or
275
            ftype == prog.kw_mf_stc  or ftype == prog.kw_mf_sts   or ftype == prog.kw_mf_sxy   or
276
            ftype == prog.kw_mf_szf
270
            ftype == prog.kw_mf_ir   or ftype == prog.kw_mf_mpdf  or ftype == prog.kw_mf_p2mu  or
271
            ftype == prog.kw_mf_rp   or ftype == prog.kw_mf_sf    or ftype == prog.kw_mf_sfc   or
272
            ftype == prog.kw_mf_sfh  or ftype == prog.kw_mf_si    or ftype == prog.kw_mf_sia   or
273
            ftype == prog.kw_mf_sla  or ftype == prog.kw_mf_slc   or ftype == prog.kw_mf_slm   or
274
            ftype == prog.kw_mf_sls  or ftype == prog.kw_mf_snp   or ftype == prog.kw_mf_sntl  or
275
            ftype == prog.kw_mf_spf  or ftype == prog.kw_mf_spn   or ftype == prog.kw_mf_spnp  or
276
            ftype == prog.kw_mf_spnt or ftype == prog.kw_mf_spo   or ftype == prog.kw_mf_sr    or
277
            ftype == prog.kw_mf_sta  or ftype == prog.kw_mf_stc   or ftype == prog.kw_mf_sts   or
278
            ftype == prog.kw_mf_sxy  or ftype == prog.kw_mf_szf
277 279
            
278 280
            <action>bRet = true</action>
279 281
            
......
360 362
      <rule>fwdId2Mf.put(prog.kw_mf_gxy  , "getXY")</rule>
361 363
      <rule>fwdId2Mf.put(prog.kw_mf_gzf  , "getZoomFactor")</rule>
362 364
      <rule>fwdId2Mf.put(prog.kw_mf_init , "initialize")</rule>
365
      <rule>fwdId2Mf.put(prog.kw_mf_ir   , "interruptRecording")</rule>
363 366
      <rule>fwdId2Mf.put(prog.kw_mf_mpdf , "makePdf")</rule>
364 367
      <rule>fwdId2Mf.put(prog.kw_mf_p2mu , "pix2MfUnits")</rule>
365 368
<!--      <rule>fwdId2Mf.put(prog.kw_mf_pdoc , "printDoc")</rule>-->
......
552 555
            <action>dbimport = true</action>
553 556
         </rule>
554 557
         
558
         <!-- DATA-SOURCE-MODIFIED function -->
559
         <rule>ftype == prog.kw_data_sm
560
            <action>methodText = "DataSourceModifiable.isDataSourceModified"</action>
561
            <action>dbimport = true</action>
562
         </rule>
563
         
555 564
         <!-- duplicative with kw_today below but easier to find this way -->
556 565
         <rule>ftype == prog.kw_date
557 566
            <action>methodText = "date"</action>
558 567
            <action>methodType = java.constructor</action>
559 568
         </rule>
560

  
569
         
561 570
         <rule>ftype == prog.kw_datetime
562 571
            <action>methodText = "datetime"</action>
563 572
            <action>methodType = java.constructor</action>
......
567 576
            <action>methodText = "datetimetz"</action>
568 577
            <action>methodType = java.constructor</action>
569 578
         </rule>
570

  
579
         
571 580
         <rule>ftype == prog.kw_day
572 581
            <action>methodText = "date.day"</action>
573 582
         </rule>
......
756 765
               <action>extent = deref.getAnnotation("oldextent")</action>
757 766
            </rule>
758 767

  
759
            <!-- if the variable isn't an array var, substitute a integer
760
                 constant 0 -->
768
            <!-- if the variable isn't an array var, substitute a integer constant 0 -->
761 769
            <rule>extent == null or extent == 0
762 770
               <action>methodText = "0"</action>
763 771
               <action>methodType = java.num_literal</action>
764 772
            </rule>
765 773
            
766
            <!-- for dynamic-extent variables, use the dedicated API to interogate the length -->
774
            <!-- for dynamic-extent variables, use the dedicated API to interrogate the length -->
767 775
            <rule>
768 776
               (extent != null and extent == -1) or
769 777
               (copy.parent.isAnnotation("wrap") and
......
1341 1349
            <action>dbimport = true</action>
1342 1350
         </rule>
1343 1351
         
1344
         <rule>ftype == prog.kw_error
1345
            <action>methodType = java.method_call</action>
1346
            <action>methodText = "isError"</action>
1347
            <!-- TODO: remove is/set prefix in Errorable interface as per buffer attribute name convention -->
1348
            <action>dbimport = true</action>
1349
         </rule>
1350
         
1351 1352
         <rule>ftype == prog.kw_rejected
1352 1353
            <action>methodType = java.method_call</action>
1353 1354
            <action>methodText = "rejected"</action>
......
1655 1656
            
1656 1657
            <rule on="false">raiseError
1657 1658
               <action>
1658
                  errmsg = sprintf("Unsupported builtin function %s.",
1659
                                   this.lookupTokenName(ftype))
1659
                  errmsg = sprintf("Unsupported builtin function %s.", this.lookupTokenName(ftype))
1660 1660
               </action>
1661 1661
               <action>printfln("%s\n%s", errmsg, this.dumpTree(true))</action>
1662 1662
            </rule>
rules/convert/legacy_services.rules 2021-01-08 17:01:46 +0000
5 5
** Module   : legacy_services.rules
6 6
** Abstract : conversion related to legacy proxy client code.
7 7
**
8
** Copyright (c) 2020, Golden Code Development Corporation.
8
** Copyright (c) 2020-2021, Golden Code Development Corporation.
9 9
**
10 10
** _#_ _I_ __Date__ _______________________________________Description________________________________________
11 11
** 001 CA  20201007 Created initial version.
12
**     CA  20210108 Fixed a typo when generating the Java proxy code for a temp-table field definition.
12 13
*/
13 14
 -->
14 15
 
......
366 367
               <action>
367 368
                  createJavaAst(java.string, #(java.lang.String) propAst.getAnnotation("historical"), ref)
368 369
               </action>
369
               <rule>isNote("extent")
370
               <rule>propAst.isAnnotation("extent")
370 371
                  <action>
371 372
                     createJavaAst(java.num_literal, sprintf("%s", propAst.getAnnotation("extent")), ref)
372 373
                  </action>
rules/convert/menu_generator.xml 2020-10-24 00:11:03 +0000
7 7
**
8 8
** Copyright (c) 2015-2020, Golden Code Development Corporation.
9 9
**
10
** _#_ _I_ __Date__ ________________________________Description_________________________________
10
** _#_ _I_ __Date__ _______________________________________Description_______________________________________
11 11
** 001 VIG 20141101 Initial version.
12 12
** 002 VIG 20150204 Added SUB-MENU label support, removeQuotes are replaced by 
13 13
**                  ecw.progressToJavaString() method call.
......
18 18
** 005 OM  20150918 Fixed historical/java names.
19 19
** 006 VIG 20160621 Added labels collection to uiStrings file.
20 20
** 007 GES 20171017 Added hexadecimal literal support.
21
** 008 CA  20180308 Fixed classname conversion - it was using an aready converted javaname 
21
** 008 CA  20180308 Fixed classname conversion - it was using an already converted javaname 
22 22
**                  instead of the legacy name, so it was not converting properly.
23 23
** 009 GES 20180910 Resolved ambiguous method call (it did not fail previously but the correct
24 24
**                  method was not being called).
25 25
** 010 CA  20181208 Use progressToJavaString to emit the TITLE option.
26 26
** 011 CA  20200412 Added incremental conversion support.
27 27
** 012 SBI 20200322 Added label not null rule for processing menu items.
28
** 013 OM  20201016 Added NPE guard for uninitialized uiStrings.
28 29
*/
29 30
-->
30 31

  
......
462 463
   
463 464
   <post-rules>
464 465
      <!-- this is done here, once, as uiStrings will have everything collected -->
465
      <rule>execLib("collect_ui_strings", uiStrings)</rule>
466
      <rule>uiStrings != null
467
         <action>execLib("collect_ui_strings", uiStrings)</action>
468
      </rule>
466 469
   </post-rules>
467 470

  
468 471
   <func-library access="private"> 
rules/convert/method_definitions.rules 2021-01-13 21:04:41 +0000
7 7
**
8 8
** Copyright (c) 2018-2020, Golden Code Development Corporation.
9 9
**
10
** _#_ _I_ __Date__ _______________________________Description_________________________________
10
** _#_ _I_ __Date__ _______________________________________Description_______________________________________
11 11
** 001 GES 20181213 First version.
12 12
** 002 OM  20181218 Added generics for object getters.
13 13
** 003 GES 20190118 Changed "access" annotation to "access-mode" for methods. This is consistent
......
29 29
**     CA  20200514 Emit the LegacySignature at the external program's 'execute' method and all its internal
30 30
**                  entries.
31 31
** 009 CA  20200804 Emit bulk setter and getter for an extent property.
32
** 010 CA  20200910 Fixed LegacyParameter annotation problem when DEFINE PARAMETER appears somewhere in a 
32
**     CA  20200910 Fixed LegacyParameter annotation problem when DEFINE PARAMETER appears somewhere in a
33 33
**                  nested block.
34 34
*/
35 35
 -->
rules/convert/methods_attributes.rules 2021-01-13 21:04:41 +0000
495 495
**     CA  20200503          Added ERROR:ERROR-STRING, QUERY:CACHE and BUFFER:IS-MULTI-TENANT.
496 496
**     SVL 20200509          Added ALIGNMENT attribute.
497 497
** 222 SBI 20200619          Added NEW-LABEL attribute for the tree widget.
498
** 223 GES 20200627          Renamed Coordinates interface to be more generic.  Added the undocumented
498
**     GES 20200627          Renamed Coordinates interface to be more generic.  Added the undocumented
499 499
**                           LAST-EVENT:SET-LASTKEY() method.  Added the LAST-EVENT:COLUMN/ROW attributes
500 500
**                           support.  Added the BUFFER-FIELD:DEFAULT-VALUE attribute.
501
** 224 CA  20200910          Added BUFFER:SERIALIZE-ROW() method conversion.
501
**     CA  20200910          Added BUFFER:SERIALIZE-ROW() method conversion.
502
**     CA  20201109          Expose the CALENDAR:VALUE as a 'CalendarValue' attribute which follows the 4GL's
503
**                           datetime string representation, and not ISO-8601.
504
**     SVL 20201225          MIN-HEIGHT-CHARS is unwrapped using MinHeightCharsInterface. MAX-HEIGHT-CHARS is
505
**                           applicable only to Window widget
506
**     OM  20201120          Conversion changes for multiple methods/attributes related to datasets and xml
507
**                           serialization.
502 508
*/
503 509
 -->
504 510
 
......
613 619
         <rule>list.put(prog.kw_aud_ev_c, execLib("cr_descr", "ClientPrincipal"            , "getAuditEventContext"   , "setAuditEventContext"   , true       ))</rule>
614 620
         <rule>list.put(prog.kw_authen_f, execLib("cr_descr", "ClientPrincipal"            , "authenticationFailed"   , null                     , true       ))</rule>
615 621
         <rule>list.put(prog.kw_auto_com, execLib("cr_descr", "Widget"                     , "isAutoCompletion"       , "setAutoCompletion"      , true       ))</rule>
622
         <rule>list.put(prog.kw_auto_del, execLib("cr_descr", "Buffer"                     , "autoDelete"             , "autoDelete"             , true       ))</rule>
616 623
         <rule>list.put(prog.kw_auto_end, execLib("cr_descr", "Button"                     , "isAutoEndKey"           , "setAutoEndKey"          , true       ))</rule>
617 624
         <rule>list.put(prog.kw_auto_go , execLib("cr_descr", "Button"                     , "isAutoGo"               , "setAutoGo"              , true       ))</rule>
618 625
         <rule>list.put(prog.kw_auto_ind, execLib("cr_descr", "Editor"                     , "isAutoIndent"           , "setAutoIndent"          , true       ))</rule>
......
668 675
         <rule>list.put(prog.kw_cur_qry , execLib("cr_descr", "DataRelation"               , "getCurrentQuery"        , null                     , true       ))</rule>
669 676
         <rule>list.put(prog.kw_cvt_3d_c, execLib("cr_descr", "ImageSupport"               , "getConvert3D"           , "setConvert3D"           , true       ))</rule>
670 677
         <rule>list.put(prog.kw_data_scm, execLib("cr_descr", "Buffer"                     , "dataSourceCompleteMap"  , null                     , true       ))</rule>
671
         <rule>list.put(prog.kw_data_sm , execLib("cr_descr", "DataSet"                    , "isDataSourceModified"   , "setDataSourceModified"  , true       ))</rule>
678
         <rule>list.put(prog.kw_data_sm , execLib("cr_descr", "DataSourceModifiable"       , "isDataSourceModified"   , "setDataSourceModified"  , true       ))</rule>
672 679
         <rule>list.put(prog.kw_data_src, execLib("cr_descr", "Buffer"                     , "dataSource"             , null                     , true       ))</rule>
673 680
         <rule>list.put(prog.kw_data_sri, execLib("cr_descr", "Buffer"                     , "dataSourceRowid"        , "dataSourceRowid"        , true       ))</rule>
674 681
         <rule>list.put(prog.kw_dataset , execLib("cr_descr", "Buffer"                     , "dataSet"                , null                     , true       ))</rule>
......
676 683
         <rule>list.put(prog.kw_db_list , execLib("cr_descr", "ClientPrincipal"            , "getDbList"              , null                     , true       ))</rule>
677 684
         <rule>list.put(prog.kw_deblank , execLib("cr_descr", "Deblank"                    , "isDeblank"              , "setDeblank"             , true       ))</rule>
678 685
         <rule>list.put(prog.kw_debug   , execLib("cr_descr", "Debugger"                   , "debug"                  , null                     , true       ))</rule>
679
         <rule>list.put(prog.kw_decimals, execLib("cr_descr", "BufferField"                , "getDecimals"            , null                     , true       ))</rule>
686
         <rule>list.put(prog.kw_decimals, execLib("cr_descr", "BufferField"                , "getDecimals"            , "setDecimals"            , true       ))</rule>
680 687
         <rule>list.put(prog.kw_def_comm, execLib("cr_descr", "Transaction"                , "isDefaultCommit"        , "setDefaultCommit"       , true       ))</rule>
681 688
         <rule>list.put(prog.kw_def_str , execLib("cr_descr", "BufferField"                , "getDefaultString"       , "setDefaultString"       , true       ))</rule>
682 689
         <rule>list.put(prog.kw_def_val , execLib("cr_descr", "BufferField"                , "getDefaultValue"        , ""                       , true       ))</rule>
......
711 718
         <rule>list.put(prog.kw_end_f_d , execLib("cr_descr", "Droppable"                  , "endFileDrop"            , null                     , true       ))</rule>
712 719
         <rule>list.put(prog.kw_ent_tlst, execLib("cr_descr", "LogManager"                 , "getEntryTypesList"      , null                     , true       ))</rule>
713 720
         <rule>list.put(prog.kw_entry   , execLib("cr_descr", "CommonListWidget"           , "entry"                  , null                     , true       ))</rule>
714
         <rule>list.put(prog.kw_error   , execLib("cr_descr", "Error"                      , "isError"                , "setError"               , true       ))</rule>
721
         <rule>list.put(prog.kw_error   , execLib("cr_descr", "Error"                      , "error"                  , "error"                  , true       ))</rule>
715 722
         <rule>list.put(prog.kw_err_str , execLib("cr_descr", "ErrorString"                , "errorString"            , "changeErrorString"      , true       ))</rule>
716 723
         <rule>list.put(prog.kw_evt_proc, execLib("cr_descr", "EventProcedure"             , "getEventProcedure"      , "setEventProcedure"      , true       ))</rule>
717 724
         <rule>list.put(prog.kw_expand  , execLib("cr_descr", "RadioSet"                   , "isExpand"               , "setExpand"              , true       ))</rule>
718 725
         <rule>list.put(prog.kw_export_p, execLib("cr_descr", "ClientPrincipal"            , "exportPrincipal"        , null                     , true       ))</rule>
719 726
         <rule>list.put(prog.kw_f_key_h , execLib("cr_descr", "DataRelation"               , "getForeignKeyHidden"    , "setForeignKeyHidden"    , true       ))</rule>
720 727
         <rule>list.put(prog.kw_fetch_sr, execLib("cr_descr", "Browse"                     , "fetchSelectedRow"       , null                     , true       ))</rule>
721
         <rule>list.put(prog.kw_fill_mod, execLib("cr_descr", "Buffer"                     , "fillMode"               , "fillMode"               , true       ))</rule>
728
         <rule>list.put(prog.kw_fill_mod, execLib("cr_descr", "Fillable"                   , "fillMode"               , "fillMode"               , true       ))</rule>
722 729
         <rule>list.put(prog.kw_fill_wst, execLib("cr_descr", "DataSource"                 , "getFillWhereString"     , "setFillWhereString"     , true       ))</rule>
723 730
         <rule>list.put(prog.kw_fill    , execLib("cr_descr", "Fillable"                   , "fill"                   , null                     , true       ))</rule>
724 731
         <rule>list.put(prog.kw_filled  , execLib("cr_descr", "Rectangle"                  , "getFilled"              , "setFilled"              , true       ))</rule>
......
762 769
         <rule>list.put(prog.kw_img_only, execLib("cr_descr", "ImageOnly"                  , "isImageOnly"            , "setImageOnly"           , true       ))</rule>
763 770
         <rule>list.put(prog.kw_in_hndl , execLib("cr_descr", "Call"                       , "getInHandle"            , "setInHandle"            , true       ))</rule>
764 771
         <rule>list.put(prog.kw_index   , execLib("cr_descr", "Indexed"                    , "getIndex"               , "setIndex"               , true       ))</rule>
765
         <rule>list.put(prog.kw_init_c_p, execLib("cr_descr", "ClientPrincipal"            , "initialize"               , null                     , true       ))</rule>
772
         <rule>list.put(prog.kw_init_c_p, execLib("cr_descr", "ClientPrincipal"            , "initialize"             , null                     , true       ))</rule>
766 773
         <rule>list.put(prog.kw_initiate, execLib("cr_descr", "Debugger"                   , "initiate"               , null                     , true       ))</rule>
767 774
         <rule>list.put(prog.kw_inner_c , execLib("cr_descr", "ScrollbarHorizontalElement" , "getInnerChars"          , "setInnerChars"          , true       ))</rule>
768 775
         <rule>list.put(prog.kw_inner_l , execLib("cr_descr", "InnerLines"                 , "getInnerLines"          , "setInnerLines"          , true       ))</rule>
......
780 787
         <rule>list.put(prog.kw_lab_font, execLib("cr_descr", "BrowseElement"              , "getLabelFont"           , "setLabelFont"           , true       ))</rule>
781 788
         <rule>list.put(prog.kw_labels  , execLib("cr_descr", "Labels"                     , "isLabels"               , "setLabels"              , true       ))</rule>
782 789
         <rule>list.put(prog.kw_large   , execLib("cr_descr", "Editor"                     , "isLarge"                , "setLarge"               , true       ))</rule>
783
         <rule>list.put(prog.kw_last_bat, execLib("cr_descr", "Buffer"                     , "isLastBatch"            , "setLastBatch"           , true       ))</rule>
790
         <rule>list.put(prog.kw_last_bat, execLib("cr_descr", "Buffer"                     , "lastBatch"              , "lastBatch"              , true       ))</rule>
784 791
         <rule>list.put(prog.kw_last_of , execLib("cr_descr", "Query"                      , "isLastOfGroup"          , null                     , true       ))</rule>
785 792
         <rule>list.put(prog.kw_last_ti , execLib("cr_descr", "FieldGroup"                 , "getLastTabItem"         , "setLastTabItem"         , true       ))</rule>
786 793
         <rule>list.put(prog.kw_length  , execLib("cr_descr", "Editor"                     , "getLength"              , null                     , true       ))</rule>
......
819 826
         <rule>list.put(prog.kw_merge_rc, execLib("cr_descr", "Buffer"                     , "mergeRowChanges"        , null                     , true       ))</rule>
820 827
         <rule>list.put(prog.kw_min_btn , execLib("cr_descr", "Window"                     , "isMinButton"            , "setMinButton"           , true       ))</rule>
821 828
         <rule>list.put(prog.kw_min_val , execLib("cr_descr", "Slider"                     , "getMinValue"            , "setMinValue"            , true       ))</rule>
829
         <rule>list.put(prog.kw_min_schm, execLib("cr_descr", "TempTable"                  , "isMinSchemaMarshal"     , "setMinSchemaMarshal"    , true       ))</rule>
822 830
         <rule>list.put(prog.kw_mnemon  , execLib("cr_descr", "Mnemonic"                   , "getMnemonic"            , null                     , true       ))</rule>
823 831
         <rule>list.put(prog.kw_modified, execLib("cr_descr", "Widget"                     , "isModified"             , "setModified"            , true       ))</rule>
824 832
         <rule>list.put(prog.kw_mou_ptr , execLib("cr_descr", "Widget"                     , "getMousePointer"        , null                     , true       ))</rule>
825 833
         <rule>list.put(prog.kw_mov_2eof, execLib("cr_descr", "Editor"                     , "moveCaretToEof"         , null                     , true       ))</rule>
826 834
         <rule>list.put(prog.kw_movable , execLib("cr_descr", "Widget"                     , "isMovable"              , "setMovable"             , true       ))</rule>
827 835
         <rule>list.put(prog.kw_multiple, execLib("cr_descr", "Multiple"                   , "isMultiple"             , "setMultiple"            , true       ))</rule>
836
         <rule>list.put(prog.kw_namesp_p, execLib("cr_descr", "NamespaceURI"               , "namespacePrefix"        , "namespacePrefix"        , true       ))</rule>
837
         <rule>list.put(prog.kw_namesp_u, execLib("cr_descr", "NamespaceURI"               , "namespaceURI"           , "namespaceURI"           , true       ))</rule>
828 838
         <rule>list.put(prog.kw_nested  , execLib("cr_descr", "DataRelation"               , "isNested"               , "setNested"              , true       ))</rule>
829 839
         <rule>list.put(prog.kw_next_rid, execLib("cr_descr", "DataSource"                 , "getNextRowid"           , "setNextRowid"           , true       ))</rule>
830 840
         <rule>list.put(prog.kw_no_cur_v, execLib("cr_descr", "Slider"                     , "isNoCurrentValue"       , "setNoCurrentValue"      , true       ))</rule>
831 841
         <rule>list.put(prog.kw_no_em_sp, execLib("cr_descr", "Browse"                     , "isNoEmptySpace"         , "setNoEmptySpace"        , true       ))</rule>
832 842
         <rule>list.put(prog.kw_no_focus, execLib("cr_descr", "Button"                     , "getNoFocus"             , "setNoFocus"             , true       ))</rule>
843
         <rule>list.put(prog.kw_no_sch_m, execLib("cr_descr", "TempTable"                  , "isNoSchemaMarshal"      , "setNoSchemaMarshal"     , true       ))</rule>
833 844
         <rule>list.put(prog.kw_no_valid, execLib("cr_descr", "Browse"                     , "isNoValidate"           , "setNoValidate"          , true       ))</rule>
834 845
         <rule>list.put(prog.kw_nodes   , execLib("cr_descr", "Nodes"                      , "getNodes"               , null                     , true       ))</rule>
835 846
         <rule>list.put(prog.kw_num_buff, execLib("cr_descr", "BufferCollection"           , "numBuffers"             , null                     , true       ))</rule>
......
907 918
         <rule>list.put(prog.kw_save_fil, execLib("cr_descr", "Editor"                     , "saveFile"               , null                     , true       ))</rule>
908 919
         <rule>list.put(prog.kw_save_rch, execLib("cr_descr", "Buffer"                     , "saveRowChanges"         , null                     , true       ))</rule>
909 920
         <rule>list.put(prog.kw_save_wst, execLib("cr_descr", "DataSource"                 , "getSaveWhereString"     , "setSaveWhereString"     , true       ))</rule>
921
         <rule>list.put(prog.kw_sch_mars, execLib("cr_descr", "TempTable"                  , "getSchemaMarshal"       , "setSchemaMarshal"       , true       ))</rule>
910 922
         <rule>list.put(prog.kw_sing_run, execLib("cr_descr", "Procedure"                  , "isSingleRun"            , null                     , true       ))</rule>
911 923
         <rule>list.put(prog.kw_singlton, execLib("cr_descr", "Procedure"                  , "isSingleton"            , null                     , true       ))</rule>
912 924
         <rule>list.put(prog.kw_scr_2cr , execLib("cr_descr", "Browse"                     , "scrollToCurrentRow"     , null                     , true       ))</rule>
......
922 934
         <rule>list.put(prog.kw_selectbl, execLib("cr_descr", "Widget"                     , "isSelectable"           , "setSelectable"          , true       ))</rule>
923 935
         <rule>list.put(prog.kw_selected, execLib("cr_descr", "Widget"                     , "isSelected"             , "setSelected"            , true       ))</rule>
924 936
         <rule>list.put(prog.kw_sep_fgc , execLib("cr_descr", "Browse"                     , "getSeparatorFgColor"    , "setSeparatorFgColor"    , true       ))</rule>
925
         <rule>list.put(prog.kw_serialzh, execLib("cr_descr", "BufferField"                , "getSerializeHidden"     , "setSerializeHidden"     , true       ))</rule>
937
         <rule>list.put(prog.kw_serialzh, execLib("cr_descr", "SerializeHiddenable"        , "getSerializeHidden"     , "setSerializeHidden"     , true       ))</rule>
926 938
         <rule>list.put(prog.kw_serialzn, execLib("cr_descr", "NamedSerializable"          , "getSerializeName"       , "setSerializeName"       , true       ))</rule>
927 939
         <rule>list.put(prog.kw_serialzr, execLib("cr_descr", "Buffer"                     , "serializeRow"           , null                     , true       ))</rule>
928 940
         <rule>list.put(prog.kw_server  , execLib("cr_descr", "Remotable"                  , "getServerHandle"        , "setServerHandle"        , true       ))</rule>
......
973 985
         <rule>list.put(prog.kw_xml_dtyp, execLib("cr_descr", "XmlNode"                    , "getXmlDataType"         , "setXmlDataType"         , true       ))</rule>
974 986
         <rule>list.put(prog.kw_xml_nnam, execLib("cr_descr", "XmlNode"                    , "getXmlNodeName"         , "setXmlNodeName"         , true       ))</rule>
975 987
         <rule>list.put(prog.kw_xml_ntyp, execLib("cr_descr", "XmlNode"                    , "getXmlNodeType"         , "setXmlNodeType"         , true       ))</rule>
976
        
988
         
977 989
         <!-- The FWD extensions are listed separately. -->
978 990
         <rule>list.put(prog.kw_add_bcca, execLib("cr_descr", "EmailSender"                , "addBccAddress"          , ""                       , true       ))</rule>
979 991
         <rule>list.put(prog.kw_add_c_n , execLib("cr_descr", "TreeNodeCollection"         , "addChildNode"           , null                     , true       ))</rule>
......
1018 1030
         <rule>list.put(prog.kw_caltitfg, execLib("cr_descr", "Calendar"                   , "getTitleForeColor"      , "setTitleForeColor"      , true       ))</rule>
1019 1031
         <rule>list.put(prog.kw_caltrlfg, execLib("cr_descr", "Calendar"                   , "getTrailingForeColor"   , "setTrailingForeColor"   , true       ))</rule>
1020 1032
         <rule>list.put(prog.kw_calupdwn, execLib("cr_descr", "Calendar"                   , "isUpDown"               , "setUpDown"              , true       ))</rule>
1021
         <rule>list.put(prog.kw_calvalue, execLib("cr_descr", "Calendar"                   , "getDateTimeValue"       , "setDateTimeValue"       , true       ))</rule>
1033
         <rule>list.put(prog.kw_calvalue, execLib("cr_descr", "Calendar"                   , "getCalendarValue"       , "setCalendarValue"       , true       ))</rule>
1022 1034
         <rule>list.put(prog.kw_cease   , execLib("cr_descr", "FWDTimer"                   , "cease"                  , null                     , true       ))</rule>
1023 1035
         <rule>list.put(prog.kw_clea_tab, execLib("cr_descr", "Signature"                  , "clearTablet"              , ""                       , true       ))</rule>
1024 1036
         <rule>list.put(prog.kw_clea_win, execLib("cr_descr", "Signature"                  , "clearSignatureWindow"     , ""                       , true       ))</rule>
......
1619 1631
                     <action>methodText = "getResourceType"</action>
1620 1632
                  </rule>
1621 1633

  
1622
                  <rule>ftype == prog.kw_error
1634
                  <rule>ftype == prog.kw_error and ref.type == prog.sys_handle
1623 1635
                     <action>hwrap = "Error"</action>
1624 1636
                     <action>methodText = "isError"</action>
1625

  
1637
                     
1626 1638
                     <rule>isAssign
1627 1639
                        <action>methodText = "setError"</action>
1628 1640
                     </rule>
......
3894 3906
                  </rule>
3895 3907
               </rule>
3896 3908
               
3897
               <!-- MAX-HEIGHT-CHARS support for browse and windows -->
3898 3909
               <rule>ftype == prog.kw_max_h_c
3899
                  <rule>htype == prog.kw_browse
3900
                     <action>hwrap = "Browse"</action>
3901
                     <action on='false'>hwrap = "Window"</action>
3902
                  </rule>
3910
                  <action>hwrap = "Window"</action>
3903 3911
                  <action>methodText = "getMaxHeightChars"</action>
3904 3912
                  <rule>isAssign
3905 3913
                     <action>methodText = "setMaxHeightChars"</action>
......
3948 3956

  
3949 3957
               <!-- MIN-HEIGHT-CHARS support for browse and windows -->
3950 3958
               <rule>ftype == prog.kw_min_h_c
3951
                  <rule>htype == prog.kw_browse
3952
                     <action>hwrap = "Browse"</action>
3953
                     <action on='false'>hwrap = "Window"</action>
3954
                  </rule>
3959
                  <action>hwrap = "MinHeightChars"</action>
3955 3960
                  <action>methodText = "getMinHeightChars"</action>
3956 3961
                  <rule>isAssign
3957 3962
                     <action>methodText = "setMinHeightChars"</action>
......
4036 4041
                  <!-- setter and getter are both named "name"! -->
4037 4042
                  <action>methodText = "name"</action>
4038 4043
               </rule>
4039

  
4040
               <!-- Attribute for DOM XML -->
4041
               <rule>ftype == prog.kw_namesp_p
4042
                  <action>hwrap = "XEntity"</action>
4043
                  <action>methodText = "getNamespacePrefix"</action>
4044
                  <rule>isAssign
4045
                     <action>methodText = "setNamespacePrefix"</action>
4046
                  </rule>
4047
               </rule>
4048

  
4049
               <rule>ftype == prog.kw_namesp_u
4050
                  <action>hwrap = "NamespaceURI"</action>
4051
                  <action>methodText = "getNamespaceURI"</action>
4052
                  <rule>isAssign
4053
                     <action>methodText = "setNamespaceURI"</action>
4054
                  </rule>
4055
               </rule>
4056 4044
               
4057 4045
               <rule>ftype == prog.kw_new
4058 4046
                  <action>methodText = "newlyCreated"</action>
rules/convert/variable_references.rules 2020-11-25 18:40:50 +0000
144 144
**     SBI 20200505          Added COM-SELF conversion support.
145 145
**     RFB 20201002          Added additional parameter to thisProcedure when an annotation is found. Ref #4861
146 146
**     SVL 20201009          Emit extent fields where subscript is an expression.
147
**     GES 20201125          Added OS-USERID as a FWD-specific 4GL extension.
147 148
*/
148 149
 -->
149 150
 
......
789 790
               <rule>oldtype == prog.kw_os_err
790 791
                  <action>methodTxt = "FileSystemOps.getLastError"</action>
791 792
               </rule>
793
               <rule>oldtype == prog.kw_os_uid
794
                  <action>methodTxt = "SecurityOps.getOSUserId"</action>
795
               </rule>
792 796
               <rule>oldtype == prog.kw_pro_arch
793 797
                  <action>methodTxt = "EnvironmentOps.getProcessArchitecture"</action>
794 798
               </rule>
rules/fixups/functions_procedures.rules 2020-12-19 00:59:30 +0000
7 7
**
8 8
** Copyright (c) 2013-2020 Golden Code Development Corporation.
9 9
**
10
** _#_ _I_ __Date__ _________________________________Description_________________________________
10
** _#_ _I_ __Date__ _______________________________________Description_______________________________________
11 11
** 001 CA  20130118 Added support for persistent procedures,  procedure 
12 12
**                  handles and super procedures.  DYNAMIC-FUNCTION(expr IN 
13 13
**                  handle) where expr is not a constant has the IN handle 
......
42 42
**     RFB 20200429 Removed a dumpTree that wasn't providing any useful information
43 43
**                  after the "WARNING: Hiding duplicate...".
44 44
**     RFB 20200504 Shortened up some other log messages to still provide info,
45
**                  but not perform dumpTree().            
45
**                  but not perform dumpTree().
46
** 012 OM  20201203 Fixed handling of READ-ONLY attributes.
46 47
*/
47 48
-->
48 49

  
......
180 181
         
181 182
         <action>funcRetTypes.put(fname, cls)</action>
182 183
      </rule>
183

  
184
      <!-- fix read-only parameter assignment. for these cases, the left-side
185
           assignment node is re-written to be a string literal with the
186
           attribute's name -->
184
      
185
      <!-- fix read-only parameter assignment. for these cases, the left-side assignment node is re-written
186
           to be a string literal with the attribute's name -->
187 187
      <rule>type == prog.assign
188 188
         <action>ref = copy.getFirstChild()</action>
189 189
         <rule>ref.type == prog.colon
190

  
191
            <!-- the last element in the chain will always be the second child of the topmost
192
                 COLON node -->
190
            <!-- the last element in the chain will always be the second child of the topmost COLON node -->
193 191
            <action>ref = ref.getChildAt(1)</action>
194 192
            
195
            <!-- except if it is a DB_REF_NON_STATIC, which is probably an incorrect tree
196
                 build; TODO: resolve this -->
193
            <!-- except if it is a DB_REF_NON_STATIC, which is probably an incorrect tree build;
194
                 TODO: resolve this -->
197 195
            <while>ref.type == prog.db_ref_non_static 
198 196
               <action>ref = ref.nextSibling</action>
199 197
            </while>
200

  
198
            
201 199
            <rule>evalLib("read_only_attribute", ref)
202
            
203 200
               <action>
204
                  printfln("READ_ONLY_WARNING: REWRITING attribute assignment as string at %s line %05d column %05d\n%s\n",
201
                  printfln("READ_ONLY_WARNING: REWRITING attribute assignment as string at %s line %05d column %05d",
205 202
                           file,
206 203
                           line,
207
                           this.getColumn(),
208
                           this.dumpTree())
204
                           this.getColumn())
209 205
               </action>
210 206
               
211
               <!-- force the left-side assignment node to be a 
212
                    prog.expression -->
213
               <action>pref = copy.getChildAt(1)</action>
214
               <action>pref.type = prog.expression</action>
215

  
216
               <!-- force the first child of the prog.expression node to
217
                    be a string literal -->
218
               <action>pref = pref.getChildAt(0)</action>
219
               <action>
220
                  pref.text = sprintf('"%s"', ref.text)
221
               </action>
222
               <action>pref.type = prog.string</action>
207
               <!-- inject the name of the READ/ONLY attribute as a new 2nd child character expression -->
208
               <action>pref = createProgressAst(prog.expression, copy, 1)</action>
209
               <action>pref.putAnnotation("read-only attribute helper", true)</action>
210
               <action>pref = createProgressAst(prog.string, pref)</action>
211
               <action>pref.text = sprintf('"%s"', ref.text)</action>
223 212
               <action>pref.putAnnotation("no_wrap", true)</action>
224
               
225
               <!--  remove all children of the new "literal" node -->
226
               <while>pref.firstChild != null
227
                  <action>ref = pref.firstChild</action>
228
                  <action>ref.remove()</action>
229
               </while>
213
               <!-- this way, the actual assigned expression is shifted to 3rd position -->
230 214
            </rule>
231 215
         </rule>
232 216
      </rule>
233

  
217
      
234 218
      <!-- capture the all FORWARD, IN handle or IN SUPER function declarations
235 219
           which also have a named BUFFER parameter (ignore all others, including
236 220
           buffer parameters that have no name) -->
rules/gaps/expressions.rules 2021-01-13 21:04:41 +0000
185 185
**     SBI 20200520 LOAD-PICTURE is fully supported.
186 186
** 053 GES 20200628 Added SET-LASTKEY method and updated DEFAULT-STRING and DEFAULT-VALUE attributes.
187 187
**     HC  20200726 Initial implementation of SPREADSHEET widget and related changes.
188
** 054 CA  20200910 Added BUFFER:SERIALIZE-ROW() method conversion as FULL.
188
**     CA  20200910 Added BUFFER:SERIALIZE-ROW() method conversion as FULL.
189
**     GES 20201125 Added OS-USERID as a FWD-specific 4GL extension.
190
**     OM  20201120 Updated gaps for multiple methods/attributes related to datasets and xml serialization.
189 191
*/
190 192
 -->
191 193
 
......
377 379
         <rule>funcs.put(prog.kw_cur_res , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
378 380
         <rule>funcs.put(prog.kw_cur_val , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
379 381
         <rule>funcs.put(prog.kw_cvt_dt  , rw.cvt_lvl_none    | rw.rt_lvl_none)</rule> <!-- webspeed convert-datetime is notsupported -->
380
         <rule>funcs.put(prog.kw_data_sm , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule> <!-- data-source-modified is not supported -->
382
         <rule>funcs.put(prog.kw_data_sm , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
381 383
         <rule>funcs.put(prog.kw_date    , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
382 384
         <rule>funcs.put(prog.kw_date_tz , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
383 385
         <rule>funcs.put(prog.kw_datetime, rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
......
600 602
         <rule>vars.put(prog.kw_opsys   , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
601 603
         <rule>vars.put(prog.kw_os_drv  , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
602 604
         <rule>vars.put(prog.kw_os_err  , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
605
         <rule>vars.put(prog.kw_os_uid  , rw.cvt_lvl_full    | rw.rt_lvl_full)</rule> <!-- FWD extension, not real 4GL -->
603 606
         <rule>vars.put(prog.kw_pro_arch, rw.cvt_lvl_full    | rw.rt_lvl_full)</rule>
604 607
         <rule>vars.put(prog.kw_proc_hnd, rw.cvt_lvl_none    | rw.rt_lvl_none)</rule> <!-- proc-handle is not supported -->
605 608
         <rule>vars.put(prog.kw_proc_st , rw.cvt_lvl_none    | rw.rt_lvl_none)</rule> <!-- proc-status is not supported -->
......
819 822
         <rule>attrs.put(prog.kw_data_e_r, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
820 823
         <rule>attrs.put(prog.kw_data_scm, rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- data-source-complete-map -->
821 824
         <rule>attrs.put(prog.kw_dataset , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- dataset -->
822
         <rule>attrs.put(prog.kw_data_sm , rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- data-source-modified -->
825
         <rule>attrs.put(prog.kw_data_sm , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- data-source-modified -->
823 826
         <rule>attrs.put(prog.kw_data_src, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- data-source -->
824 827
         <rule>attrs.put(prog.kw_data_sri, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- data-source-rowid -->
825 828
         <rule>attrs.put(prog.kw_datatype, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
......
931 934
         <rule>attrs.put(prog.kw_fil_c_t , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
932 935
         <rule>attrs.put(prog.kw_fill    , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- fill -->
933 936
         <rule>attrs.put(prog.kw_filled  , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
934
         <rule>attrs.put(prog.kw_fill_mod, rw.cvt_lvl_full       | rw.rt_lvl_full_restr)</rule> <!-- fill-mode; DATSET:FILL-MODE stubbed -->
935
         <rule>attrs.put(prog.kw_fill_wst, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- fill-where-string -->
937
         <rule>attrs.put(prog.kw_fill_mod, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- fill-mode -->
938
         <rule>attrs.put(prog.kw_fill_wst, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- fill-where-string: must be recomputed when active relations change -->
936 939
         <rule>attrs.put(prog.kw_fil_m_d , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
937 940
         <rule>attrs.put(prog.kw_fil_m_t , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
938 941
         <rule>attrs.put(prog.kw_fil_name, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
......
1143 1146
         <rule>attrs.put(prog.kw_language, rw.cvt_lvl_none       | rw.rt_lvl_none)</rule> <!-- languages -->
1144 1147
         <rule>attrs.put(prog.kw_large   , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1145 1148
         <rule>attrs.put(prog.kw_last_ar , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1146
         <rule>attrs.put(prog.kw_last_bat, rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- last-batch -->
1149
         <rule>attrs.put(prog.kw_last_bat, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- last-batch -->
1147 1150
         <rule>attrs.put(prog.kw_last_ch , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1148 1151
         <rule>attrs.put(prog.kw_last_frm, rw.cvt_lvl_none       | rw.rt_lvl_none)</rule> <!-- last-form -->
1149 1152
         <rule>attrs.put(prog.kw_last_obj, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- last-object -->
......
1217 1220
         <rule>attrs.put(prog.kw_menu_mou, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1218 1221
         <rule>attrs.put(prog.kw_merge_bf, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- merge-by-field -->
1219 1222
         <rule>attrs.put(prog.kw_merge_ch, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- merge-changes -->
1220
         <rule>attrs.put(prog.kw_merge_rc, rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- merge-row-changes -->
1223
         <rule>attrs.put(prog.kw_merge_rc, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- merge-row-changes -->
1221 1224
         <rule>attrs.put(prog.kw_min_btn , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- min-button -->
1222 1225
         <rule>attrs.put(prog.kw_min_cwch, rw.cvt_lvl_none       | rw.rt_lvl_none)</rule> <!-- min-column-width-chars -->
1223 1226
         <rule>attrs.put(prog.kw_min_cwpx, rw.cvt_lvl_none       | rw.rt_lvl_none)</rule> <!-- min-column-width-pixels -->
......
1264 1267
         <rule>attrs.put(prog.kw_nodv_2lc, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1265 1268
         <rule>attrs.put(prog.kw_no_em_sp, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> 
1266 1269
         <rule>attrs.put(prog.kw_no_focus, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1270
         <rule>attrs.put(prog.kw_no_pre,   rw.cvt_lvl_full       | rw.rt_lvl_full_restr)</rule> <!-- no-prefetch: implicit in FWD, not aware of side-effects ATM-->
1267 1271
         <rule>attrs.put(prog.kw_normalze, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1268 1272
         <rule>attrs.put(prog.kw_no_sch_m, rw.cvt_lvl_none       | rw.rt_lvl_none)</rule> <!-- no-schema-marshal -->
1269 1273
         <rule>attrs.put(prog.kw_no_valid, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- the no-validate attr is a browse-only feature in the 4GL -->
......
1366 1370
         <rule>attrs.put(prog.kw_read_fil, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1367 1371
         <rule>attrs.put(prog.kw_read_jsn, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- read-json, done for DATASETS, too -->
1368 1372
         <rule>attrs.put(prog.kw_read_onl, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1369
         <rule>attrs.put(prog.kw_read_xml, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- read-xml, valioations need to be tested for DATASETS -->
1370
         <rule>attrs.put(prog.kw_read_xsc, rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- read-xmlschema -->
1373
         <rule>attrs.put(prog.kw_read_xml, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- read-xml, validations need to be tested for DATASETS -->
1374
         <rule>attrs.put(prog.kw_read_xsc, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- read-xmlschema: missing some optional parameters -->
1371 1375
         <rule>attrs.put(prog.kw_recid   , rw.cvt_lvl_full       | rw.rt_lvl_full_restr)</rule> <!-- id returned not backward compatible with Progress recid -->
1372 1376
         <rule>attrs.put(prog.kw_rec_len , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- record-length -->
1373 1377
         <rule>attrs.put(prog.kw_recurse , rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- recursive -->
......
1392 1396
         <rule>attrs.put(prog.kw_repos_2i, rw.cvt_lvl_full_restr | rw.rt_lvl_full_restr)</rule> <!-- tenant-expression not supported -->
1393 1397
         <rule>attrs.put(prog.kw_repos_2r, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>   
1394 1398
         <rule>attrs.put(prog.kw_repos_b , rw.cvt_lvl_full       | rw.rt_lvl_basic)</rule> <!-- error reporting TODO -->
1395
         <rule>attrs.put(prog.kw_repos   , rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- reposition --> 
1399
         <rule>attrs.put(prog.kw_repos   , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- reposition --> 
1396 1400
         <rule>attrs.put(prog.kw_repos_f , rw.cvt_lvl_full       | rw.rt_lvl_basic)</rule> <!-- error reporting TODO -->
1397 1401
         <rule>attrs.put(prog.kw_rep_stxt, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1398 1402
         <rule>attrs.put(prog.kw_req_info, rw.cvt_lvl_none       | rw.rt_lvl_full)</rule> <!-- request-info -->
......
1449 1453
         <rule>attrs.put(prog.kw_seal    , rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- seal -->
1450 1454
         <rule>attrs.put(prog.kw_seal_tst, rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- seal-timestamp -->
1451 1455
         <rule>attrs.put(prog.kw_search  , rw.cvt_lvl_full       | rw.rt_lvl_full_restr)</rule> <!-- no procedure library member syntax support -->
1452
         <rule>attrs.put(prog.kw_sel_all , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>   
1456
         <rule>attrs.put(prog.kw_sel_all , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1453 1457
         <rule>attrs.put(prog.kw_selectbl, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1454 1458
         <rule>attrs.put(prog.kw_selected, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1455 1459
         <rule>attrs.put(prog.kw_sel_end , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
......
1463 1467
         <rule>attrs.put(prog.kw_sep_fgc , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1464 1468
         <rule>attrs.put(prog.kw_seps    , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1465 1469
         <rule>attrs.put(prog.kw_serialzh, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- serialize-hidden -->
1466
         <rule>attrs.put(prog.kw_serialzn, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- serialize-name -->
1470
         <rule>attrs.put(prog.kw_serialzn, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- serialize-name -->
1467 1471
         <rule>attrs.put(prog.kw_serialzr, rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- serialize-row -->
1468 1472
         <rule>attrs.put(prog.kw_server  , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1469 1473
         <rule>attrs.put(prog.kw_sess_end, rw.cvt_lvl_none       | rw.rt_lvl_none)</rule> <!-- session-end -->
......
1475 1479
         <rule>attrs.put(prog.kw_set_blue, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1476 1480
         <rule>attrs.put(prog.kw_set_brk , rw.cvt_lvl_full       | rw.rt_lvl_stub)</rule> <!-- set-break -->
1477 1481
         <rule>attrs.put(prog.kw_set_buf , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
1478
         <rule>attrs.put(prog.kw_set_cbac, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- set-callback, not for queries -->
1479
         <rule>attrs.put(prog.kw_set_cb_p, rw.cvt_lvl_full       | rw.rt_lvl_partial)</rule> <!-- not runtime for queries-->
1482
         <rule>attrs.put(prog.kw_set_cbac, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- set-callback -->
1483
         <rule>attrs.put(prog.kw_set_cb_p, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- set-callback-procedure -->
1480 1484
         <rule>attrs.put(prog.kw_set_clnt, rw.cvt_lvl_full       | rw.rt_lvl_basic)</rule> <!-- set-client -->
1481 1485
         <rule>attrs.put(prog.kw_set_comm, rw.cvt_lvl_full       | rw.rt_lvl_full)</rule> <!-- set-commit -->
1482 1486
         <rule>attrs.put(prog.kw_set_c_p , rw.cvt_lvl_full       | rw.rt_lvl_full)</rule>
rules/gaps/lang_stmts.rules 2020-12-16 15:49:52 +0000
36 36
**     GES 20191015 More updates for OO and structured error handling.
37 37
** 022 HC  20200331 Implemented support for OPEN-POPUP legacy method, which opens popup menu set
38 38
**                  on the widget.
39
** 023 EVL 20201216 Added function to interrupt metafile recording.
39 40
*/
40 41
 -->
41 42

  
......
261 262
         <rule>opts.put(prog.kw_mf_gxy,                   rw.cvt_lvl_partial | rw.rt_lvl_basic)</rule> <!-- FWD extension, not real 4GL -->
262 263
         <rule>opts.put(prog.kw_mf_gzf,                   rw.cvt_lvl_partial | rw.rt_lvl_basic)</rule> <!-- FWD extension, not real 4GL -->
263 264
         <rule>opts.put(prog.kw_mf_init,                  rw.cvt_lvl_partial | rw.rt_lvl_basic)</rule> <!-- FWD extension, not real 4GL -->
265
         <rule>opts.put(prog.kw_mf_ir,                    rw.cvt_lvl_partial | rw.rt_lvl_basic)</rule> <!-- FWD extension, not real 4GL -->
264 266
         <rule>opts.put(prog.kw_mf_mpdf,                  rw.cvt_lvl_partial | rw.rt_lvl_basic)</rule> <!-- FWD extension, not real 4GL -->
265 267
         <rule>opts.put(prog.kw_mf_p2mu,                  rw.cvt_lvl_partial | rw.rt_lvl_basic)</rule> <!-- FWD extension, not real 4GL -->
266 268
         <rule>opts.put(prog.kw_mf_rp,                    rw.cvt_lvl_partial | rw.rt_lvl_basic)</rule> <!-- FWD extension, not real 4GL -->
rules/include/common-progress.rules 2021-01-13 21:04:41 +0000
6 6
**
7 7
** Copyright (c) 2005-2020, Golden Code Development Corporation.
8 8
**
9
** _#_ _I_ __Date__ __JPRM__ ____________________________Description_____________________________
9
** _#_ _I_ __Date__ __JPRM__ __________________________________Description__________________________________
10 10
** 001 GES 20050721   @21761 Good working version which provides many callable functions/rules 
11 11
**                           that allow the centralized definition and reuse of complex
12 12
**                           expressions, logic and processing.
......
440 440
**     GES 20200521          Added legacy name overrides.
441 441
** 236 CA  20200803          Added create_temp_table_key_criteria.
442 442
** 237 IAS 20200809          Added support for the MAX-WIDTH FIELD attribute.
443
**     OM  20201120          The DECIMALS attribute is writable for TEMP-TABLES but not for permanent tables.
443 444
*/
444 445
 -->
445 446
 
......
6881 6882
         </rule>
6882 6883
         
6883 6884
      </function>
6884

  
6885
      
6885 6886
      <function name="read_only_attribute">
6886 6887
         <parameter name="ref"   type="com.goldencode.ast.Aast" />
6887 6888
         <variable  name="ref2"  type="com.goldencode.ast.Aast" />
6888 6889
         <variable  name="ftype" type="java.lang.Integer" />
6889 6890
         <return    name="res"   type="java.lang.Boolean" />
6890
         <expression>
6891
            ftype = #(int) (#(long) ref.getAnnotation("oldtype"))
6892
         </expression>
6891
         <expression>ftype = #(int) (#(long) ref.getAnnotation("oldtype"))</expression>
6893 6892
         
6894 6893
         <!-- attributes that are partially read-only, they are not included in the list below -->
6895
         <!-- prog.kw_cur_iter || (only the dataset attr is read-only, the widget version is read/write -->
6894
         <!-- prog.kw_cur_iter    || (only the dataset attr is read-only, the widget version is read/write -->
6895
         <!-- prog.kw_decimals    || writable for TEMP-TABLES but not for permanent tables  -->
6896 6896
         <!-- prog.kw_kw_evt_proc || read-only for the async request, the CALL version is read/write -->
6897
         <!-- prog.kw_e_proc_c || read-only for the async request, the CALL version is read/write -->
6898
         <!-- prog.kw_log_en_t || read-only for dslog-manager but writable for log-manager -->
6899
         <!-- prog.kw_logf_nam || read-only for dslog-manager but writable for log-manager -->
6900
         <!-- prog.kw_multiple || read-only for browse but writable for other widgets -->
6901
         <!-- prog.kw_name     || read-only for soap-header and soap-header-entryref but writable for everyone else -->
6902
         <!-- prog.kw_namesp_p || read-only for x-document, writable for others -->
6903
         <!-- prog.kw_namesp_u || read-only for soap-header, soap-header-entryref, x-document, x-noderef but writable for everyone else -->
6904
         <!-- prog.kw_primary  || read-only for buffer but writable for temp-table -->
6905
         <!-- prog.kw_rsp_info || read-only for asynch-request but writable for server -->
6906
         <!-- prog.kw_row   || read-only for browse col, field-group and last-event but writable for all others -->
6907
         <!-- prog.kw_row_mark || read-only only after the browse has been realized -->
6908
         <!-- prog.kw_server   || read-only for server and codebase-locator and writable for others -->
6909
         <!-- prog.kw_side_l_h || read-only for static widgets but not dynamic widgets -->
6910
         <!-- prog.kw_subtype  || read-only for combo-box, server, x-document, x-noderef and writable for others -->
6911
         <!-- prog.kw_titl_dc || read-only for browse, writable for others -->
6912
         <!-- prog.kw_visible || read-only for field-groups, menus, menu-items, sub-menus and writable for all others -->
6913
         <!-- prog.kw_width_c || read-only for field-group and the session handle, writable for others -->
6914
         <!-- prog.kw_width_p || read-only for field-group and the session handle, writable for others -->
6915
         <!-- prog.kw_x       || read-only for field-group, browse cells and last-event, writable for others -->
6916
         <!-- prog.kw_y       || read-only for field-group, browse cells and last-event, writable for others -->
6897
         <!-- prog.kw_e_proc_c    || read-only for the async request, the CALL version is read/write -->
6898
         <!-- prog.kw_log_en_t    || read-only for dslog-manager but writable for log-manager -->
6899
         <!-- prog.kw_logf_nam    || read-only for dslog-manager but writable for log-manager -->
6900
         <!-- prog.kw_multiple    || read-only for browse but writable for other widgets -->
6901
         <!-- prog.kw_name        || read-only for soap-header and soap-header-entryref but writable for everyone else -->
6902
         <!-- prog.kw_namesp_p    || read-only for x-document, writable for others -->
6903
         <!-- prog.kw_namesp_u    || read-only for soap-header, soap-header-entryref, x-document, x-noderef but writable for everyone else -->
6904
         <!-- prog.kw_primary     || read-only for buffer but writable for temp-table -->
6905
         <!-- prog.kw_rsp_info    || read-only for asynch-request but writable for server -->
6906
         <!-- prog.kw_row         || read-only for browse col, field-group and last-event but writable for all others -->
6907
         <!-- prog.kw_row_mark    || read-only only after the browse has been realized -->
6908
         <!-- prog.kw_server      || read-only for server and codebase-locator and writable for others -->
6909
         <!-- prog.kw_side_l_h    || read-only for static widgets but not dynamic widgets -->
6910
         <!-- prog.kw_subtype     || read-only for combo-box, server, x-document, x-noderef and writable for others -->
6911
         <!-- prog.kw_titl_dc     || read-only for browse, writable for others -->
6912
         <!-- prog.kw_visible     || read-only for field-groups, menus, menu-items, sub-menus and writable for all others -->
6913
         <!-- prog.kw_width_c     || read-only for field-group and the session handle, writable for others -->
6914
         <!-- prog.kw_width_p     || read-only for field-group and the session handle, writable for others -->
6915
         <!-- prog.kw_x           || read-only for field-group, browse cells and last-event, writable for others -->
6916
         <!-- prog.kw_y           || read-only for field-group, browse cells and last-event, writable for others -->
6917 6917
         
6918 6918
         <!-- this is the list of known READ-ONLY attributes -->
6919 6919
         <!-- THIS IS A CHANGE FROM THE PREVIOUS APPROACH OF ENCODING A LIST OF WRITABLE ATTRS -->
......
6998 6998
                   ftype == prog.kw_dde_id   ||
6999 6999
                   ftype == prog.kw_dde_name ||
7000 7000
                   ftype == prog.kw_dde_topi ||
7001
                   ftype == prog.kw_decimals ||
7002 7001
                   ftype == prog.kw_def_bufh ||
7003 7002
                   ftype == prog.kw_def_val  ||
7004 7003
                   ftype == prog.kw_disp_typ ||
rules/schema/dmo_common.rules 2021-01-31 10:14:52 +0000
124 124
**     SBI 20190728          Added "help" annotation.
125 125
** 056 OM  20190831          Added hidden fields and index specific to BEFORE TEMP-TABLES.
126 126
** 057 IAS 20200601          Added support for the table/field string attributes (*-SA properties).
127
** 058 OM  20200108          Moved back the extent support method definition to main interface.
127
** 058 IAS 20200604          Added support for the table/filed 'can*' attributes and table 'valexp' attr
128
** 059 OM  20200108          Moved back the extent support method definition to main interface.
128 129
**                           Added support for "dirty-read" hint/annotation.
129 130
**                           Removed generation of DMO implementation classes.
130
** 059 IAS 20200604          Added support for the table/filed 'can*' attributes and table 'valexp' attributes
131
** 060 IAS 20200604          Added support for the table/filed 'can*' attributes and table 'valexp' attributes
131 132
**     IAS 20200624          Added support for the field VIEW-AS attributes
132 133
**     IAS 20200809          Added support for the field DECIMALS, DESCRIPTION, CASE-SENSITIVE, and 
133 134
**                           MAX-WIDTH attributes
134
** 060 OM  20200925          Fixed latent issue. adjustDataType() returned null in some cases.
135
**     OM  20200925          Fixed latent issue. adjustDataType() returned null in some cases.
135 136
**     CA  20201021          Fixed runtime conversion of dynamic temp-tables with Progress.Lang.Object fields.
137
**     SVL 20201111          Raise error if LABEL/COLUMN-LABEL matches reserved FWD 'null string'.
138
**     OM  20201120          Added "no-undo" annotation.
139
**     IAS 20201203          Added generation database object for the word tables' support.
140
**     IAS 20201219          Added 'CPSTREAM' import task argument
136 141
-->
137 142

  
138 143
<!--
......
872 877
               </action>
873 878
            </rule>
874 879
            
880
            <!-- graft "no-undo" annotation -->
881
            <rule>copy.isAnnotation("no-undo-tt")
882
               <action>tpl.graft("annotation_assign_true", null, tableAst, "key", "noUndo")</action>
883
            </rule>
884
            
875 885
            <!-- graft "serialize-name" annotation -->
876 886
            <rule>copy.isAnnotation("serialize-name")
877 887
               <action>
......
951 961
                  </action>
952 962
               </rule>
953 963
               
954
               <rule>!isWord
955
                  <action>idxName = idxAst.getAnnotation("historical")</action>
956
                  
957
                  <rule>!idxAst.parent.isAnnotation("drop")
958
                     <action>
959
                        ddl.addIndex(
960
                              ddlSchema, legacyTable, idxName, idxAst.text, isPrimary, isUnique, isWord)
961
                     </action>
962
                  </rule>
964
               <action>idxName = idxAst.getAnnotation("historical")</action>
965
               
966
               <rule>!idxAst.parent.isAnnotation("drop")
967
                  <action>
968
                     ddl.addIndex(
969
                           ddlSchema, legacyTable, idxName, idxAst.text, isPrimary, isUnique, isWord)
970
                  </action>
963 971
               </rule>
964 972
               
965 973
               <!--loop through index components-->
......
971 979
               <while>idxCompAst != null
972 980
                  <action>ref = getAst(#(long) idxCompAst.getAnnotation("refid"))</action>
973 981
                  
974
                  <variable name="isDesc"     type="java.lang.Boolean" />
975
                  <variable name="legacyName" type="java.lang.String" />
982
                  <variable name="isDesc"        type="java.lang.Boolean" />
983
                  <variable name="legacyName"    type="java.lang.String" />
984
                  <variable name="wordTableName" type="java.lang.String" />
976 985
                  <action>
977 986
                     isDesc = idxCompAst.isAnnotation("descend") and
978 987
                              #(boolean) idxCompAst.getAnnotation("descend")
......
985 994
                                                'legacy_name', legacyName)
986 995
                  </action>
987 996
                  <rule>!ref.parent.isAnnotation("drop")
988
                     <rule>!isWord
989
                        <action>
990
                           ddl.addIndexComponent(ddlSchema, legacyTable, idxName, ref.text,
991
                                                 #(java.lang.String) ref.getAnnotation("column"),
992
                                                 legacyName,
993
                                                 ref.getAnnotation("datatype").equals("character"),
994
                                                 ref.isAnnotation("case-sensitive") and
995
                                                      #(boolean) ref.getAnnotation("case-sensitive"),
996
                                                 isDesc)
997
                        </action>
998
                     </rule>
997
                  <action>
998
                     ddl.addIndexComponent(ddlSchema, legacyTable, idxName, ref.text,
999
                                           #(java.lang.String) ref.getAnnotation("column"),
1000
                                           legacyName,
1001
                                           ref.getAnnotation("datatype").equals("character"),
1002
                                           ref.isAnnotation("case-sensitive") and
1003
                                                #(boolean) ref.getAnnotation("case-sensitive"),
1004
                                           isDesc)
1005
                  </action>
999 1006
                  </rule>
1000 1007
                  
1001 1008
                  <rule>isDesc
......
1009 1016
                     idxCompAst = idxAst.getImmediateChild(data.index_col, idxCompAst)
1010 1017
                  </action>
1011 1018
               </while>
1019

  
1020
                <rule>isWord
1021
                    <action>
1022
                        wordTableName = ddl.getWordTableName(ddlSchema, legacyTable, idxName)
1023
                    </action>
1024
                    <action>
1025
                         tpl.graft('annotation_assign_string', null, primaryAst,
1026
                                   'key', 'wordtablename',
1027
                                   'value', wordTableName)
1028
                    </action>
1029
                </rule>
1012 1030
               
1013 1031
               <!-- advance to the next index AST -->
1014 1032
               <action>idxAst = copy.getImmediateChild(data.index, idxAst)</action>
......
1579 1597
         <variable  name="decimals"       type="java.lang.Long" />
1580 1598
         <variable  name="width"          type="java.lang.Long" />
1581 1599
         <variable  name="caseSensitive"  type="java.lang.Boolean" />
1582
         
1600

  
1583 1601
         <!-- graft "fieldId" / "id" annotation -->
1584 1602
         <rule>newDMO
1585 1603
            <action on="true">
......
1690 1708
         <!-- graft "column-label" annotation -->
1691 1709
         <rule>sourceAst.isAnnotation("col_lab")
1692 1710
            <action>tmpString = sourceAst.getAnnotation('col_lab')</action>
1711
            <action>execLib("checkReservedNull", tmpString, "COLUMN-LABEL")</action>
1693 1712
            <action>
1694 1713
               tpl.graft('annotation_assign_string', null, fieldAst,
1695 1714
                         'key',   'columnLabel',
......
1720 1739
         <!-- graft "label" annotation -->
1721 1740
         <rule>sourceAst.isAnnotation("label")
1722 1741
            <action>tmpString = sourceAst.getAnnotation('label')</action>
1742
            <action>execLib("checkReservedNull", tmpString, "LABEL")</action>
1723 1743
            <action>
1724 1744
               tpl.graft('annotation_assign_string', null, fieldAst,
1725 1745
                         'key',   'label',
......
2452 2472
         <!-- add needed Hibernate properties -->
2453 2473
         <rule>
2454 2474
            hiberProps = execLib("buildDbImportProperties",
2455
                                 dbName, targetDb, null, null, null)
2475
                                 dbName, targetDb, null, null, null, null)
2456 2476
         </rule>
2457 2477
         <rule>config.addProperties(hiberProps)</rule>
2458 2478
         
......
2463 2483
         <rule>p2jDatabase = create("com.goldencode.p2j.persist.Database", dbName)</rule>
2464 2484
         
2465 2485
      </function>
2486

  
2487
      <!-- Raises error if the given parameter matches reserved FWD 'null string'. -->
2488
      <function name="checkReservedNull">
2489
         <parameter  name="param"       type="java.lang.String" />
2490
         <parameter  name="paramType"   type="java.lang.String" />
2491

  
2492
         <rule>param.equals("__NULL_STRING__#!^+*__")
2493
            <action>throwException(sprintf("ERROR: By miraculous coincidence in-app %s
2494
               matches reserved FWD 'null string' constant '__NULL_STRING__#!^+*__'. Update
2495
               this constant in FWD.", paramType))</action>
2496
         </rule>
2497
      </function>
2466 2498
      
2467 2499
   </func-library>
2468 2500
   
rules/schema/generate_ddl.xml 2021-01-13 21:04:41 +0000
5 5
**
6 6
** Copyright (c) 2006-2020, Golden Code Development Corporation.
7 7
**
8
** _#_ _I_ __Date__ _________________________________Description_________________________________
8
** _#_ _I_ __Date__ _______________________________________Description_______________________________________
9 9
** 001 GES 20100629 Created initial version based on reindex.xml. Walks P2O
10 10
**                  AST to setup Hibernate, then uses Hibernate to generate
11 11
**                  DDL for all tables and for all indexes.
......
35 35
** 015 VMN 20140502 Added enhance schema name conversion support for hint "escape" attribute.
36 36
** 016 OM  20160712 Removed p2j_id_generator_sequence from generated index DDL.
37 37
** 017 OM  20200906 New ORM implementation.
38
** 018 OM  20201231 The index components is aware of all their name (legacy/orm/sql).
38 39
-->
39 40

  
40 41
<!--
rules/schema/iface_comp.rules 2020-11-20 18:40:59 +0000
6 6
**
7 7
** Copyright (c) 2005-2020, Golden Code Development Corporation.
8 8
**
9
** _#_ _I_ __Date__ __JPRM__ ____________________________Description_____________________________
9
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________
10 10
** 001 ECF 20050922   @22942 Created initial version. Provides creation rules for the composite
11 11
**                           getter and setter method declarations of a DMO interface Java AST.
12 12
** 002 ECF 20060321   @25269 Made numeric DMO setter methods more lenient. Setters for integer
......
28 28
**                           assign method.
29 29
** 011 OM  20200108          Moved back the extent support method definition to main interface
30 30
**                           (reverting H009).
31
** 012 OM  20201120          Detected EXTENT annotation in a more reliant way (and simple at the same time).
31 32
-->
32 33

  
33 34
<!--
......
101 102
   <include name="schema/dmo_common" />
102 103
   
103 104
   <!-- variable declarations -->
104
   <variable name="refAst"          type="com.goldencode.ast.Aast" />
105 105
   <variable name="methRoot"        type="com.goldencode.ast.Aast" />
106 106
   <variable name="descList"        type="java.util.List" />
107 107
   <variable name="extentVal"       type="java.lang.Long" />
......
119 119
   
120 120
   <walk-rules>
121 121
   
122
      <rule>type == data.property and this.isAnnotation('composite')
122
      <rule>type == data.property and this.isAnnotation("extent")
123 123
      
124 124
         <!-- retrieve necessary annotations -->
125 125
         <action>dataType = execLib('getDataType', this)</action>
126 126
         <action>dType = execLib('adjustDataType', dataType)</action>
127
         <action>refAst = getAst(#(long) this.getAnnotation('composite'))</action>
128
         <action>extentVal = refAst.getAnnotation('extent')</action>
127
         <action>extentVal = this.getAnnotation("extent")</action>
129 128
         
130 129
         <!-- gather javadoc data -->
131 130
         <action>descList = execLib('gatherDocData', this)</action>
rules/schema/import.xml 2021-01-25 07:55:58 +0000
97 97
** 030 OM  20200906          New ORM implementation.
98 98
** 031 CA  20200910          Fixed the datetime(-tz) field's initial value at import - it uses ISO8601
99 99
**                           format or NOW function.
100
**     IAS 20201219          Added 'CPSTREAM' import task argument
101
**                           Added word tables population on import
100 102
-->
101 103

  
102 104
<!--
......
197 199
   <variable name="fwdDialect"      type="com.goldencode.p2j.persist.dialect.Dialect" />
198 200
   
199 201
   <!-- parameters -->
200
   <variable name="dbName"   type="java.lang.String" /> <!-- required -->
201
   <variable name="targetDb" type="java.lang.String" /> <!-- defaults to "h2" -->
202
   <variable name="url"      type="java.lang.String" /> <!-- defaults to "jdbc:h2:dbs/<dbName>;MVCC=true" -->
203
   <variable name="uid"      type="java.lang.String" /> <!-- defaults to "gc" -->
204
   <variable name="pw"       type="java.lang.String" /> <!-- defaults to "p3rs1st" -->
202
   <variable name="dbName"    type="java.lang.String" /> <!-- required -->
203
   <variable name="targetDb"  type="java.lang.String" /> <!-- defaults to "h2" -->
204
   <variable name="url"       type="java.lang.String" /> <!-- defaults to "jdbc:h2:dbs/<dbName>;MVCC=true" -->
205
   <variable name="uid"       type="java.lang.String" /> <!-- defaults to "gc" -->
206
   <variable name="pw"        type="java.lang.String" /> <!-- defaults to "p3rs1st" -->
207
   <variable name="cpstream"  type="java.lang.String" />
205 208
   
206 209
   <func-library access="public">
207 210
      <function name="getDefaultValue">
......
279 282
      <rule>printfln('INFO:  Using %d threads for import', maxThreads)</rule>
280 283
      
281 284
      <rule>cacheables = create('java.util.HashSet')</rule>
282
      <rule>ormProps = execLib("buildDbImportProperties", dbName, targetDb, url, uid, pw)</rule>
285
      <rule>ormProps = execLib("buildDbImportProperties", dbName, targetDb, url, uid, pw, cpstream)</rule>
283 286
      <rule>fwdDialect = create(ormProps.getProperty("dialect"))</rule>
284 287
   </init-rules>
285 288
   
......
363 366
      <variable name="indexes"      type="java.util.List" />
364 367
      <variable name="session"      type="com.goldencode.p2j.persist.orm.Session" />
365 368
      <variable name="default"      type="com.goldencode.p2j.util.BaseDataType" />
369
      <variable name="wordTableName" type="java.lang.String" />
366 370
      
367 371
      <init-rules>
368 372
         <rule>schemaName = text</rule>
......
441 445
         </rule>
442 446
         
443 447
         <rule>type == data.index and !skipImport
448
            <action>
449
                wordTableName = null
450
            </action>
451
            <rule>this.isAnnotation("word")
452
	            <action>
453
	                wordTableName = imp.getWordTableName(dmoIface, text)
454
	            </action>
455
            </rule>
444 456
            <!-- instantiate an index definition -->
445 457
            <action>
446 458
               indexDef = create("com.goldencode.p2j.persist.P2JIndex",
......
448 460
                                 data.formatWithEscapedParameter("idx__%s", text),
449 461
                                 this.isAnnotation("unique"),
450 462
                                 this.isAnnotation("primary"),
451
                                 this.isAnnotation("word"))
463
                                 this.isAnnotation("word"),
464
                                 wordTableName)
452 465
            </action>
453 466
            
454 467
            <!-- add it to the list for this table/DMO -->
rules/schema/import_util.rules 2020-12-23 16:58:23 +0000
19 19
** 007 VMN 20131106          Removed "sqlserver2008" target DB because SQL Server 2008 does not
20 20
**                           support sequences.
21 21
** 008 OM  20200408          Replaced Hibernate with customized orm.
22
** 009 IAS 20201219          Added 'CPSTREAM' import task argument
22 23
-->
23 24

  
24 25
<!--
......
93 94
         <parameter name="uid"            type="java.lang.String" />
94 95
         <!-- connection pasword may be null, defaults to "p3rs1st" -->
95 96
         <parameter name="pw"             type="java.lang.String" />
97
         <!-- table dump file codepage, optional -->
98
         <parameter name="cpstream"       type="java.lang.String" />
99
         
96 100
         <return    name="dbImportParams" type="java.util.Properties" />
97 101
         
98 102
         <variable name="dialectClass"    type="java.lang.String" />
......
159 163
            <action>pw = "p3rs1st"</action>
160 164
         </rule>
161 165
         
166
         <rule>cpstream != null
167
            <action>>dbImportParams.put("dump.cpstream", cpstream)</action>
168
         </rule>
169
         
162 170
         <rule>dbImportParams.put("dialect", dialectClass)</rule>
163 171
         <rule>dbImportParams.put("database_name", dbName)</rule>
... This diff was truncated because it exceeds the maximum size that can be displayed.