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 86093 - Palette API - global palette listener registration
Summary: Palette API - global palette listener registration
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Palette (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks: 90211
  Show dependency tree
 
Reported: 2006-09-28 21:57 UTC by Joelle Lam
Modified: 2008-12-22 17:39 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joelle Lam 2006-09-28 21:57:09 UTC
We need some way to access palette and know when an item has been selected.  The
Palette samples currently require you to go through each instances controller
and add a listener.  Because we have multiple instances of palette, this would
require a lot of unnessary dependencies.  Any given modules should be able to
register with the "global" palette and be notified upon item selection change. 
This is a necessary requirement for our context sensitive help.
Comment 1 Stanislav Aubrecht 2006-09-29 12:12:45 UTC
this is an RFE, not a bug and it's too late to add this to release55.

if you describe in more details your context sensitive help requirements i might
be able to suggest a work around or some other solution
Comment 2 Joelle Lam 2006-09-29 18:21:07 UTC
Our help module simply needs to know when a item in the palette has been
selected so that it can call getHelpCtx.  Right now, the help module has no idea
when to call getHelpCtx.  Quy, can you add any comments as necessary?
Comment 3 Quy Nguyen 2006-09-29 18:42:17 UTC
Our dynamic help system relies on notification of UI focus changes in order to
populate its display.  For most windows, it changes based on
TompComponent.Registry.PROP_ACTIVATED_NODES events when a user sequentially
selects items within a single IDE window, causing our help window to call the
selected component's getHelpCtx() method.  However, in the palette this scheme
does not work; we require a way to be notified when a user switches between
selections in the palette.
Comment 4 Stanislav Aubrecht 2006-10-02 10:19:38 UTC
so why don't you listen to opened topcomponents in the TopComponent.Registry and
attach/detach a single PaletteListener to all currently available
PaletteControllers?
Comment 5 Quy Nguyen 2006-11-28 18:27:57 UTC
The workaround appears to work for our purposes, so I am resolving the issue.