ReSharper can be more XML "aware"? How much the productivity would benefit?

I'm working in a company on a big project. There is an XML file for configuring the Menu which contains a list of similar entries 

<MenuEntry Name="Bit Viewer (P)"
IDFeature="6"
IDView="15"
Description="Bit  Viewer Prematch"
Command="OpenFixedBit ViewerTabCommand"
ImagePath="/Resources/Menu/Bit-viewer.png" />

Look to the IDFeature we don't have many clue on what it is..

The method which reads this Xml file populate an object which also doesn't give us any further clue
public class MenuEntry
{
public int IDFeature { get; set; }
public int IDView { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string CommandAsString { get; set; }
public string ImagePath { get; set; }
public List<MenuEntry> SubMenuEntries { get; set; }
}

But for an algoritm finding clues can be really easier. It could follow the MenuEntry class and realize that it arrives to a subscriber pattern

this.broker.Subscribe<PrepareViewMessage>(this, msg => PrepareViewModel(msg));

Or the alghoritm could look for the call lines which are in common (starting from who reads the menu.xml file and arriving to the instantiation of the view. There is just one path which connects this two pieces of code.)

Or it could simply realize that there is an enum "near" to this call line of code which is used like it follow

case ViewType.FixedBitViewerView:
{
var contentVM = new FixedBitViewerViewModel(broker);
tabToAdd = new WorkspaceViewModel<IWorkspaceCommand>(broker, contentVM, msg.Name, msg.Description, msg.IconPath, true);

break;
}


It's pretty hard to implement this kind of AI for the resharper team but it can be quite more easy to provide a Framework and a Plugin marketplace where is possible to sell plugins for the developers. 

0

Please sign in to leave a comment.