Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Why is there no runtime adapter which provides IProject from IResource.(Why is there no runtime adapter which provides IProject from IResource.)
Why is there no runtime adapter which provides IProject from IResource. [message #755313] Tue, 08 November 2011 00:06 Go to next message
Eclipse UserFriend
I know I can just make it in ease, but just curious.

Why is there no runtime adapter which provides IProject from IResource.

I think there is may be some dangerous reason for it.
Re: Why is there no runtime adapter which provides IProject from IResource. [message #755373 is a reply to message #755313] Tue, 08 November 2011 04:54 Go to previous message
Eclipse UserFriend
On 2011-11-08 06:06, Jeeeyul wrote:
> I know I can just make it in ease, but just curious.
> Why is there no runtime adapter which provides IProject from IResource.

Correct. An IProject derives from IResource, but runtime adapters should
only be provided for types, that have no such derivation relations. The
adapter pattern is used to define a type-to-type conversion, where such
inheritance-based relations do not exist.

> I think there is may be some dangerous reason for it.

I strongly disagree for the reasons mentioned above. Proper usage of
IAdaptable should first start with an instanceof test to prevent the
potential overhead (and need) for an adaptable query.

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:Generate Eclipse Product to Linux from Windows
Next Topic:How to Execute a Listener on Open Project
Goto Forum:
  


Current Time: Sat Jul 05 08:58:21 EDT 2025

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

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

Back to the top