|
Re: Adding double-click listener to ExtendedMarkersView extender [message #900611 is a reply to message #900406] |
Tue, 07 August 2012 18:56 |
Alex Kravets Messages: 561 Registered: November 2009 |
Senior Member |
|
|
The only solution I could find is using reflection API to get the viewer
Class<?> clazz = ExtendedMarkersView.class;
Field field = clazz.getDeclaredField("viewer");
field.setAccessible(true);
MarkersTreeViewer cachedViewer = (MarkersTreeViewer) field.get(getViewSite().getPart());
However, when adding IDoubleClickListener the ISelection is of type MarkerEntry with no modifier, so I can't cast selection to this type. Such restriction is evident throughout ExtendedMarkersView as well. I understand that these classes are internal, but why be so restrictive on their access? Why are ExtendedMarkersView.viewer and MarkerEntry are restricted? What is gained by making them as such?
[Updated on: Tue, 07 August 2012 18:56] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03467 seconds