'Short problem description:
We are in need of a Visual Studio Add-in that is able to create a context- menu by right-clicking on specific elements of an XML document loaded in a Project/Solution.
This context menu must use information from the right-clicked xml node, to do several actions, one of those being to able to open the referenced xml document within the node, in visual Studio (starting form version 2012 but that can also be used in later versions).
We use XML documents for the configuration of a web-application. All the XML documents reside in a Visual Studio project within a Solution.
Normally a XML document represents one single configuration, but now we are moving towards a fragmented reuse of elements within XML documents to be able to reuse pieces of already made configurations.
We are now able to define a piece of XML, that resides on a separate file that can be addressed by an other XML file. This resulting in a parent configuration XML file that can have several references to these child XML files, which are read and embedded in real-time into a bigger XML file when the parent XML file is parsed. These child XML files can be nested indefinitely , meaning, a small child XML file can refer to an other child XML file and so on.
This nesting of child XML files, causes our developers to have trouble reading the parent XML file because they need to find, and open manually these referenced child XML documents by hand.
We think that an Add-in can solve this problem.
'''What we need:'''
A visual studio add-in that is able to create a context-menu with several commands, when the user right-clicks a certain XML node with a reference to a child XML document.
The commands of this context menu can be added to the already existing context-menu that exist in Visual Studio when you right-click in the text of an XML document.
We need several functions to be called from this context menu:
1. Go to the referenced XML document:
- When called the add-in should be able to parse the path attribute that is within the right-clicked xml node and to open this document in a new tab within visual studio.
2. Generate XML file:
- When called within an XML document( no matter where) the add-in should be able to create a temporary XML file that contains the file it self as being the parent, but also replace all the references to child XML files with the actual referenced XML content and also if existing, all its nested references (thus creating a temporary file that has all the referred children embedded in to it).
3. Find all documents referring to this child
- When called a search within the entire project should be executed that finds/lists all documents that also have a reference to this XML child.
The function can call and use the regular find functionality in Visual Studio.
4. We already have a addin, some menuitems need to be added in this addin.
If this project is done, most likely we need some more options to the addin in a later phase.