VS Code - Ant Target Runner sample configuration
The Ant Target Runner VS Code Extension can be used to extract class annotations whenever class files are built - similar to an Eclipse (PDSOE) ANT builder, see The Annotation based Type Descriptor
The following steps describe the configuration of the ANT Target Runner Extension.
inh
Configuration
Settings in .vscode-workspace file:
"ant.home": "C:\\Progress\\OpenEdge128_64\\ant",
"ant.buildFilenames": "annotations.xml,annotations2.xml",
"ant.executable": "ant -lib c:\\Progress\\OpenEdge128_64\\PCT\\pct.jar",
"ant.envVarsFile": "build.env",This sample build.auto file maps the file patterns
*BusinessEntity.cls
*Task.cls
*Service.cls
*Enum.cls
*Parameter.cls
I*.cls
In the Consultingwerk, Demo and Test packages to the ExtractClassAnnotationsVsCode target in the annotations.xml ANT script:
{
"autoTargets": [
{
"filePattern": "{Consultingwerk,Demo,Test}/**/*{BusinessEntity,Task,Service,Enum,Parameter}.cls",
"buildFile": "annotations.xml",
"runTargets": "ExtractClassAnnotationsVsCode",
"initialDelayMs": 1000
},
{
"filePattern": "{Consultingwerk,Demo,Test}/**/I*.cls",
"buildFile": "annotations.xml",
"runTargets": "ExtractClassAnnotationsVsCode",
"initialDelayMs": 1000
}
]
}
Excerpt from the annotations.xml file:
<target name="ExtractClassAnnotationsVsCode" depends="init">
<antcall target="generate-smartframework"/>
<antcall target="generate-smartcomponentsdemo"/>
<echo>autoTargetTriggerFilename ${autoTargetTriggerFilename}</echo>
<property name="absolute.path" location="${autoTargetTriggerFilename}"/>
<extractClassAnnotations directory="."
fileMask="*BusinessEntity.cls,*Task.cls,*Service.cls,I*.cls,*Enum.cls,*Parameter.cls"
overwriteWriteProtected="true"
excludeAnnotations="@Test,@TestIgnore,@BusinessEntityGenerator,@lowercase,@TempTableMetaInformation"
verbose="true"
buildFiles="${absolute.path}"
assemblies="${Full.Assembly.Directory}"
displayStatus="false"
logMessages="true">
<options>
<dbconnection dbName="SmartDB" dbDir="c:/Work/SmartComponents4NET/128_64/DB/SmartDB"/>
<dbconnection dbName="Sports2000" dbDir="c:/Work/SmartComponents4NET/128_64/DB/Sports2000"/>
</options>
</extractClassAnnotations>
</target>Full annotations.xml file:
File build/annotations.properties file
# Progress environment settings
# Only used for Class Annotation extraction
#
progress.DLC=C:/Progress/OpenEdge128_64
assemblies=./AssembliesInstallation in Windsurf
If the Ant Target Runner Extension is not available in extension marketplace of your VS Code derivate, you can download the extension .vsix Archive from https://open-vsx.org/extension/nickheap/vscode-ant and install the Extension using Install from VSIX tool in IDE’s like Windsurf.