-
Notifications
You must be signed in to change notification settings - Fork 70
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
Eclipse 2020-09 (for Java) XML Editor shows new errors which were not there before. What to do? #557
Comments
I have a similar error. The Tool should look in the XML Catalog before even trying to directly download a schema file. |
I suspect it's a problem coming from https:/eclipse/lemminx/. @red-lichtie or @Master-01 could you share a little XML content which causes this problem please. Thanks! |
It looks like you have the legacy "Web Tools" XML editor installed. So I'm curious about how you configure your XML catalogs? I guess you have them configured for web tools but not for Wild Web Developer, which makes that Wild Web Developer doesn't resolve schema from catalog. |
I just installed the "Wild Web Developer" feature today, I didn't configure anything, I don't understand how or even why I would have to configure it to use a standard component. |
Also, it is opened in the maven POM editor. The XML error is not just in the editor but also visible in the package explorer view too. |
I understand that it's not clear. Let me try to explain you the problem. When you install WWD, it provides the TextMate support to colorize ts, js, xml etc with TextMate and language server for those languages. To see those TextMate in action, for xml file for instance open the file with Generic Editor instead of the WTP XML Editor. When you install WWD, it provides a language server for XML https:/eclipse/lemminx/ which validates XML files when the file is opened.
Indeed, LemMinx tried to download the maven schema but it failed.
I understand again it's not clear. Those catalog comes from WTP XML Catalog and the WWD doesn't use those XML catalogs (IMHO I think it should but I'm not sure it's an easy task since catalog comes from plugin) but it uses another XMLcatalogs preferences since WWD have none dependency to the WTP: This XML catalog is very basic compared to WTP and if you wish to fix the maven problem, you should add at hand the XSD maven coming from your local hard drive. |
For user point view I totally agree with you. But for technical point view, it will require that WWD will have a dependency to WTP, and it's not the goal of WWD. But perhaps the WWD LemMinx integration could try to check XML catalogs from WTP exists and in this case it register them to LemMinx XML Language Server. An another idea is to give the capability to disable XML validation from LemMinx when XML file is not opened with Generic editor, but I'm not sure it's a good idea since LemMinx maven improves the reporting error for maven. |
The technicalities are normally of no interest to users (as I am sure we all know from our own projects), in this case I consider myself in the role of the "non technical user" and look at this solely from the usability aspect and the user experience.
Possibly there should be a proposal to move "org.eclipse.jst.standard.schemas" to a common project (area/bundle) so that there is no direct dependency. Even a straight "copy" of the standard schemas could be considered to provide a better user experience (regardless of how technically reasonable/viable that may seem). |
@red-lichtie code contributions towards what you suggest are welcome as pull requests. |
I don't know the insides of eclipse, let alone LemMinx, TextMate and whatever other voodoo is involved :-) |
WTP provides an interface to add user defined catalog entries (e.g. XMLCorePlugin.getDefault().getDefaultXMLCatalog()) where we can add our xsd files so it is done automatically for the users of our plugins. Does Wild Web Developer provide an interface or extension point? I tried to use XMLPreferenceInitializer, but it "cannot be resolved" from my plugin. Any hint/help would be appreciated. |
No and I think it should provide it. IMHO I think it should be very nice to load XML catalog from the plugin https:/eclipse/webtools.sourceediting/tree/master/xml/bundles/org.eclipse.wst.standard.schemas
|
Please open a different discussion for this topic. |
With latest release of Wild Web Developer, the local XSD defined in m2e.core (to WTP catalog extension) should now be used and passed as argument to intialization options. |
Hellow!
See my image:
I installed new version Eclipse 2020-09 for Java and now the Xml Editor, when opening my old xml files, gives errors in the <name: subname> constructions, indicating that there is no schema for 'subname' (see attached picture). But I don't need such circuits. these files are generated by someone else's program and it is impossible to describe all variants of 'name: subname' and their possible parameters. This error makes it very difficult to view such files and find other real errors in them.
Previous versions of Eclipse 2020-03 and earlier did not have this bug, it only appeared in the latest version.
Moreover, this error is not detected during 'Validate', it is shown only if you open this file in an XML editor.
If file not opened "view Problems" does not show this error, but where file open - this error show from "view Problems"
"Generic text Editor" show this error also as "XML Editor"
Can you please tell me how to remove this error in the Eclipse XML editor? I have looked through every possible XML setting but nothing seems to help!
The text was updated successfully, but these errors were encountered: