.NET Forum / Visual Studio.NET / Extensibility / March 2005
Alternate View of a Project Hierarchy
|
|
Thread rating:  |
Notre Poubelle - 17 Mar 2005 01:23 GMT Hi,
I am implementing my own Visual Studio project system using VSIP (actually, mostly using MPF in Visual Studio 2005, but if anyone can answer this question using anything VSIP related, that would be appreciated). I have created a basic hierarchy. Now I'd like to know: is it possible to create an alternate, custom view of the hierarchy? I'm thinking of something along the lines of what ClassView does; rather than having a file based view, I might want to organize things based on the concepts these files represent.
If it is possible to create an alternative view of the hierarchy, could this alternate view be updatable? In the example of ClassView, a user may choose to add a new variable or function to a class within the ClassView. Again assuming this is possible, could this alternate view of the hierarchy appear as another tab in the solution explorer? Finally, could I suppress (hide) or customize a predefined tab in the solution explorer, like ClassView (as its not particularly relevant to my project system)? If anyone can point me to some documentation or answer these questions, that would be much appreciated.
Thank you!
Gary Chang[MSFT] - 17 Mar 2005 09:29 GMT Hi Notre,
Currently I am performing some research on this issue. We will reply here with more information as soon as possible. If you have any more concerns on it, please feel free to post here.
Thanks for your understanding!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ¡§C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Gary Chang[MSFT] - 18 Mar 2005 10:13 GMT Hi Notre,
Here is some opinions from our VSIP specialist:
The classview is a separate toolwindow that just happens to be docked in the same frame as the solution explorer toolwindow,but the classview isn't a uihierarchywindow like the solution explorer. You may want to consider simply building a new uihierarchywindow to provide the alternate view of your hierarchy. However it appears using the MPF for this alternate hierarchy may not work, as it would be tough to adapt the MPF hierarchy support for use in a simple explorer type toolwindow. The MPF heirarchy support seems somewhat specific to implementing project hierarchies for the Solution Explorer.
By the way, one thing you may have interests would be the concept of the AltHierarchy, via the VSHPROPID_AltHierarchy and VSHPROPID_AltItemid properties. Theoretically, the items in an alternate hierarchy could use these properties to defer various operations back to the original hierarchy and hierarchy items.
With this helps!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ¡§C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Notre Poubelle - 18 Mar 2005 18:37 GMT Thank you Gary for your research. I'm grateful for the help you're giving.
I may wish to investigate creating my own uihiearchywindow. How would I get started in doing this? Can I place this uihierarchy in another tab of the window frame where Solution Explorer/Class View is hosted? Please feel free to point me to any documentation you know of; I have access to everything on the web (of course) plus the VSIP 2005 Beta documentation.
I can appreciate that the MPF wouldn't support creating an alternate view. But if I use the MPF, which I plan to do, to implement the basics of my project system including the primary hierarchy, does that make it incompatible with having an alternate hierarchy view? That is, can I leverage the MPF's project system support to do my primary hierarchy and then use interop assemblies to provide alternate views of the hierarchy?
I'm very interested in the concept of an alternate hierarchy, as I believe this may be what I'm trying to achieve. I've looked up the documentation on VSHPROPID_AltHierarchy and VSHPROPID_AltItemid in the VSIP 2005 SDK and there's not much of anything there. It says this:
VSHPROPID_AltHierarchy UNK. [optional] Returns an IVsHierarchy for SVsTrackSelectionEx. VSHPROPID_AltItemid I4. [optional] Returns an itemid for SVsTrackSelectionEx.
SVsTrackSelectionEx says (from VSIP docs):
The SVsTrackSelectionEx service allows VSPackages and the environment to communicate about all parts of the selection context, a collection of values that the environment maintains for every window. The selection context includes:
-An IVsHierarchy pointer for access to the current hierarchy -An item identifier (VSITEMID) indicating the current item -An ISelectionContainer pointer for access to property data -An array of element values
I'm failing to make the connection between this and an alternate view of the hierarchy. Maybe my view of an alternate hierarchy doesn't match the reality of what an alternate hierarchy means in VS. What does an alternate hierarchy mean? Does it mean a visible representation of a hierarchy in VS UI (in the solution explorer parent window or elsewhere)? Or does it mean something entirely different? Again, I'd be more than happy with any documentation you can point me to on the subject.
Thanks again!
Gary Chang[MSFT] - 19 Mar 2005 08:34 GMT Hi Notre,
>I'm failing to make the connection between this and an alternate view of the >hierarchy. Maybe my view of an alternate hierarchy doesn't match the reality [quoted text clipped - 3 lines] >entirely different? Again, I'd be more than happy with any documentation you >can point me to on the subject. AFAIK, an alternate hierarchy is a custom hierarchy of your solution/project system, and also you need a UIHierarchyWindow to display and interact with the user, is it what you mean?
For the issue about the doc on implementing such a custom hierarchy, I will cantact our VSIP specialist for it.
Thanks for your understanding!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ¡§C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Notre Poubelle - 21 Mar 2005 18:35 GMT Hi Gary,
I would expect that an alternate hierarchy is a separate hierarchy (i.e. different organization of item nodes) from the primary project based hierarchy and that it has a visilbe component that the end user can interact with. I see by your response that I would need a UIHierarchyWindow to display and intercact with the user; presumably I, as the project system implementer, must tie this visible representation of the hierarchy with the alternate hierarchy internal data structure. Is there a limit of one alternate hierarchy per project system? Or could I define an unlimited number of alternate hierarchies?
Thank you for looking into documentation on this and your responses to my questions!
Gary Chang[MSFT] - 22 Mar 2005 06:44 GMT Hi Notre,
Regarding the issue about the documentaion and samples, currenty we just have the existing public VSIP documentation, and there should be enough info there, but I am afraid we don't have any related sample handy for you.
Today we have a C++ helper library (Hier7Util) that does most of the work. With VSIP 8.0 and the managed package framework, I think it should be able to readily build a custom hierarchy with C# a lot faster.
Thanks for your understanding!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ¡§C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Notre Poubelle - 22 Mar 2005 17:49 GMT Hi Gary,
(This may be a repost, as I got an error message for the last post).
I would be happy to review the VSIP documentation but would appreciate it if you could point me to some specific areas within the documentation that deals with alternate hierarchies. The only mention I could find (and maybe I don't know where to look) was with VSHPROPID_AltHierarchy and VSHPROPID_AltItemid amd there wasn't much information there (see earlier post).
I know that VSIP provides the C++ HierUtil7 helper library. Does this library implement an alternate hierarchy? I will look myself, but would appreciate some guideance as this is a very large set of classes. I would hope that VSIP 8.0 and MPF would provide some support for a custom hierarchy, but I haven't seen it yet.
Notre Poubelle - 22 Mar 2005 22:09 GMT I searched the VSIP sample projects and the HierUtil7 code and for both the VSHPROPID_AltHierarchy and VSHPROPID_AltItemid properties; the implementation is always to return DISP_E_MEMBERNOTFOUND.
Please point me to any topics within the VSIP documentation that refers to creating an alternate hierarchy.
Gary Chang[MSFT] - 23 Mar 2005 07:48 GMT Hi Notre,
>Please point me to any topics within the VSIP documentation >that refers to creating an alternate hierarchy. I am afraid currently our VSIP SDK doesn't have more information on this topic, but we will make a lot of improvement in its next version (for Whidbey Beta2's VSIP SDK) .
By the way, our VSIP specialist suggests if items in the custom/alternate hierarchy directly map to items in your custom project, then using that AtlHierarchyItem property would be a good way of defering actions on the custom/alternate item.
Good Luck!
Best regards,
Gary Chang Microsoft Community Support -------------------- Get Secure! ¡§C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp &SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|