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

Contribution of actions that work on Yang files #61

Closed
andreasjakobik opened this issue Aug 8, 2017 · 6 comments
Closed

Contribution of actions that work on Yang files #61

andreasjakobik opened this issue Aug 8, 2017 · 6 comments

Comments

@andreasjakobik
Copy link

andreasjakobik commented Aug 8, 2017

We dearly need a way to contribute actions in the Yangster GUI provided by Theia, so that we can hook in our own transformations that work on Yang files. There are already a few existing transformations that the user of the Ericsson extended Yangster must have available by (for example) right-clicking on the Yang file(s):

  • A pre-processor that generates a target specific version of the Yang file
  • A generator for database schema for the configuration store back end

The generated result may be any format (yang, xml, ...) and is expected to show up in the Files view.

@svenefftinge
Copy link
Member

Are those conversions written in Java?
Should it be a part of the yang-lsp, i.e. do those actions need parsed YANG AST as input?

@andreasjakobik
Copy link
Author

Yes they are, by means of Xtend.
The current versions of these converters use the the EMF modeling API that is generated from our legacy Yang Xtext grammar. So we hope that without too much work to be able to adapt the converters to the new grammar and environment.

@andreasjakobik
Copy link
Author

In reference to #62, yes calls to an external Yang validator may also be explicitly called by an action initiated by the user. This action would need to assemble an archive zip file with the current Yang file and all its dependencies, then issue a HTTP POST request conforming to the validator's REST API, wait for an answer which consists of validation records in JSON format, and finally convert to issues to be shown in the editor.

@andreasjakobik
Copy link
Author

Should this not be a generic Theia feature, just like contributing your own pop-up menu actions in classic eclipse?

@andreasjakobik
Copy link
Author

It would very useful if the action contributions can be deployed in the same manner as the (internal) validation extensions that is currently supported by yang-lsp (https://github.com/yang-tools/yang-lsp/blob/master/docs/Extensions.md).

@svenefftinge
Copy link
Member

The general means to create commands and register them with keybindings and context menus is there already. In this case I would like to make it general feature of a yang-lsp extension to contribute a command, that then shows up in the client's editor context menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants