Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Does anyone really understand 'adaptable'?
Does anyone really understand 'adaptable'? [message #215507] Wed, 24 March 2004 18:54 Go to next message
Eclipse UserFriend
Does anyone really understand the attribute "adaptable" in the element
"objectContribution" of the extension point "org.eclipse.ui.popupMenus"?

E.g.:
I defined an extension for this extension point with
objectClass="org.eclipse.core.resources.IFile" and adaptable="true".

The new menu item is also shown in the context menu of java files in the
package explorer (org.eclipse.jdt.internal.core.CompilationUnit).

But this is what I don't understand.
org.eclipse.jdt.internal.core.CompilationUnit is neither an IFile, nor
is an ancestor of CompilationUnit an IFile, nor is CompilationUnit
adapting IFile.

So what does adaptable="true" really mean?
- Has the selected object to adapt the interface named in the attribute
"objectClass"?
- Or has the selected object to adapt IResource? But if this is true,
what is meaning of "objectClass" when adaptable="true"?

Thanks,
Oliver
Re: Does anyone really understand 'adaptable'? [message #221241 is a reply to message #215507] Fri, 02 April 2004 21:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ed.burnette.REMOVE.THIS.sas.com

adaptable=true currently means adaptable to IResource. I consider it a bug
but I think it's left that way for backwards compatability.

--
Ed Burnette, co-author, Eclipse in Action
www.eclipsepowered.org

"Oliver Widder" <oliver.widder@sdm.de> wrote in message
news:c3t6r0$646$1@eclipse.org...
> Does anyone really understand the attribute "adaptable" in the element
> "objectContribution" of the extension point "org.eclipse.ui.popupMenus"?
>
Re: Does anyone really understand 'adaptable'? [message #224025 is a reply to message #221241] Wed, 07 April 2004 16:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

I prefer "limitation" rather than "bug". There is a plan item in this
area, but it's not clear if it will make it for 3.0:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=36968
--

Ed Burnette wrote:
> adaptable=true currently means adaptable to IResource. I consider it a bug
> but I think it's left that way for backwards compatability.
>
> --
> Ed Burnette, co-author, Eclipse in Action
> www.eclipsepowered.org
>
> "Oliver Widder" <oliver.widder@sdm.de> wrote in message
> news:c3t6r0$646$1@eclipse.org...
>
>>Does anyone really understand the attribute "adaptable" in the element
>>"objectContribution" of the extension point "org.eclipse.ui.popupMenus"?
>>
>
>
>
Re: Does anyone really understand 'adaptable'? [message #224081 is a reply to message #221241] Wed, 07 April 2004 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xxx.ca.ibm.com

Oliver,
using objectClass="model class"
is telling your object contribution to appear in every view were instances
of "model class" appear.
Every view has a model, aka object/class types. IResource is one model. If
you create your own model class, you can use:

objectClass="xxx.yyy.foo" and adaptable="true".
That means that this object contribution will only appear if instances of
xxx.yyy.foo class appear somewhere.
AND
since adaptable=true, this means that means that any model that know how to
adapt to IResource will get your contribution, even if the model is not
yours (ie: xxx.yyy.foo).

- Has the selected object to adapt the interface named in the attribute
"objectClass"?
No. adapt to IResource model
Or has the selected object to adapt IResource? But if this is true, what is
meaning of "objectClass" when adaptable="true"?
yes. If the selection is your model (ie:objectClass ) then that contribution
will appear on your objects (even if your model does not adapt to
IResource).

Hope this somewhat helps...
Mazen Faraj



"Ed Burnette" <ed.burnette@REMOVE.THIS.sas.com> wrote in message
news:c4l5o9$q80$1@eclipse.org...
> adaptable=true currently means adaptable to IResource. I consider it a bug
> but I think it's left that way for backwards compatability.
>
> --
> Ed Burnette, co-author, Eclipse in Action
> www.eclipsepowered.org
>
> "Oliver Widder" <oliver.widder@sdm.de> wrote in message
> news:c3t6r0$646$1@eclipse.org...
> > Does anyone really understand the attribute "adaptable" in the element
> > "objectContribution" of the extension point "org.eclipse.ui.popupMenus"?
> >
>
>
Re: Does anyone really understand 'adaptable'? [message #224089 is a reply to message #224081] Wed, 07 April 2004 17:53 Go to previous message
Eclipse UserFriend
Originally posted by: xxx.ca.ibm.com

now that I think about it, I have to clarify.
I believe that your model has to be the IResource model for the "adapt"
stuff to work.
But still, if you define your own model, use it in objectClass and
contributions will appear there, regardless of adaptable.
I might have just confused you! sorry.

anyways, just my two cents..

Mazen


"Mazen Faraj" <xxx@ca.ibm.com> wrote in message
news:c51s4g$5sd$1@eclipse.org...
> Oliver,
> using objectClass="model class"
> is telling your object contribution to appear in every view were instances
> of "model class" appear.
> Every view has a model, aka object/class types. IResource is one model. If
> you create your own model class, you can use:
>
> objectClass="xxx.yyy.foo" and adaptable="true".
> That means that this object contribution will only appear if instances of
> xxx.yyy.foo class appear somewhere.
> AND
> since adaptable=true, this means that means that any model that know how
to
> adapt to IResource will get your contribution, even if the model is not
> yours (ie: xxx.yyy.foo).
>
> - Has the selected object to adapt the interface named in the attribute
> "objectClass"?
> No. adapt to IResource model
> Or has the selected object to adapt IResource? But if this is true, what
is
> meaning of "objectClass" when adaptable="true"?
> yes. If the selection is your model (ie:objectClass ) then that
contribution
> will appear on your objects (even if your model does not adapt to
> IResource).
>
> Hope this somewhat helps...
> Mazen Faraj
>
>
>
> "Ed Burnette" <ed.burnette@REMOVE.THIS.sas.com> wrote in message
> news:c4l5o9$q80$1@eclipse.org...
> > adaptable=true currently means adaptable to IResource. I consider it a
bug
> > but I think it's left that way for backwards compatability.
> >
> > --
> > Ed Burnette, co-author, Eclipse in Action
> > www.eclipsepowered.org
> >
> > "Oliver Widder" <oliver.widder@sdm.de> wrote in message
> > news:c3t6r0$646$1@eclipse.org...
> > > Does anyone really understand the attribute "adaptable" in the element
> > > "objectContribution" of the extension point
"org.eclipse.ui.popupMenus"?
> > >
> >
> >
>
>
Previous Topic:Welcome Screen keeps appearing randomly - M8
Next Topic:Re: Is there a way to add my own items to Workbench keys?
Goto Forum:
  


Current Time: Sun Nov 09 17:48:12 EST 2025

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

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

Back to the top