66;;
77;; Description: In-process callable interface to CodeGen
88;;
9- ;; Date:
9+ ;; Date:
1010;;
1111;; Author: Steve Ives, Synergex Professional Services Group
1212;; http://www.synergex.com
@@ -206,11 +206,11 @@ namespace CodeGen.Engine
206206 if (File.Exists(extensionsAssembly)) then
207207 begin
208208 ;;Report the extensions assembly we're going to use
209- context.Taskset.DevDebugLog(String.Format("Found Harmony Core extensions assembly {0}",extensionsAssembly))
209+ context.Taskset.DevDebugLog(String.Format("Found Harmony Core extensions assembly {0}",extensionsAssembly))
210210
211211 ;;Open the assembly and load extensions
212212 if (!loadExtensionsFromAssembly(extensionsAssembly,context))
213- context.Taskset.DevDebugLog("No extension classes were found in the extensions assembly!")
213+ context.Taskset.DevDebugLog("No extension classes were found in the extensions assembly!")
214214 end
215215 else
216216 begin
@@ -290,7 +290,7 @@ namespace CodeGen.Engine
290290 begin
291291 ;;Open the assembly and load extensions
292292 if (!loadExtensionsFromAssembly(extensionsAssembly,context))
293- errStatus = context.Taskset.ErrorLog("No extensions were found in the proforma extensions assembly!")
293+ errStatus = context.Taskset.ErrorLog("No extensions were found in the proforma extensions assembly!")
294294 end
295295
296296 mreturn !errStatus
@@ -446,7 +446,7 @@ namespace CodeGen.Engine
446446 end
447447
448448 ;;--------------------------------------------------------------------------------------
449- ;;
449+ ;;
450450
451451 if (!context.CurrentTask.MethodCatalogStructureMode)
452452 begin
@@ -459,7 +459,7 @@ namespace CodeGen.Engine
459459 begin
460460 mreturn context.CurrentTask.ErrorLog(String.Format("Interface {0} was not found in the method catalog!",context.CurrentTask.MethodCatalogInterface))
461461 end
462-
462+
463463 ;;And remove all other interfaces
464464 context.MethodCatalog.Interfaces.RemoveAll(lambda(intf) {intf!=selectedInterface})
465465 context.MethodCatalogCustomized = true
@@ -480,7 +480,7 @@ namespace CodeGen.Engine
480480 mreturn context.CurrentTask.ErrorLog(String.Format("Interface {0} was not found in the method catalog!",context.CurrentTask.MethodCatalogInterface))
481481 end
482482 end
483-
483+
484484 if (context.MethodCatalog.Structures.Count == 0)
485485 begin
486486 mreturn context.CurrentTask.ErrorLog("Method catalog export file contains no structures!")
@@ -766,7 +766,7 @@ namespace CodeGen.Engine
766766 end
767767 end
768768 end
769-
769+
770770 endmethod
771771
772772 ;;; <summary>
@@ -889,6 +889,7 @@ namespace CodeGen.Engine
889889 proc
890890
891891 data errStatus = false
892+ data structureWildcard = false
892893
893894 ;;-------------------------------------------------------------------------
894895 ;;Echo command line?
@@ -1372,7 +1373,7 @@ namespace CodeGen.Engine
13721373 else
13731374 begin
13741375 context.SelectionWindowScript = fileSpec
1375- context.CurrentTask.DebugLog(String.Format("Selection window processing enabled from file {0}",fileSpec))
1376+ context.CurrentTask.DebugLog(String.Format("Selection window processing enabled from file {0}",fileSpec))
13761377 end
13771378 end
13781379 end
@@ -1394,6 +1395,7 @@ namespace CodeGen.Engine
13941395 if (context.CurrentTask.Structures[0]=="*") then
13951396 begin
13961397 ;;Process all structures
1398+ structureWildcard = true
13971399 try
13981400 begin
13991401 context.Structures = new RpsStructureCollection(RpsLoadMode.Load,context.CurrentTask.UseAlternateFieldNames)
@@ -1410,7 +1412,7 @@ namespace CodeGen.Engine
14101412 begin
14111413 ;;Process specified structures
14121414 data ix, int
1413- for ix from 0 thru context.CurrentTask.Structures.Count-1
1415+ for ix from 0 thru context.CurrentTask.Structures.Count-1
14141416 begin
14151417 try
14161418 begin
@@ -1439,6 +1441,7 @@ namespace CodeGen.Engine
14391441 if (context.Taskset.Structures[0]=="*") then
14401442 begin
14411443 ;;Process all structures
1444+ structureWildcard = true
14421445 try
14431446 begin
14441447 context.Structures = new RpsStructureCollection(RpsLoadMode.Load,context.CurrentTask.UseAlternateFieldNames)
@@ -1455,7 +1458,7 @@ namespace CodeGen.Engine
14551458 begin
14561459 ;;Process specified structures
14571460 data ix, int
1458- for ix from 0 thru context.Taskset.Structures.Count-1
1461+ for ix from 0 thru context.Taskset.Structures.Count-1
14591462 begin
14601463 try
14611464 begin
@@ -1494,7 +1497,7 @@ namespace CodeGen.Engine
14941497 ;;Are we being asked to process a subset of the fields in a structure?
14951498
14961499 if (!errStatus && (!String.IsNullOrWhiteSpace(context.CurrentTask.Subset)))
1497- context.CurrentTask.DevDebugLog("Subset processing was enabled for subset " + context.CurrentTask.Subset)
1500+ context.CurrentTask.DevDebugLog("Subset processing was enabled for subset " + context.CurrentTask.Subset)
14981501
14991502 ;;-------------------------------------------------------------------------
15001503 ;;Are we being asked to create a subset from a list of field names?
@@ -1539,7 +1542,7 @@ namespace CodeGen.Engine
15391542 ;;Now parse the script file
15401543 if (!String.IsNullOrWhiteSpace(context.CurrentTask.WindowScript)) then
15411544 begin
1542- context.CurrentTask.DevDebugLog("Parsing window script " + context.CurrentTask.WindowScript)
1545+ context.CurrentTask.DevDebugLog("Parsing window script " + context.CurrentTask.WindowScript)
15431546 errStatus = (boolean)ParseWindowScript(context)
15441547 end
15451548 else if (!String.IsNullOrWhiteSpace(context.CurrentTask.ProformaFile))
@@ -1552,7 +1555,7 @@ namespace CodeGen.Engine
15521555 errStatus = true
15531556 else
15541557 begin
1555- context.CurrentTask.DevDebugLog("Parsing ProForma file " + context.CurrentTask.ProFormaFile)
1558+ context.CurrentTask.DevDebugLog("Parsing ProForma file " + context.CurrentTask.ProFormaFile)
15561559
15571560 if (address = %xaddr("ParseProForma",,1)) then
15581561 begin
@@ -1629,7 +1632,7 @@ namespace CodeGen.Engine
16291632
16301633 if ((!errStatus) && (context.DebugLoggingEnabled) && (context.Structures.Count>0))
16311634 begin
1632- context.CurrentTask.Log("Structure(s):",true,false)
1635+ context.CurrentTask.Log("Structure(s):",true,false)
16331636 data str, @RpsStructure
16341637 foreach str in context.Structures
16351638 context.CurrentTask.Log(" - " + str.Name)
@@ -1823,7 +1826,7 @@ namespace CodeGen.Engine
18231826 end
18241827 else if (context.DebugLoggingEnabled)
18251828 begin
1826- context.CurrentTask.Log("Custom field filters in use", true, false)
1829+ context.CurrentTask.Log("Custom field filters in use", true, false)
18271830 if (context.CurrentTask.IncludeOverlayFields)
18281831 context.CurrentTask.Log(" - Overlays will be included")
18291832 if (context.CurrentTask.IgnoreExcludeLanguage)
@@ -1852,7 +1855,7 @@ namespace CodeGen.Engine
18521855 end
18531856 else if (context.DebugLoggingEnabled)
18541857 begin
1855- context.CurrentTask.Log("Custom group processing rules are in use", true, false)
1858+ context.CurrentTask.Log("Custom group processing rules are in use", true, false)
18561859 if (context.CurrentTask.ExplicitGroupNoExpand)
18571860 context.CurrentTask.Log(" - Explicit groups will not be expanded to individual fields")
18581861 if (context.CurrentTask.GroupFieldNoGroupPrefix) ;;Do not prefix group fields with group name
@@ -1908,7 +1911,7 @@ namespace CodeGen.Engine
19081911 begin
19091912 data token, @UserToken
19101913 foreach token in context.CurrentTask.UserTokens
1911- context.UserTokens.Add(token)
1914+ context.UserTokens.Add(token)
19121915 end
19131916 else
19141917 UserTokenCollection.AddTokens(context.CurrentTask.UserTokens,context.CurrentTask,context)
@@ -2060,7 +2063,7 @@ namespace CodeGen.Engine
20602063 if (context.MultiStructureMode) then
20612064 begin
20622065 ;;Process the template once for all structures
2063-
2066+
20642067 ;;Check each structure, flatten arrays and groups, etc.
20652068 context.CurrentTask.DebugLog("")
20662069 data ix, int
@@ -2088,8 +2091,14 @@ namespace CodeGen.Engine
20882091 for ix from 0 thru context.Structures.Count-1
20892092 begin
20902093 ;;Check the structure, flatten arrays and groups, etc.
2091- if (!RepositoryTools.CheckStructure(context,context.Structures[ix])) then
2092- errStatus = true
2094+ data errContext ,ValidationContext
2095+ if (!RepositoryTools.CheckStructure(context,context.Structures[ix],errContext)) then
2096+ begin
2097+ if (structureWildcard && errContext == ValidationContext.Skipped) then
2098+ nop ;deliberatly skipping
2099+ else
2100+ errStatus = true
2101+ end
20932102 else
20942103 begin
20952104 ;;Set structure context
0 commit comments