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 185897 - Icon not refreshed after changing exported/private packages in a Maven project
Summary: Icon not refreshed after changing exported/private packages in a Maven project
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven OSGi bundles (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 218640 (view as bug list)
Depends on: 200833
Blocks:
  Show dependency tree
 
Reported: 2010-05-11 12:21 UTC by David Simonek
Modified: 2016-07-07 08:39 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
partially working patch (9.72 KB, patch)
2012-11-08 10:41 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Simonek 2010-05-11 12:21:04 UTC
Steps to reproduce:
- create Maven OSGi bundle, add some class in package
- project properties -> Exported packages, OK all private
- props again, check directory as exported

result: icon changes correctly, but tool tip doesn't (still says private package)
Comment 1 Vince Kraemer 2011-08-18 14:50:00 UTC
with a recent pull... this behavior has changed.

The tooltip is correct.  The icon is incorrect.
Comment 2 Jesse Glick 2011-08-18 17:07:10 UTC
See bug #200833 comment #2.
Comment 3 Milos Kleint 2012-09-20 13:18:18 UTC
*** Bug 218640 has been marked as a duplicate of this bug. ***
Comment 4 Milos Kleint 2012-11-02 08:52:59 UTC
Implementation-wise my first guess was that we need the AccessibilityQuery to fire a Change event, extend AccessibilityQueryImplementation with a sub-interface to do the same.

The problem arises with ProjectAccessibilityQueryImpl which is a FileOwnerQuery based dispatcher to project lookup. This beast would have to listen to all projects ever touched (or at least those that ever returned non-null Boolean value for a FileObject belonging to them). But would have to listen on all project's lookup just in case the AQI2 might show up in the lookup.

Then on client side a plain ChangeEvent fired would result in all listeners having to check again for the current value. A slightly hacky optimization would be to pass a Project as part of the ChangeEvent subclass in some cases, with the client knowing the implementation detail of ProjectAQI and comparing it's own FileOwner Query result against the project being fired.

If we could assume that changes are not really fired often and we accept the performance penalty of recalculating everything, then this could work. Not sure though if it makes a good API though.
Comment 5 Milos Kleint 2012-11-08 10:41:27 UTC
Created attachment 127381 [details]
partially working patch
Comment 6 Milos Kleint 2012-11-08 10:46:07 UTC
the partially working patch attached to the issue is an attempt to brute force my way through and find the relevant nodes in project view and fire icon change events on them.. does not entirely work, initially it appears to work but later deteriorates, most likely some other node events are coming in in the beginning
Comment 7 Martin Balin 2016-07-07 08:39:00 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss