Skip to content

Allow source file selection in task drop-down #110

Closed
@neils-s

Description

@neils-s

My understanding is that currently the source XML and XSLT files that are fed to Saxon are specified in the tasks.json file in the .vscode subfolder of the project. I'm prone to typos, so manually specifying the file is a challenge.

I've used the Tasks Shell Input extension (https://github.com/augustocdias/vscode-shell-command) to augment my tasks.json file so I can select the relevant files from a dropdown list in the command palette:
{ "version": "2.0.0", "tasks": [ { "type": "xslt", "label": "xslt: Saxon Transform (New)", "saxonJar": "${config:XSLT.tasks.saxonJar}", "xsltFile": "${input:xsltFile}", "xmlSource": "${input:xmlFile}", "resultPath": "${workspaceFolder}/xslt-out/result1.xml", "allowSyntaxExtensions40": "off", "group": { "kind": "build" }, "problemMatcher": [ "$saxon-xslt" ] } ], "inputs":[ { "id":"xmlFile", "type":"command", "command":"shellCommand.execute", "args":{ "command":"dir /b \"${workspaceFolder}\\*.xml\"" } }, { "id":"xsltFile", "type":"command", "command":"shellCommand.execute", "args":{ "command":"dir /b \"${workspaceFolder}\\*.xsl?\"" } } ] }

This is a windows-specific hack. It uses the dir command, it relies on another extension, and it doesn't have any drill-down to get to XML and XSLT files in workspace subfolders. Even still, it's a labor-saver for me.

It would be cool if you could augment your extension with easy file selection capabilities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions