Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task input parameters from showOpenDialog #71461

Open
bryceschober opened this issue Mar 29, 2019 · 15 comments
Open

Task input parameters from showOpenDialog #71461

bryceschober opened this issue Mar 29, 2019 · 15 comments
Assignees
Labels
api feature-request Request for new features or functionality tasks Task system issues
Milestone

Comments

@bryceschober
Copy link

bryceschober commented Mar 29, 2019

It sure would be helpful if the task and launch input pickers implemented by #4758 were expanded to include one that wrapped the window.showOpenDialog API with its options for file vs. folder and filtering.

The window.showOpenDialog API offers to extension authors the ability to offer the user a dialog to select a file (optionally with an extension filter) or a folder.

The feature available to users is to be able to define input variables for usage as task parameters. This user-facing feature only offers the ability to either select between preset strings (pickString) or accept a manually-typed input string (promptString), but offers no ability to present the user with a file or folder selection dialog.

This feature could be very helpful for users as well, not just extension authors. For example, I want to debug a program that supports command-line parameters for input files or directories, and I'd rather prompt the user to provide them differently for each session, than to have them hard-coded in a shared project tasks file.

@jrieken jrieken assigned alexr00 and unassigned jrieken Apr 1, 2019
@alexr00 alexr00 added feature-request Request for new features or functionality tasks Task system issues labels Apr 3, 2019
@alexr00 alexr00 added this to the Backlog milestone Apr 3, 2019
@SheepDomination
Copy link

@bryceschober Do you mean what was mentioned here.

@alexr00 You added the feature from issue #4758 in the documentation; although what do I search for in the documentation ?

@bryceschober
Copy link
Author

@SheepDomination In your question, you just linked to the same issue that I originally linked to, so I'm not sure what you're asking. Did you intend to link to a specific comment in that issue?

@SheepDomination
Copy link

@bryceschober I linked to the same issue because I wanted to know has this issue been implemented into visual studio code and if so; what is it called in the documentation, from my understanding it has been implemented ?

@bryceschober
Copy link
Author

@SheepDomination They are called input variables.

@SheepDomination
Copy link

SheepDomination commented Jun 25, 2019

@bryceschober Thanks. I assume this variable ${input:variableID} cannot be changed to a custom name ?

@bryceschober
Copy link
Author

@SheepDomination Sorry, but I really don't understand what you're asking. Can you provide more context?

For example, I want to debug a program that supports command-line parameters for input files or directories, and I'd rather prompt the user to provide them for a session, than to have them hard-coded in a shared project tasks file.

@bryceschober
Copy link
Author

@SheepDomination: I think you misunderstand. This issue is asking for a new feature that doesn't exist.

The window.showOpenDialog API offers to extension authors the ability to offer the user a dialog to select a file (optionally with an extension filter) or a folder.

The feature available to users is to be able to define input variables for usage as task parameters. This user-facing feature only offers the ability to either select between preset strings (pickString) or accept a manually-typed input string (promptString), but offers no ability to present the user with a file or folder selection dialog.

@bryceschober
Copy link
Author

@alexr00 I added more description to the initial comment, from ensuing conversations, in case there was any ambiguity about what feature I'm requesting.

@SheepDomination
Copy link

@bryceschober You answered the question which I was asking.

@alexr00
Copy link
Member

alexr00 commented Oct 8, 2019

If we add a command that pops the picker then returns the path then you could use command variables to get the path...
I'll think about whether we should add such a command.

@SheepDomination
Copy link

@alexr00 Please add such a feature; is there any work around ?
Sorry @bryceschober I now understand your question completely 👍

I suppose for now I'll have to have the user give the exact string name of the path, bit of pain cause it can lead to errors in the path, hopefully it gets added or there is a workaround.

@BrightSoul
Copy link

BrightSoul commented Jun 24, 2020

I also second this. The user hits F5 but before actually starting debug, I have to ask which JavaScript file he wants to execute.
I've resorted to pickString for now but it would be nice if the list was populated dynamically.
Maybe let me set a glob patten in the input variabile so I can decide precisely which files and/or directories will be shown in the picker.

@Metadorius
Copy link

Would be good if this feature has gotten more attention. I need to ask which dmp file the user would like to debug and to do this via launch configuration I direly need this implemented.

@rioj7
Copy link

rioj7 commented Dec 13, 2023

@BrightSoul You can create a file picker with the extension Command Variable I wrote and use the command extension.commandvariable.file.pickFile to show a file/directory picker that has a glob pattern to include and exclude files

@rioj7
Copy link

rioj7 commented Jan 10, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature-request Request for new features or functionality tasks Task system issues
Projects
None yet
Development

No branches or pull requests

8 participants