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 #604171] Fri, 15 January 2010 00:40 Go to next message
Michal Olejnik is currently offline Michal OlejnikFriend
Messages: 13
Registered: July 2009
Junior Member

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 #604179 is a reply to message #604171] Fri, 15 January 2010 08:52 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 858
Registered: July 2009
Location: Grenoble, France
Senior Member


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.

Mickael Istria - BonitaSoft S.A.
Previous Topic:Finding subtypes
Next Topic:Welcome to eclipse.scalamodules
Goto Forum:

Current Time: Wed Jun 16 09:10:39 GMT 2021

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

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

Back to the top