The idea for the quickfix is to provide a list of direct features because transitive relations offer too many.
As an enhancement, this quick fix could alternatively provide a list of some of the most commonly used features.
DiagnosticParticipant:
Adds additional check while parsing the server.xml to recognize config elements.
After the document is parsed, create relevant diagnostics for lost config elements.
Add a trigger line for grabbing the feature list even if a FeatureManager is empty or not found
New FeatureListGraph class:
Designed as a manager class for retrieving a desired FeatureListNode
On assumption that all features and config elements have a unique identifier, this class uses a hashmap to provide constant time lookup to a node.
To provide a list of transitive relations for features -> config element or vice versa, FeatureListGraph implements a breadth-first-search iterative strategy on a given node.
New FeatureListNode class:
A new class to represent a generic node in a Feature List XML. It's intended to store features or config elements.
isConfigElement operates on the heuristic that features provide major versions and that . isn't typical in a normal element name.
'Enables' refers to when this node automatically pulls in another feature or config element.
'Enablers' refers to features that would automatically pull in this node.
FeatureService:
The priority for using a generated local feature list is placed higher. This xml file not only provides the list of features but also the necessary metadata for recognizing config elements and their relations.
Build the FeatureListGraph while reading the feature list
Tests:
Add check that diagnostics appear on expected locations
Add check that the feature list xml gets digested within expectations
Addresses #67
CodeActionParticipant, AddFeature:
DiagnosticParticipant:
server.xml
to recognize config elements.New FeatureListGraph class:
New FeatureListNode class:
.
isn't typical in a normal element name.FeatureService:
Tests: