Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 05:06 Go to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

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 09:54 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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 Apr 20 01:46:05 GMT 2024

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

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

Back to the top