Description
When I register a new language via @GrammarRegistration(mimeType = HttpEditorKit.HTTP_MIME_TYPE, grammar = "http.tmLanguage.json") those files are missing the MultiView support. It was originally disabled in this file: https://github.com/apache/netbeans/blob/master/ide/lsp.client/src/org/netbeans/modules/lsp/client/options/GenericDataObject.java#L60. Just enable is not enough because the MultiViewElement.Registration is missing, which is handled via Annotation as you can see here:
|
@NbBundle.Messages("Source=&Source") |
|
@MultiViewElement.Registration( |
|
displayName = "#Source", |
|
iconBase = "org/netbeans/modules/docker/editor/resources/docker_file.png", |
|
persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED, |
|
mimeType = DockerfileResolver.MIME_TYPE, |
|
preferredID = "dockerfile.source", |
|
position = 100 |
|
) |
The problem here is, that the MimeType needs to be a static string, but the mimeType of the genericDataObject is dynamic. It looks like x-ext-a, x-ext-b or if you change them inside of a concrete json file, which I mentioned here: https://github.com/Chris2011/netbeans-textmate-files/blob/master/README.md they are still added in a dynamic way.
So atm I dunno how to call the annotation code to add multiview to those generic files, but I tried.
Use case/motivation
Each textmate based file should have minimum the source and the history view.
Related issues
No response
Are you willing to submit a pull request?
No
Code of Conduct
Yes
Description
When I register a new language via
@GrammarRegistration(mimeType = HttpEditorKit.HTTP_MIME_TYPE, grammar = "http.tmLanguage.json")those files are missing the MultiView support. It was originally disabled in this file: https://github.com/apache/netbeans/blob/master/ide/lsp.client/src/org/netbeans/modules/lsp/client/options/GenericDataObject.java#L60. Just enable is not enough because the MultiViewElement.Registration is missing, which is handled via Annotation as you can see here:netbeans/ide/docker.editor/src/org/netbeans/modules/docker/editor/DockerfileLanguage.java
Lines 68 to 76 in a8f7024
The problem here is, that the MimeType needs to be a static string, but the mimeType of the genericDataObject is dynamic. It looks like x-ext-a, x-ext-b or if you change them inside of a concrete json file, which I mentioned here: https://github.com/Chris2011/netbeans-textmate-files/blob/master/README.md they are still added in a dynamic way.
So atm I dunno how to call the annotation code to add multiview to those generic files, but I tried.
Use case/motivation
Each textmate based file should have minimum the source and the history view.
Related issues
No response
Are you willing to submit a pull request?
No
Code of Conduct
Yes