-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDFRefactorImportExportFile.json
More file actions
5627 lines (5627 loc) · 285 KB
/
DFRefactorImportExportFile.json
File metadata and controls
5627 lines (5627 loc) · 285 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"iNoOfFunctions": 37,
"Data": [
{
"ID": "18",
"Function_Name": "ChangeCalcToMoveStatement",
"Function_Description": "",
"Function_Help": "Changes legacy Calc\/MoveInt\/MoveStr\/MoveNum\/MoveReal -> 'Move' command.\r\nThe legacy commands compiles but does not work with the Studio's statement completion.",
"SummaryText": "Changed: Calc\/MoveInt\/MoveStr\/MoveReal -> Move",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "1",
"Function_Name": "ChangeCurrent_ObjectToSelf",
"Function_Description": "",
"Function_Help": "Changes legacy Current_Object -> Self\r\nReplaces the legacy keyword 'Current_Object' with 'Self'",
"SummaryText": "Changed: Legacy Current_Object -> Self",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "2",
"Function_Name": "ChangeDfTrueDfFalse",
"Function_Description": "",
"Function_Help": "Replaces legacy DfTrue and DFFalse with True or False",
"SummaryText": "DFTrue -> True",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "4",
"Function_Name": "ChangeGetAddress",
"Function_Description": "",
"Function_Help": "Replaces legacy GetAddress command with function AddressOf.\r\nExample: GetAddress of sVal to aAddress --> Move (AddressOf(sVal)) to aAddress",
"SummaryText": "GetAdress -> (AddressOf(",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "36",
"Function_Name": "ChangeIfNotCommandToExpression",
"Function_Description": "",
"Function_Help": "Changes command \"IFNOT\" into an expression\r\nExample: IFNOT Found Begin --> If (Not(Found)) Begin",
"SummaryText": "IFNOT command -> If (not('indicator'))",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "5",
"Function_Name": "ChangeInsertCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes legacy Insert command to use the function Insert.\r\nExample: Insert \",\" In sText At 2 --> Move (Insert(\",\", sText, 2)) to sText\r\nIf sOne Eq \"A\" Insert \"B\" in sOne at 2 --> If sOne Eq \"A\" Move (Insert(\"B\", sOne, 2)) to sOne",
"SummaryText": "Insert command -> (Insert(",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "6",
"Function_Name": "ChangeInToContains",
"Function_Description": "",
"Function_Help": "Replaces IN command with expression operator Contains.\r\nIt also swap places for the two variables involved and adds paranthesis.",
"SummaryText": "Changed: 'In' to 'Contains'",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "33",
"Function_Name": "ChangeLeftCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes legacy Left command with Left.\r\nExample: Left sVar 5 to sLeft -> Move (Left(sVar, 5)) to sLeft",
"SummaryText": "Changed: 'Left' command to function: 'Left'",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "3",
"Function_Name": "ChangeLegacyIndicators",
"Function_Description": "",
"Function_Help": "Changes legacy 'Indicate' to expression\r\nExamples:\r\n- Indicate Found as True\" --> Move True to Found\r\n- [Select] Indicate Select as Windowindex Eq Fieldindex --> Move (WindowInex = FieldIndex) to Select\r\n- [Found] and [FindErr] indicator statements.\r\n- [Found| Command -> e.g. If Found Command\r\n- While [Not Found] -> e.g. While (Not(Found))\r\n- [Found|Not Found|FindErr|Not FindErr] While -> e.g. While (Not(Found))\r\n- [Found] Indicate Found as Invoice.CustNum eq Customer.Number -> If (Found) Move (Invoice.CustNum eq Customer.Number) to Found\r\n- If [Not Found] Reread hTable -> If (Not(Found)) Reread hTable\r\n- [~Found] begin -> If (Not(Found)) Begin\r\n- [Found ~Found] Begin -> If (Found and Not(Found)) Begin\r\nKnown limitations:\r\n- It can only handle max two booleans within the same square bracket. E.g. [Found Select]\r\n- It can't handle \"GROUP\" and\/or \"ALL\" indicator directives. If any of those two are found,\r\n this function will leave the sLine as it is.",
"SummaryText": "Changed: [Found] -> (Not(Found))",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "8",
"Function_Name": "ChangeLegacyOperators",
"Function_Description": "",
"Function_Help": "Changes legacy comparison operators to: <, <=, =, <>, >, >=\r\nReplaces: gt, ge, lt, le, eq, ne with > >= < <= = <>\r\nIt does not change operators in e.g. find operations.",
"SummaryText": "Changed: lt, le, eq, ne, gt, ge to: <, <=, =, <>, >, >=",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "32",
"Function_Name": "ChangeLegacyShadow_State",
"Function_Description": "",
"Function_Help": "Changes Shadow_State and Object_Shadow_State to Enabled_State\r\nExample: Set Shadow_State [of oObject] to True -> Set Enabled_State [of oObject] to False\r\n Set Object_Shadow_State [of oObject] to True -> Set Enabled_State [of oObject] to False",
"SummaryText": "Changed: Shadow_State to Enabled_State",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "9",
"Function_Name": "ChangeLengthCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes usage of the legacy Length command with function Length.\r\nExample: Length sVar to iLength -> Move (Length(sVar)) to iLength",
"SummaryText": "Changed: 'Length' command to function 'Length'",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "10",
"Function_Name": "ChangePosCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes usage of legacy Pos command with function Pos.\r\nExample: Pos \"-\" in sIns to iPos --> Move (Pos(\"-\",sIns)) to iPos",
"SummaryText": "Changed: Pos command to function Pos",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "11",
"Function_Name": "ChangeReplaceCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes legacy Replace command with function Replace.\r\nExample: Replace \",\" In sText With \".\" --> Move (Replace(\",\",sText,\".\")) to sText",
"SummaryText": "Changed: Replace command to function Replace",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "34",
"Function_Name": "ChangeRightCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes legacy Right command with function Right\r\nExample: Right sVar 5 to sLeft -> Move (Rigth(sVar, 5)) to sLeft",
"SummaryText": "Changed: Right command to function",
"Selected": true,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "35",
"Function_Name": "ChangeSquareBracketsIndicators",
"Function_Description": "",
"Function_Help": "Changes legacy square brackets found indicators; [Found] [FindErr] to expressions; (Found) or (Not(Found))\r\nIt does not change the 'Indicate' key word, only change square brackets to expressions.\r\nSample Code:\r\n - [Found] and [FindErr] indicator statements to (Found) and (FindErr).\r\n - [Found| Command -> e.g. If (Found) Command\r\n - While [Not Found] -> e.g. While (Not(Found))\r\n - [Not Found] While -> e.g. While (Not(Found))\r\n - If [Not Found] Reread hTable -> If (Not(Found)) Reread hTable\r\n - [~Found] Begin -> If (Not(Found)) Begin\r\n - [Found ~Found] Begin -> If (Found and Not(Found)) Begin\r\nKnown limitations:\r\n - It can't handle \"GROUP\" and\/or \"ALL\" indicator directives. If any of those two are found,\r\n the function will leave the sLine as it is.",
"SummaryText": "Changed: Square indicator expression [xxx] --> Paranthesis expression (xxx)",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "12",
"Function_Name": "ChangeSysdate4",
"Function_Description": "",
"Function_Help": "Changes legacy Sysdate4 command to Sysdate command.\r\nExample: Sysdate4 dDate -> Sysdate dDate",
"SummaryText": "Changed: Sysdate4 command to Sysdate",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "13",
"Function_Name": "ChangeTrimCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes lecacy Trim command with function Trim.\r\nExample: Trim sVal to sVal -> Move (Trim(sVal)) to sVal",
"SummaryText": "Changed: Trim command to function Trim",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "15",
"Function_Name": "ChangeUClassToRefClass",
"Function_Description": "",
"Function_Help": "Changes legacy Get Create U_Class to: Get Create (RefClass(Class))",
"SummaryText": "Changed: 'Create U_Class' to 'Create (RefClass(Class))'",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "14",
"Function_Name": "ChangeZeroStringCommandToFunction",
"Function_Description": "",
"Function_Help": "Changes legacy ZeroString command with function ZeroString.\r\nExample: ZeroString iLength to sParameter --> Move (ZeroString(iLength)) to sParameter",
"SummaryText": "Changed: ZeroString command to function",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "16",
"Function_Name": "EditorNormalizeCase",
"Function_Description": "",
"Function_Help": "Adjusts the casing of all scopes and keywords to match the casing as defined in the language configuration.\r\nThis is a wrapper function for the cScintillaEdit editor.\r\nA visible (paged) instantiation of the cScintillaEdit class is needed for this function to operate properly.\r\nThe DFRefactor program's 'Editor' view is used for this.",
"SummaryText": "Changed: Proper Upper and lowercasing",
"Selected": false,
"Type": 3,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "17",
"Function_Name": "EditorReIndent",
"Function_Description": "",
"Function_Help": "Reindents the source code with the number of spaces specified in the sParameter variable.\r\nThis is a wrapper function for the cScintillaEdit editor.\r\nA visible (paged) instantiation of the cScintillaEdit class is needed for this function to operate properly.\r\nThe DFRefactor program's 'Editor' view is used for this.",
"SummaryText": "Reindented code",
"Selected": false,
"Type": 3,
"bHasParameter": true,
"Parameter": "4",
"ParameterValidation": "1,2,3,4,5,6,7,8",
"ParameterHelp": "Select the indent size you want to use for spaces when indenting code\r\nand when breaking a line on rewriting a single line to multiple lines.\r\nIt is the same value that can be set on the Editor Settings dialog tab size.",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "37",
"Function_Name": "NormalizeArrayNotation",
"Function_Description": "",
"Function_Help": "A array variable declaration like e.g. \"String [] asAddress\", is changed to: \"String[] asAddress\"\r\n (Note the removed SPACE between \"String\" and \"[]\".",
"SummaryText": "Changed: NormalizeArrayNotation",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "23",
"Function_Name": "RemoveEndComments",
"Function_Description": "",
"Function_Help": "Removes end of line comments for: End_Class, End_Object, End_Function & End_Procedure.",
"SummaryText": "Removed: End comments",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "20",
"Function_Name": "RemoveLocalKeyWord",
"Function_Description": "",
"Function_Help": "Removes 'Local' keyword if present from procedures and functions variable declaration lines.",
"SummaryText": "Removed: 'Local' key word",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "19",
"Function_Name": "RemoveMultipleBlankLines",
"Function_Description": "",
"Function_Help": "Removes blank lines if more than xx 'Max blank lines'\r\nRemoves consecutive empty blank lines if more than sParameter value.\r\nTakes a source file as a string array as a parameter.\r\nReturns the passed string array with removed duplicated empty lines.",
"SummaryText": "Removed: Consecutive blank Lines",
"Selected": false,
"Type": 6,
"bHasParameter": true,
"Parameter": "2",
"ParameterValidation": "1,2,3,4,5,6",
"ParameterHelp": "Select max number of consecutive blank lines allowed in source files.",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "24",
"Function_Name": "RemoveOldStudioMarkers",
"Function_Description": "",
"Function_Help": "Removes legacy IDE markers '\/\/AB-Store' etc.\r\nReturns True if at least one legacy IDE (Studio) source code marker was found.",
"SummaryText": "Removed: Legacy IDE markers",
"Selected": false,
"Type": 2,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "30",
"Function_Name": "RemoveProjectObjectStructure",
"Function_Description": "",
"Function_Help": "Removes legacy Register_Object structures on top of e.g. view files.\r\nIt removes old style Studio 'Project Object Structures\"\r\nIt does not do so for WebApp (*.wo) files.",
"SummaryText": "Removed: Register_Object structures",
"Selected": false,
"Type": 2,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "21",
"Function_Name": "RemovePropertyPrivate",
"Function_Description": "",
"Function_Help": "Removes 'Private' keyword from Property declaration lines.",
"SummaryText": "Removed: 'Private' property key word",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "22",
"Function_Name": "RemovePropertyPublic",
"Function_Description": "",
"Function_Help": "Removes 'Public' property members from property declaration lines.",
"SummaryText": "Removed: 'Puplic' property key word",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "25",
"Function_Name": "RemoveSansSerif",
"Function_Description": "",
"Function_Help": "Removes \"MS Sans Serif\" font source lines.",
"SummaryText": "Removed: 'MS Sans Serif' lines",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "7",
"Function_Name": "RemoveStudioGeneratedComments",
"Function_Description": "",
"Function_Help": "Removes old Studio generated comments lines.\r\nExamples:\r\n\/\/ fires when the button is clicked\r\n\/\/OnChange is called on every changed character\r\n\/\/ Visual DataFlex xx.x Client Size Adjuster\r\n\/\/ Visual DataFlex xx.x Migration Utility\r\n...and so on",
"SummaryText": "Removed: Studio generated comments",
"Selected": false,
"Type": 2,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "26",
"Function_Name": "RemoveTrailingSpaces",
"Function_Description": "",
"Function_Help": "Removes spaces at the end of lines (trailing spaces).",
"SummaryText": "Removed: Spaces at end of line",
"Selected": false,
"Type": 1,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "27",
"Function_Name": "RemoveUnusedLocals",
"Function_Description": "",
"Function_Help": "Removes variables from functions and procedures that aren't used.\r\nA limitation is that it does not remove unused *struct* variables.\r\nPass a source file as a string array.\r\nRemoves all unusad locally defined, in Procedures & Functions, for the\r\npassed string array. Returns number of removed unused local variables.",
"SummaryText": "Removed: Unused local variables",
"Selected": false,
"Type": 6,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "29",
"Function_Name": "ReportUnusedSourceFiles",
"Function_Description": "",
"Function_Help": "Reports Only! Makes no changes to the source code.\r\nCheck all files in the current workspace to see if they are used, else list them in a report.\r\nPass an array with *all source files*\r\nReturns a list of unused files. See the DFRefactor programs: 'Other Log Files' toolbar button for results.",
"SummaryText": "Report created: Files that are never used",
"Selected": false,
"Type": 4,
"bHasParameter": false,
"Parameter": "",
"ParameterValidation": "",
"ParameterHelp": "",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "31",
"Function_Name": "RestyleDDOs",
"Function_Description": "",
"Function_Help": "The naming style of data-dictionaries *objects* over time has changed.\r\nThe new style is:\r\n Object o<tablename>_DD is a c<TableName>Datadictionary\r\nThey also have a switch so you can keep on using the legacy style name which is:\r\n Object o<tablename>_DD is a <tablename>_Datadictionary\r\n\r\nHowever before VDF12, this is how it looked:\r\n Object <tableName>_DD is a <tablename>_Datadictionary\r\n\r\nThis caused tremendous headaches as due to the extra \"o\" we ended up with name clashes\r\nall over the place. Copying old code into new views\/dialogs simply breaks and if your\r\ncodebase has mixed styles then the compiler will not catch that.\r\nA code nightmare.\r\n\r\nExamples:\r\n <TableName>_DD - o<TableName>DD (eDDStudioStyle)\r\n <TableName>_DD - o<TableName>_dd (neDDNewStyle)",
"SummaryText": "Renamed DataDictionary objects",
"Selected": false,
"Type": 7,
"bHasParameter": true,
"Parameter": "eDDNewStyle",
"ParameterValidation": "eDDStudioStyle,eDDNewStyle,eDDOldStyle",
"ParameterHelp": "Valid values;\r\neDDStudioStyle - o<TableName>DD\r\neDDNewStyle - o<TableName>_dd\r\noDDOldStyle - <TableName>_DD }",
"bPrivate": false,
"bPublished": true,
"Counter": 0
},
{
"ID": "28",
"Function_Name": "SplitInlineIfElseLine",
"Function_Description": "",
"Function_Help": "Splits If\/Else single lines to If\/Else - Begin constructs.\r\nIt does *not* split if the last word is = \"Break\", as that could\r\nchange the program logic.\r\nThe function accepts a parameter controlling the If\/Else or Begin\/End block constructs.\r\nValid sParameters, See: EnumList;",
"SummaryText": "Split If\/Else line",
"Selected": false,
"Type": 1,
"bHasParameter": true,
"Parameter": "eSplitToBeginEndBlock",
"ParameterValidation": "eSplitBySpaceAndSemicolon,eSplitBySemicolon,eSplitToBeginEndBlock",
"ParameterHelp": "Valid values;\r\neSplitBySpaceAndSemicolon - Split line with space and semicolon\r\neSplitBySemicolon - Split line with semicolon\r\neSplitToBeginEndBlock - Use a Begin\/End block }",
"bPrivate": false,
"bPublished": true,
"Counter": 0
}
],
"Code": [
{
"sFunctionName": "ChangeCalcToMoveStatement",
"iSourceLines": 33,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Changes legacy Calc\/MoveInt\/MoveStr\/MoveNum\/MoveReal -> 'Move' command.",
" The legacy commands compiles but does not work with the Studio's statement completion.",
" { MethodType = eStandardFunction }",
" { SummaryText = Changed: Calc\/MoveInt\/MoveStr\/MoveReal -> Move }",
" \"\"\" }",
" Function ChangeCalcToMoveStatement String ByRef sLine String sParameter Returns Boolean",
" Boolean bChanged bFound",
" tTokenizer TokenizerData",
"",
" Get pTokenizer to TokenizerData",
" If (TokenizerData.bLineIsReady = True or TokenizerData.bIsInCommand = True or TokenizerData.bIsInImage = True or TokenizerData.bIsVariableDeclaration = True) Begin",
" Function_Return False",
" End",
"",
" \/\/ Check if line contains one of the keywords and that none of the keywords are within quotes.",
" Get IsKeywordInLine \"calc|moveint|movenum|movereal|movestr\" TokenizerData.asLineTokens to bFound",
" If (bFound = False) Begin",
" Function_Return False",
" End",
"",
" Move False to bChanged",
" If (bChanged = False) Get _SubstituteCalcKeyword (&sLine) \"calc\" 4 to bChanged",
" If (bChanged = False) Get _SubstituteCalcKeyword (&sLine) \"moveint\" 7 to bChanged",
" If (bChanged = False) Get _SubstituteCalcKeyword (&sLine) \"movenum\" 7 to bChanged",
" If (bChanged = False) Get _SubstituteCalcKeyword (&sLine) \"movereal\" 8 to bChanged",
" If (bChanged = False and TokenizerData.bIsMoveStatement = False) Begin",
" Get _SubstituteCalcKeyword (&sLine) \"movestr\" 7 to bChanged",
" End",
"",
" Function_Return bChanged",
" End_Function"
]
},
{
"sFunctionName": "ChangeCurrent_ObjectToSelf",
"iSourceLines": 41,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Changes legacy Current_Object -> Self",
" Replaces the legacy keyword 'Current_Object' with 'Self'",
" { MethodType = eStandardFunction }",
" { SummaryText = Changed: Legacy Current_Object -> Self }",
" \"\"\" }",
" Function ChangeCurrent_ObjectToSelf String ByRef sLine String sParameter Returns Boolean",
" String sChar",
" Boolean bFound",
" Integer iPos iItem",
" tTokenizer TokenizerData",
"",
" Get pTokenizer to TokenizerData",
" If (TokenizerData.bLineIsReady = True) Begin",
" Function_Return False",
" End",
"",
" Move (SearchArray(CS_Current_Object, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem = -1) Begin",
" Move (Pos(Lowercase(CS_Current_Object), Lowercase(sLine))) to iPos",
" If (iPos <> 0) Begin",
" Move (Mid(sLine, 1, (iPos -1))) to sChar",
" If (sChar <> \"(\") Begin",
" Function_Return",
" End",
" End",
" Else Begin",
" Function_Return False",
" End",
" End",
"",
" Get ReplaceLineToken TokenizerData sLine CS_Current_Object CS_Self to sLine",
" \/\/ Note! We call ourself recursively if there are more than one \"current_object\".",
" Move (Pos(Lowercase(CS_Current_Object), Lowercase(sLine))) to iPos",
" If (iPos <> 0) Begin",
" Get ChangeCurrent_ObjectToSelf (&sLine) \"\" to bFound",
" End",
"",
" Function_Return True",
" End_Function"
]
},
{
"sFunctionName": "ChangeDfTrueDfFalse",
"iSourceLines": 43,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Replaces legacy DfTrue and DFFalse with True or False",
" { MethodType = eStandardFunction }",
" { SummaryText = DFTrue -> True }",
" \"\"\" }",
" Function ChangeDfTrueDfFalse String ByRef sLine String sParameter Returns Boolean",
" Boolean bFound",
" String sNewBoolean",
" Integer iPos",
" tTokenizer TokenizerData",
"",
" Get pTokenizer to TokenizerData",
"",
" If (TokenizerData.bLineIsReady = True) Begin",
" Function_Return False",
" End",
"",
" \/\/ Note: The sKeywords string must be separated by \"|\" _and_ end with a \"|\".",
" Get IsKeywordInLine (CS_DfTrue + CS_D + CS_DfFalse + CS_D) TokenizerData.asLineTokens to bFound",
" If (bFound = False) Begin",
" Function_Return False",
" End",
"",
" Move (Trim(sLine)) to sLine",
" Repeat",
" Move CS_True to sNewBoolean",
" Move (Pos(Lowercase(CS_DfTrue), Lowercase(TokenizerData.sOverstrikeLine))) to iPos",
" If (iPos = 0) Begin",
" Move (Pos(Lowercase(CS_DfFalse), Lowercase(TokenizerData.sOverstrikeLine))) to iPos",
" Move CS_False to sNewBoolean",
" End",
" If (iPos <> 0) Begin",
" Move (Overstrike(\"||\" + sNewBoolean, sLine, iPos)) to sLine",
" Move (Replace(\"||\", sLine, \"\")) to sLine",
" Move (Overstrike(\"||\" + sNewBoolean, TokenizerData.sOverstrikeLine, iPos)) to TokenizerData.sOverstrikeLine",
" Move (Replace(\"||\", TokenizerData.sOverstrikeLine, \"\")) to TokenizerData.sOverstrikeLine",
" End",
" Until (iPos = 0)",
"",
" Move (TokenizerData.sIndentation + String(sLine)) to sLine",
" Function_Return True",
" End_Function"
]
},
{
"sFunctionName": "ChangeGetAddress",
"iSourceLines": 34,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Replaces legacy GetAddress command with function AddressOf.",
" Example: GetAddress of sVal to aAddress --> Move (AddressOf(sVal)) to aAddress",
" { MethodType = eStandardFunction }",
" { SummaryText = GetAdress -> (AddressOf( }",
" \"\"\" }",
" Function ChangeGetAddress String ByRef sLine String sParameter Returns Boolean",
" Boolean bFound",
" String sText",
" tTokenizer TokenizerData",
"",
" Get pTokenizer to TokenizerData",
" Move sLine to sText",
"",
" If (TokenizerData.bLineIsReady = True or TokenizerData.bHasEndSemiColon = True or TokenizerData.bIsInFunction = True or ;",
" TokenizerData.bIsInProcedure = True) Begin",
" Function_Return False",
" End",
"",
" Get IsKeywordInLine (CS_GetAddress + CS_D) TokenizerData.asLineTokens to bFound",
" If (bFound = False) Begin",
" Function_Return False",
" End",
"",
" If (TokenizerData.sEndComment <> \"\") Begin",
" Move (TokenizerData.sIndentation + CS_Move * \"(\" + CS_AddressOf + \"(\" + TokenizerData.OfStatement.sCode + \"))\" * CS_To * String(TokenizerData.ToStatement.sCode) * String(TokenizerData.sEndComment)) to sLine",
" End",
" Else Begin",
" Move (TokenizerData.sIndentation + CS_Move * \"(\" + CS_AddressOf + \"(\" + TokenizerData.OfStatement.sCode + \"))\" * CS_To * String(TokenizerData.ToStatement.sCode)) to sLine",
" End",
"",
" Function_Return True",
" End_Function"
]
},
{
"sFunctionName": "ChangeIfNotCommandToExpression",
"iSourceLines": 43,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Changes command \"IFNOT\" into an expression",
" Example: IFNOT Found Begin --> If (Not(Found)) Begin",
" { MethodType = eStandardFunction }",
" { SummaryText = IFNOT command -> If (not('indicator')) }",
" \"\"\" }",
" Function ChangeIfNotCommandToExpression String ByRef sLine String sParameter Returns Boolean",
" tTokenizer TokenizerData",
" Integer iItem iPos iSize iCount",
" String sCode sToken",
"",
" Get pTokenizer to TokenizerData",
" If (TokenizerData.bLineIsReady = True or TokenizerData.bIsInCommand = True) Begin",
" Function_Return False",
" End",
"",
" Move (SearchArray(\"IFNOT\", TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem = -1) Begin",
" Function_Return False",
" End",
"",
" Move sLine to sCode",
" Move (Pos(\"ifnot\", Lowercase(sCode))) to iPos",
" Move (Left(sCode, (iPos + Length(\"ifnot\")))) to sCode",
" If (iPos <> 0) Begin",
" Move (Overstrike(\"|||||\", sCode, iPos)) to sCode",
" Move (Replace(\"|||||\", sCode, CS_If)) to sCode",
" Increment iItem",
" Move TokenizerData.asLineTokens[iItem] to sToken",
" Append sCode \"(\" CS_Not \"(\" sToken \")) \"",
" Move (TokenizerData.iTokenCount) to iSize",
" Decrement iSize",
" For iCount from (iItem +1) to iSize",
" Append sCode TokenizerData.asLineTokens[iCount] CS_S",
" Loop",
" End",
" Move (RTrim(sCode)) to sCode",
" If (sLine <> sCode) Begin",
" Move sCode to sLine",
" End",
" Function_Return True",
" End_Function"
]
},
{
"sFunctionName": "ChangeInsertCommandToFunction",
"iSourceLines": 68,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Changes legacy Insert command to use the function Insert.",
" Example: Insert \",\" In sText At 2 --> Move (Insert(\",\", sText, 2)) to sText",
" If sOne Eq \"A\" Insert \"B\" in sOne at 2 --> If sOne Eq \"A\" Move (Insert(\"B\", sOne, 2)) to sOne",
" { MethodType = eStandardFunction }",
" { SummaryText = Insert command -> (Insert( }",
" \"\"\" }",
" Function ChangeInsertCommandToFunction String ByRef sLine String sParameter Returns Boolean",
" Boolean bChanged bFound",
" String sNose sLineLC sToken sVar1 sVar2 sText",
" Integer iPos iItem iInPos",
" tTokenizer TokenizerData",
"",
" Get pTokenizer to TokenizerData",
" If (TokenizerData.bLineIsReady = True or TokenizerData.bIsInCommand = True) Begin",
" Function_Return False",
" End",
"",
" Move (SearchArray(CS_Insert, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem = -1) Begin",
" Function_Return False",
" End",
"",
" Move (Trim(sLine)) to sLine",
"",
" Move \"\" to sNose",
" Move (Lowercase(sLine)) to sLineLC",
" Move (SearchArray(CS_Insert, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" \/\/ If anything left of the CS_Insert command, save it in \"sNose\" (start string)",
" If (iItem > 0) Begin",
" Move (Pos(Lowercase(CS_Insert), sLineLC)) to iPos",
" Move (Left(sLine, (iPos -1))) to sNose",
" Move (Replace(sNose, sLine, \"\")) to sLine",
" End",
"",
" \/\/ Remove the CS_Insert command",
" Move TokenizerData.asLineTokens[iItem] to sToken",
" Move (Replace(sToken, sLine, \"\")) to sLine",
" \/\/ Get the first variable",
" Move TokenizerData.asLineTokens[iItem + 1] to sVar1",
"",
" \/\/ Find and remove the \"IN\" keyword.",
" Move (SearchArray(CS_In, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem <> -1) Begin",
" Move TokenizerData.asLineTokens[iItem] to sToken",
" Move (Replace(sToken, sLine, \"\")) to sLine",
" Move TokenizerData.asLineTokens[iItem + 1] to sVar2",
" End",
"",
" \/\/ Find and remove the \"AT\" keyword, and save the next parameter which is the position to insert at.",
" Move (SearchArray(CS_At, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem <> -1) Begin",
" Move TokenizerData.asLineTokens[iItem] to sToken",
" Move (Replace(sToken, sLine, \"\")) to sLine",
" Move TokenizerData.asLineTokens[iItem + 1] to iInPos",
" End",
"",
" Move \"\" to sText",
" If (sNose <> \"\") Begin",
" Move sNose to sText",
" Move (Trim(sText) + CS_S) to sText",
" End",
" Append sText CS_Move CS_S \"(\" CS_Insert \"(\" sVar1 \",\" sVar2 \",\" iInPos \"))\" \" \" CS_To CS_S sVar2",
"",
" Get AssembleOutputLine sText TokenizerData to sLine",
" Function_Return bChanged",
" End_Function"
]
},
{
"sFunctionName": "ChangeInToContains",
"iSourceLines": 62,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Replaces IN command with expression operator Contains.",
" It also swap places for the two variables involved and adds paranthesis.",
" { MethodType = eStandardFunction }",
" { SummaryText = Changed: 'In' to 'Contains' }",
" \"\"\" }",
" Function ChangeInToContains String ByRef sLine String sParameter Returns Boolean",
" String sOrg sPattern sMatched sRemain sHost sSub sText sAfter sBefore sExpression",
" Integer iSize iCount iItem",
" tTokenizer TokenizerData",
"",
" Get pTokenizer to TokenizerData",
" If (TokenizerData.bLineIsReady = True) Begin",
" Function_Return False",
" End",
" Move (SearchArray(CS_With, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem <> -1) Begin",
" Function_Return False",
" End",
" Move (SearchArray(CS_Insert, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem <> -1) Begin",
" Function_Return False",
" End",
" Move (SearchArray(CS_Pos, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem <> -1) Begin",
" Function_Return False",
" End",
" Move (SearchArray(CS_In, TokenizerData.asLineTokens, Desktop, RefFunc(DFSTRICMP))) to iItem",
" If (iItem = -1) Begin",
" Function_Return False",
" End",
"",
" Move sLine to sOrg",
" Move sLine to sText",
" Move TokenizerData.asLineTokens[iItem -1] to sAfter",
" Move TokenizerData.asLineTokens[iItem +1] to sBefore",
" Decrement iItem",
" Move (\"(\" + sBefore * CS_Contains * String(sAfter) + \")\") to sExpression",
" \/\/ Set the \"Before\" array item to the expression",
" Move sExpression to TokenizerData.asLineTokens[iItem]",
" \/\/ Add expression to the expression array:",
" Move (SizeOfArray(TokenizerData.aExpressions)) to iSize",
" Move sExpression to TokenizerData.aExpressions[iSize].sExpression",
" Move (Length(sExpression)) to TokenizerData.aExpressions[iSize].iLength",
" Move (Pos(sAfter, sOrg)) to TokenizerData.aExpressions[iSize].iStartPos",
" If (TokenizerData.BooleanIndicator.AsBoolean.sCode <> \"\") Begin",
" Move sExpression to TokenizerData.BooleanIndicator.AsBoolean.sCode",
" End",
" Increment iItem",
" \/\/ Remove the two items we have concatenated.",
" Move (RemoveFromArray(TokenizerData.asLineTokens, iItem)) to TokenizerData.asLineTokens",
" Move (RemoveFromArray(TokenizerData.asLineTokens, iItem)) to TokenizerData.asLineTokens",
" Get RebuildLineFromTokens TokenizerData.asLineTokens 0 to sText",
"",
" Set pTokenizer to TokenizerData",
" If (sText <> sOrg) Begin",
" Get AssembleOutputLine (Trim(sText)) TokenizerData to sLine",
" End",
"",
" Function_Return (sLine <> sOrg)",
" End_Function"
]
},
{
"sFunctionName": "ChangeLeftCommandToFunction",
"iSourceLines": 12,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Changes legacy Left command with Left.",
" Example: Left sVar 5 to sLeft -> Move (Left(sVar, 5)) to sLeft",
" { MethodType = eStandardFunction }",
" { SummaryText = Changed: 'Left' command to function: 'Left' }",
" \"\"\" }",
" Function ChangeLeftCommandToFunction String ByRef sLine String sParameter Returns Boolean",
" Boolean bChanged",
" Get SingleCommandSyntaxToFunction (&sLine) CS_Left to bChanged",
" Function_Return bChanged",
" End_Function"
]
},
{
"sFunctionName": "ChangeLegacyIndicators",
"iSourceLines": 260,
"CodeArray": [
" { Published = True }",
" { Description = \"\"\"",
" Changes legacy 'Indicate' to expression",
" Examples:",
" - Indicate Found as True\" --> Move True to Found",
" - [Select] Indicate Select as Windowindex Eq Fieldindex --> Move (WindowInex = FieldIndex) to Select",
" - [Found] and [FindErr] indicator statements.",
" - [Found| Command -> e.g. If Found Command",
" - While [Not Found] -> e.g. While (Not(Found))",
" - [Found|Not Found|FindErr|Not FindErr] While -> e.g. While (Not(Found))",
" - [Found] Indicate Found as Invoice.CustNum eq Customer.Number -> If (Found) Move (Invoice.CustNum eq Customer.Number) to Found",
" - If [Not Found] Reread hTable -> If (Not(Found)) Reread hTable",
" - [~Found] begin -> If (Not(Found)) Begin",
" - [Found ~Found] Begin -> If (Found and Not(Found)) Begin",
" Known limitations:",