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

[plug-in] Ability to get current selection in the explorer view #4043

Closed
RomanNikitenko opened this issue Jan 14, 2019 · 6 comments
Closed
Assignees
Labels
plug-in system issues related to the plug-in system

Comments

@RomanNikitenko
Copy link
Contributor

The use case where I want to use it for Task plugin is resolving the variables for Che tasks.
For example, we have command mvn clean install -f ${current.project.path} and we need to resolve it before running. So we need to replace current.project.path to execute the task for current project.

@tsmaeder
Copy link
Contributor

tsmaeder commented Feb 6, 2019

@RomanNikitenko is this about implementing some vscode API call?

@vzhukovs vzhukovs self-assigned this Feb 13, 2019
@RomanNikitenko
Copy link
Contributor Author

@tsmaeder I'm sorry - I missed your message.
As far as I know vscode doesn't contain corresponding API.
So we need to find some way to get current selection in the explorer view on plugin side.

@vzhukovs
Copy link
Contributor

As I understand, we need macros mechanism in general and macro for current project path is particular type of macro as an example.

@RomanNikitenko
Copy link
Contributor Author

@vzhukovskii we have ability to register variable from plugin side. But I don't know the way how to get current selection in the explorer view on plugin side. We could resolve the variables for Che tasks replacing current.project.path by path of current selection

@vzhukovs
Copy link
Contributor

For resolving actual variable ${current.project.path} we need to implement interface variable.ts#L24 on the plugin side and add additional method to obtain current selected paths (in theia.d.ts) which can be retrieved from selection-service.ts#L27

@RomanNikitenko
Copy link
Contributor Author

RomanNikitenko commented Feb 21, 2019

@vzhukovskii we don't have problem with registration variable, so we don't need to implement interface variable.ts#L24, we can just register variable.
The problem is - we can not obtain current selected path on plugin side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

No branches or pull requests

3 participants