As part of the goal of becoming a Rimworld IDE, one of the key feature is going to the ability to highlight problems with our XML. We're going to have to consider which items are worth highlighting as warnings, which are worth highlighting as errors and which are worth ignoring. One example is the fact that Rimworld Defs can do some custom XML passing, so even if we think some XML has been declared for something we can't match up to, that doesn't mean it's invalid.
Beacuse of some peculiarities of how Problem Analyzers work in Rider, they're disabled for XML. To get around this, we can create an implementation of an IDaemonStage and XmlDaemonStageProcessBase in which we can add our highlighting. A quick proof-of-concept is already working in the problem-analyzers branch.
To begin with, we want to only highlight errors when we know what the type of an XML Value should be, and the value is wrong. For starters, we should implement the following highlighters:
As part of the goal of becoming a Rimworld IDE, one of the key feature is going to the ability to highlight problems with our XML. We're going to have to consider which items are worth highlighting as warnings, which are worth highlighting as errors and which are worth ignoring. One example is the fact that Rimworld Defs can do some custom XML passing, so even if we think some XML has been declared for something we can't match up to, that doesn't mean it's invalid.
Beacuse of some peculiarities of how Problem Analyzers work in Rider, they're disabled for XML. To get around this, we can create an implementation of an
IDaemonStage
andXmlDaemonStageProcessBase
in which we can add our highlighting. A quick proof-of-concept is already working in theproblem-analyzers
branch.To begin with, we want to only highlight errors when we know what the type of an XML Value should be, and the value is wrong. For starters, we should implement the following highlighters:
Rot4
)