Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Error log view triggers dozens of EditorPart.getAdapter() calls
Error log view triggers dozens of EditorPart.getAdapter() calls [message #480620] Tue, 18 August 2009 00:19 Go to next message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
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...
Re: Error log view triggers dozens of EditorPart.getAdapter() calls [message #480682 is a reply to message #480620] Tue, 18 August 2009 08:15 Go to previous message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

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...
>
>
Previous Topic:Java Web Start, Eclipse RCP and Mac
Next Topic:Global selection
Goto Forum:
  


Current Time: Mon Jan 13 04:57:08 GMT 2025

Powered by FUDForum. Page generated in 0.08035 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top