This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 27191 - Implement javax.naming.EventContext for TreeNodeContext
Summary: Implement javax.naming.EventContext for TreeNodeContext
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-11 00:30 UTC by Torbjorn Norbye
Modified: 2003-12-11 14:14 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2002-09-11 00:30:00 UTC
I asked Vita this:
(1) When some module (e.g. the JavaModule) looks
up a setting,
>     I've modified TreeNodeContext to look in
>     
/Settings/Configurations/....../Settings/Contexts
instead
>     of /Settings/Contexts as it used to.
>
>     Now lets say the user goes and selects a new
configuration
>     as the active configuration.
>
>     How do I "Refresh" the system such that for
example the
>     property sheet which may have a different
setting for the
>     compiler flags is shown ?
>
and his reply was:

Ach, you touched the hardest part. My plan is to
have the
TreeNodeContext implementing the
javax.naming.EventContext,
which is capable to fire changes in bindings
stored within it.
When user changes active configuration,
TreeNodeContext
should fire events for all bindings stored within
that context.
Then beans like ContextSettings would be able to
listen on
underlying EventContext and fire propertyChange events
according to EventContext's notifications.

If you would try to implement this, don't forget that:
- TNC for PO1 is using the TNCs from
ProjectObjects which PO1
depends on, that means that bringing PO1 in
up-to-date state means
to have all its dependencies up-to-date

- IMO firing events could be delayed, but calls to
lookup/bind should
by synchronous (or should wait on update task), at
least I expect
it would be useful to have some background task
which will update
whole hierarchy

- clients will very likely access settings values
from the notification,
the TNC should be up-to-date before any
notification is fired,
also it may cause some threading problems.
Comment 1 Torbjorn Norbye 2002-09-15 20:58:01 UTC
Implemented. There is one remaining issue with showing ContextSettings
in Looks; property changes on the context settings aren't getting
propagated.

For now until that is fixed you can work around it by
explicitly firing a property change  Node.PROP_PROPERTY_SETS
on the node substitute.