Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » newTypeHierarchy really slow
newTypeHierarchy really slow [message #335014] Mon, 16 March 2009 17:03
Eclipse UserFriend
Originally posted by:


I'm currently working on a plugin that requires to perform a search for
types on the whole workspace using
org.eclipse.jdt.core.IJavaProject.newTypeHierarchy which is very slow
(nearly 20 sec in my case). Here is a sample code:

IRegion region = JavaCore.newRegion();
IProject[] projects =
for (IProject proj : projects)
IJavaProject jproj = JavaCore.create(proj);
for (IJavaElement i : jproj.getPackageFragmentRoots())
if (i.getElementName().equals("generated"))
ITypeHierarchy typeHyerarchy = jproject.newTypeHierarchy(port, region,

I have several questions:

1-Is there anyway to optimise this code?
2-If there's not, I want to execute this code at eclipse startup, I'm
wondering if IStartup.earlyStartup executes after projects inside the
workspace are loaded or not.


Previous Topic:[Databinding] JFace Databinding for DOM-SSE
Next Topic:Update fails "No repository found containing..."
Goto Forum:

Current Time: Fri Nov 27 11:55:44 GMT 2015

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

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