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

MultiView support for textmate registered files are missing #5204

Open
Chris2011 opened this issue Jan 4, 2023 · 0 comments · May be fixed by #8080
Open

MultiView support for textmate registered files are missing #5204

Chris2011 opened this issue Jan 4, 2023 · 0 comments · May be fixed by #8080
Assignees
Labels
kind:feature A feature request

Comments

@Chris2011
Copy link
Contributor

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

@Chris2011 Chris2011 added kind:feature A feature request needs:triage Requires attention from one of the committers labels Jan 4, 2023
matthiasblaesing added a commit to matthiasblaesing/netbeans that referenced this issue Dec 20, 2024
@matthiasblaesing matthiasblaesing removed the needs:triage Requires attention from one of the committers label Dec 20, 2024
@matthiasblaesing matthiasblaesing self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature A feature request
Projects
None yet
2 participants