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 169615 - ImageViewer updateView method should have protected, not package, access
Summary: ImageViewer updateView method should have protected, not package, access
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Image (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Peska
URL:
Keywords:
: 169616 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-31 02:08 UTC by azeari
Modified: 2011-09-01 15:53 UTC (History)
0 users

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 azeari 2009-07-31 02:08:29 UTC
I am writing a NetBeans module that extends the image viewer to support additional file types (specifically, TIFF and 
other multi-page formats).

I have a TopComponent that inherits from the ImageViewer class and inserts additional UI components into the JToolBar. 
The component's ChangeListener needs to call ImageViewer.updateView(ImageDataObject obj) however this method has default 
(package) access.

My module resides in a different classloader, so even if I repackage MyTopComponent into org.netbeans.modules.image, I 
receive the following exception:

java.lang.IllegalAccessError: tried to access method 
org.netbeans.modules.image.ImageViewer.updateView(Lorg/netbeans/modules/image/ImageDataObject;)V from class 
org.netbeans.modules.image.MyTopComponent

Obviously, I can work around this problem using reflection. However, I think it would be a worthwhile improvement to the 
extensibility of the NetBeans platform if the Image plugin were redesigned to cater for developers who wish to override 
and extend its functionality.
Comment 1 azeari 2009-07-31 02:24:21 UTC
*** Issue 169616 has been marked as a duplicate of this issue. ***