Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Why the problemd view don't use the AdapterManager
Why the problemd view don't use the AdapterManager [message #336080] Wed, 20 May 2009 11:15 Go to next message
Simon Bernard is currently offline Simon Bernard
Messages: 164
Registered: July 2009
Senior Member
The problems views test if the selection is an IAdaptable and try to
adapt this one in different classes able to give the resource associated
to the selection.

But why not use the AdapterManager (Platform.getAdapterManager)?



------------------------------------------------------------ -------
@see in org.eclipse.ui.internal.views.markers.ExtendedMarkersView, line
989 :

if (selection instanceof IStructuredSelection) {
for (Iterator iterator = ((IStructuredSelection) selection)
.iterator(); iterator.hasNext();) {
Object object = iterator.next();
if (object instanceof IAdaptable) {

------------------------------------------------------------ --
Re: Why the problemd view don't use the AdapterManager [message #336082 is a reply to message #336080] Wed, 20 May 2009 13:05 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
Simon Bernard wrote:
> The problems views test if the selection is an IAdaptable and try to
> adapt this one in different classes able to give the resource associated
> to the selection.
>
> But why not use the AdapterManager (Platform.getAdapterManager)?

Interesting! I guess its worth to file a bug.

- Prakash
---
http://blog.eclipse-tips.com
Re: Why the problemd view don't use the AdapterManager [message #336089 is a reply to message #336080] Wed, 20 May 2009 13:56 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

As Prakash mentioned, please file a bug at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=UI

In the workbench, we should try and use
org.eclipse.ui.internal.util.Util.getAdapter(Object, Class) to adapt
objects.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Why the problemd view don't use the AdapterManager [message #336131 is a reply to message #336089] Mon, 25 May 2009 06:18 Go to previous message
Simon Bernard is currently offline Simon Bernard
Messages: 164
Registered: July 2009
Senior Member
it's done : https://bugs.eclipse.org/bugs/show_bug.cgi?id=277646


Paul Webster a écrit :
> As Prakash mentioned, please file a bug at
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=UI
>
> In the workbench, we should try and use
> org.eclipse.ui.internal.util.Util.getAdapter(Object, Class) to adapt
> objects.
>
> PW
>
Previous Topic:[CommonNavigator] Adding the New Menu
Next Topic:Strange behaviour of an open shell (needs a mouse click twice before noticing any event on the shell
Goto Forum:
  


Current Time: Fri Jul 25 07:20:39 EDT 2014

Powered by FUDForum. Page generated in 0.01975 seconds