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

Consider synthesizing an XML Schema for a project's XSP files #139

Closed
jesse-gallagher opened this issue Dec 28, 2019 · 4 comments
Closed

Consider synthesizing an XML Schema for a project's XSP files #139

jesse-gallagher opened this issue Dec 28, 2019 · 4 comments
Labels
Milestone

Comments

@jesse-gallagher
Copy link
Member

@jesse-gallagher jesse-gallagher commented Dec 28, 2019

If, instead of providing a completion participant for XSP files, the LSP4XML plugin instead synthesized an XML schema based on known components and custom controls, that could allow for the full breadth of IDE help to come in without having to worry about the fiddly edge cases of code completion.

The big thing to investigate to see if this is viable would be how frequently the method to ask for a schema is called. If it's just once per workspace, that'd be useless, as it wouldn't allow for different XPages projects. If it's once per project or per file, that would be better, but best would be if it's called repeatedly, allowing the code to check for changes to Custom Controls.

@jesse-gallagher

This comment has been minimized.

Copy link
Member Author

@jesse-gallagher jesse-gallagher commented Dec 30, 2019

It's probably possible to do this in pieces: provide schemas for the http://www.ibm.com/xsp/core and http://www.ibm.com/xsp/coreex namespaces that will be unchanging in a workspace, and then figure out if the CCs can be handled similarly.

@jesse-gallagher

This comment has been minimized.

Copy link
Member Author

@jesse-gallagher jesse-gallagher commented Dec 30, 2019

To be really clever, the schema provider could provide distinct schemas based on any "minimum XPage release" setting provided.

@jesse-gallagher

This comment has been minimized.

Copy link
Member Author

@jesse-gallagher jesse-gallagher commented Jan 1, 2020

It seems like the "description" annotation node is treated differently by different IDEs. Eclipse acts like it's HTML, but VS Code treats it as plain text.

@jesse-gallagher

This comment has been minimized.

Copy link
Member Author

@jesse-gallagher jesse-gallagher commented Jan 2, 2020

Actually, that was partially PEBKAC: I was double-encoding the HTML. However, though both Eclipse and VS Code will translate the HTML to line breaks and basic formatting, Eclipse oddly no longer displays dls nicely when not double-encoded. That's a shame, but it's a good argument to switch to basic lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.