Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Finding subtypes
Finding subtypes [message #507882] Fri, 15 January 2010 00:40 Go to next message
Michal Olejnik is currently offline Michal OlejnikFriend
Messages: 13
Registered: July 2009
Junior Member
Hello,

I would like to know if there is any way to find all subtypes of particular class from my plug-in. I have an IJavaElement which represents this class and ideally I would like to find all its subtypes represented also as IJavaElements, though even their qualified names could be sufficient..

If anyone knows solution to my problem I'd be very grateful for helping me.

Thanks in advance and best regards.
Michal Olejnik
Re: Finding subtypes [message #507932 is a reply to message #507882] Fri, 15 January 2010 08:52 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hello,

You will need your (runtime workspace) project to be a Java Project and use JDT API to list subtypes.
The code to use is parentType.newTypeHierarchy(project,null).getAllSubtypes(par entType).

I cross-posted this answer to JDT newsgroup/forum, which is more accurate for your question.

Regards,
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Previous Topic:Source code for Plug-in Examples
Next Topic:Finding subtypes
Goto Forum:
  


Current Time: Wed Apr 24 18:33:13 GMT 2024

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

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

Back to the top