Flandiddly
Flandiddly

Reputation: 71

Visual Studio 2012 Extensions Dilemma

I am trying to create a Visual Studio 2012 extension that provides custom editing of XML files with a defined schema, supports files with a defined extension and makes use of the VS properties pane - all in a very similar way to the built-in Visual Studio WebTest/LoadTest treeview editors.

I have downloaded the VS2012 SDK and have experimented with the various project types. I figure that I am wanting a "Visual Studio Package" of some sort - most likely a "Tool Window" or "Custom Editor".

The Tool Window template results in a simple WPF control that I can get to display a treeview, but doesn't quite feel like the right option bacause I'm really wanting a dockable document window that supports file editing via a treeview.

The Custom Editor template results in an elaborate RTF editor supporting a range of UI text editing functions and interactions that I don't need, and appears to be Windows Forms based. What type of extension did Microsoft use for the WebTest treeview editor?

Can anyone advise if I'm on the right track with the VSPackage approach and point me in the right direction?

Upvotes: 2

Views: 540

Answers (1)

Flandiddly
Flandiddly

Reputation: 71

Ok, after battling this for several days I think I can answer my own question.

Tool Windows are typically single instances within the Visual Studio IDE and are not generally used for editing documents whereas Document Windows typically support multiple instances (MDI child windows), are used to edit and persist documents, can interact with the properties grid, detect changes to the document outside the IDE, and play nicely with the built-in IDE File/New; Save; Save As menus and toolbars.

I found a good description at http://msdn.microsoft.com/en-us/library/bb330853.aspx which includes this statement:

"Tool windows are not used for editing documents, neither as text editors nor as a drag-and-drop designers. Rather, document editing is handled by document windows, which appear in the tabbed central area of Visual Studio."

So, although I am wanting to use a TreeView user interface, I am essentially creating a custom document editor and therefore require a Document Window. Although the Visual Studio Document Window template provides an RTF editor implementation, I can replace most of this with my TreeView implementation.

Upvotes: 3

Related Questions