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 / September 2005

Tip: Looking for answers? Try searching our database.

How to get notified when configuration's properties change?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dmitry Shaporenkov - 27 Sep 2005 14:26 GMT
Hi,

I'm wondering if there is any way to receive a notification when the user
changes
a property of a project configuration (e.g. she changes the set of conditional
compilation
constants in C# projects). I've explored related VSIP interfaces thoroughly,
but didn't
find anything. Any ideas will be appreciated.

Thanks in advance.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Gary Chang[MSFT]" - 28 Sep 2005 10:27 GMT
Hi Dmitry,

Currently, we are looking into this problem. We will update you as soon as
we get anything out.

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.
"Ed Dore [MSFT]" - 29 Sep 2005 18:31 GMT
Hi Dmitry,

I just realized that the properties like the "conditional compilation
contants" are actually configuration specific. So they are actually
contained in a different collection of the Configuration object. You're
right though, I couldn't find a way to detect a change notification here
either. I'll dig through the implementation in a bit and see if we're even
raising  a property change notification, and get back to you on this
shortly.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.
"Ed Dore [MSFT]" - 30 Sep 2005 01:16 GMT
Hi Dmitry,

When the contents of the edit control for that "Conditional compilation
constants" property changes, we end up setting an internal state flag that
ultimately is used to determine if the underlying property needs to be
updated or changed.  There is no event processing or change notifications
getting fired on either this flag, or when the property itself gets
modified. Ultimately, all this cumulates in a call to
COleDispatchDriver::PutProperty in ATLCOM.H, and that doesn't  fire any
kind sort of event like an IPropertyNotifySink or anything. So I think
we're out of luck there.

One alternative though, that might potentially work would be to listen for
RDT events by implementing IVsRunningDocTableEvents3. You could check the
property for changes when the OnAfterAttributeChange or
OnAfterAttributeChangeEx event is called with
VSRDTATTRIB.RDTA_DocDataIsDirty flag on a particular proj file. When you
change the project properties, the proj file is flagged as being dirty, so
you might be able to use this event to determine when the proj file
settings are modified, and then manually check the property for changes.  I
haven't tested this, but I'm guessing that this might actually be a valid
option in this scenario.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties and confers no rights.
Dmitry Shaporenkov - 30 Sep 2005 12:04 GMT
Hello Ed,

thank you a lot for your help! I've checked, and OnAfterAttributeChange really
seems to be
a viable approach. Bet on I would not find it myself :)

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

> Hi Dmitry,
>
[quoted text clipped - 22 lines]
> Ed Dore [MSFT]
> This post is 'AS IS' with no warranties and confers no rights.

Rate this thread:







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.