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.
Summary: | org.netbeans.core.ui.notifications.FlashingIcon has hardcoded dependency on NotificationDisplayerImpl, crashes with custom NotificationDisplayer | ||
---|---|---|---|
Product: | platform | Reporter: | emi <emi> |
Component: | Window System | Assignee: | Stanislav Aubrecht <saubrecht> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nicklas.lof |
Priority: | P3 | ||
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Patch to avoid the ClassCastException |
Description
emi
2010-11-18 07:47:52 UTC
Created attachment 103060 [details]
Patch to avoid the ClassCastException
Marking this a P2 since I've also posted a patch that should fix the removeNotify() problem because there is an explicit check for null in there. core-main c200773b4366 thanks for the patch Integrated into 'main-golden', will be available in build *201011300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c200773b4366 User: S. Aubrecht <saubrecht@netbeans.org> Log: #192089 - CCE I don't see how this fixes the problem. I want my own NotificationDisplayer to replace the NotificationDisplayerImpl provided by NetBeans. Currently that's not possible. Lookup.getDefault should be used to find the registered NotificationDisplayer. You are correct, my patch doesn't fix the whole design, just the CCE. It was enough to get NBnotify running and it should work in your case too. One problem you have to think about is what happens if you have the default NotificationDisplayer and you install the module with yours -- that's then the CCE happened. If you get into redesigning the default NotificationDisplayer and the NotificationDisplayer API, please let me know as I think there are multiple things wrong with the current API and usage style that make it quite hard to bridge towards other notification systems. (In reply to comment #5) > I don't see how this fixes the problem. I want my own NotificationDisplayer to > replace the NotificationDisplayerImpl provided by NetBeans. Currently that's > not possible. Lookup.getDefault should be used to find the registered > NotificationDisplayer. you can provide your own NotificationDisplayer but then you have to write your own UI for it as well. there's no API contract allowing you to reuse notification UI impl classes |