-
This is a powerful tool, applying Intellisense to the XML schema used by MSBuild. The benefits of this application are not unique to MSBuild though - they would be equally appreciated on many XML schemas. I'd be interested to learn Mikayla's thoughts on broadening the scope of this from merely an MSBuild editor to a generic XML editor which can provide Intellisense for any schema where an appropriate JSON file is available. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The MSBuild Editor schema model doesn't provide a generalized way to describe XML elements and attributes. It's highly specific to MSBuild, and describes items, metadata, targets, and tasks. The extension has hard coded logic that describes where these kinds of MSBuild symbols belong in XML elements and attributes names and in MSBuild expressions. If you are looking to implement some kind of customized XML completion, check out https://github.com/mhutch/MonoDevelop.Xml. Both MonoDevelop.MSBuildEditor and the XSD-based XML editor in Visual Studio for Mac are built on top of MonoDevelop.Xml. MonoDevelop.Xml is an "abstract" XML language service that implements most everything an XML language service needs - completion triggering and committing, auto closing tags, indentation, various commands, etc - except it does not implement determining what values to provide in completion. This makes it very easy to write an XML language service that uses whatever logic you want to determine what elements/attributes to show in completion. This can be useful to write a language service for XML files where the elements and attributes cannot be adequately described by XSD, or could be used to write an XML language service where the schema is described in some other way. I'm happy to provide pointers to anyone who is interested in using MonoDevelop.Xml to write a custom XML language service! |
Beta Was this translation helpful? Give feedback.
-
Thanks for that Mikayla - much appreciated. :-) |
Beta Was this translation helpful? Give feedback.
The MSBuild Editor schema model doesn't provide a generalized way to describe XML elements and attributes. It's highly specific to MSBuild, and describes items, metadata, targets, and tasks. The extension has hard coded logic that describes where these kinds of MSBuild symbols belong in XML elements and attributes names and in MSBuild expressions.
If you are looking to implement some kind of customized XML completion, check out https://github.com/mhutch/MonoDevelop.Xml. Both MonoDevelop.MSBuildEditor and the XSD-based XML editor in Visual Studio for Mac are built on top of MonoDevelop.Xml.
MonoDevelop.Xml is an "abstract" XML language service that implements most everything an XML languag…