Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / August 2005

Tip: Looking for answers? Try searching our database.

Empty Properties Window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gáspár Nagy - 21 Aug 2005 02:59 GMT
Hi,

We are developing a new project type for VisualStudio 2003 in c#.
The main part seems to be working, but there are some small, but annoying
thinks that are not working well. These problems are:
- The Build/ReBuild context menu command is not handled automatically.
- The project properties window cannot display cunfiguration-dependent
property pages.
- The information about the selected node in the project is not visible in
the "properties" window.

My hope is that all of these problems based on some stupid bug in our
implementation, so I have targetted now this last problem, with the
properties window. I have created a simplified version of the project by
cutting off all the irrelevant things (I can send you it over e-mail if it
makes sense.). Now the project uses the following comonents:
- an abstract base node class, implements IVsHierarchy and IVsUIHierarchy
- an abstract project node, that inherits from the base node and implements
IVsProject3
- a concrete project class inherits from the base project

The project factory creates an instance from the concrete project without
any child nodes. In the solution explorer I have only one node per project.

The sympthom is that if the project node is selected in the solution
explorer, the properties window does not display the project node
properties, although the project node has several displayable of these. It
keeps showing the proerties of the last selected node from another project
type (e.g. c#).
But sometimes when I add a new project of my project type to the solution,
it displays the properties correctly. But if I change the selecttion to the
c# project and back, than again does not work.

I have read in one of the previous posts, that there were problems in the
VS2003 with the objects returned for the VSHPROPID_BrowseObject, and I have
played a lot with the GetProperty results, but I didn't found the problem.
The funny thing is that the properties window in the Basic Project sample
works even if I comment out the borowseobject responses, than my project why
not? :(

Also might be interesting, that if I set in VS to stop for all exceptions, I
see a lot (6-8) of InvalidCast exceptions, with message
       "QueryInterface for interface
Microsoft.VisualStudio.Interop.IVsHierarchy failed."
coming from either from
"microsoft.visualstudio.dll!Microsoft.VisualStudio.PropertyBrowser.PropertyBrowser.VsSelectionEventSink.ctor"
or from the mystic "Unknown Module". These exceptions are handled inside VS,
but maybe still related to my problem.

Do you have any idea what the problem could be?

Sorry for the long post.

Br,
Gaspar
Paul Skelton - 21 Aug 2005 05:36 GMT
Take a look at these objects.  You need to call OnSelectionChange, passing
it a SelectionContainer.

ITrackSelection.OnSelectChange

Microsoft.VisualStudio.Shell.SelectionContainer

> Hi,
>
[quoted text clipped - 52 lines]
> Br,
> Gaspar
Gáspár Nagy - 21 Aug 2005 11:54 GMT
Hi,

Thanks for the reply. Yes, I also saw these, but as far as I understood from
the samples and the doc, you need to call OnSelectionChange if you want to
provide info in the property window about a special sub-part of your actual
item (like about the current xml node in the xml file editor). Therefore
also in the samples, only the editor extensions using this, but the project
samples (like mine) not.
I also don't really see, when I should have trigger the OnSelectionChange?
There can be several ways to select a project node in the solution explorer
(mouse, keybord, etc.).

Br,
Gaspar

> Take a look at these objects.  You need to call OnSelectionChange, passing
> it a SelectionContainer.
[quoted text clipped - 59 lines]
>> Br,
>> Gaspar

Free Magazines

Get 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 ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.