|
Re: Error log view triggers dozens of EditorPart.getAdapter() calls [message #480682 is a reply to message #480620] |
Tue, 18 August 2009 08:15 |
|
When you click right mouse button on your editor, you can see show in
menu. It's dynamically generated menu.
IShowInSource means editor takes selection or editor input which can be
shown other views. If editor has capability of that, Platform queries
ShowInContext through that interface.
If there is, Platform queries ID list of views which can show current
context through IShowInTargetList.class interface.
It's not a rule. just Show In feature has been implemented like this.
This capability can be provided externally by runtime adapter extension.
if you are owner of editor's code, you can simply return adapter for
that capability. (or let your editor implements that interface)
Querying adapter is very natural in Eclipse. Because any specific
feature or extension can't know what current editor supports till query.
Eric Jain wrote:
> Just noticed that when I open an (any) editor in my RCP application
> while the error log view is open, the getAdapter() method on the editor
> is called dozens of times, with interface
> org.eclipse.ui.part.IShowInSource as a parameter. Anyone know why that
> is so? Seems strange...
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.08035 seconds