Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352631

Summary: JDT UI bundle is activated prematurely in non-JDT workspace due to navigatorContentExtension
Product: [Eclipse Project] JDT Reporter: Martin Oberhuber <mober.at+eclipse>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, itewksbu, mober.at+eclipse, wbprio
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch v1 none

Description Martin Oberhuber CLA 2011-07-20 13:04:42 EDT
+++ This bug was initially created as a clone of Bug #350881 +++

Build ID: Eclipse 3.7 (Indigo)

In a product that includes both CDT and JDT, the jdt.ui bundle is activated even in a workspace that holds non JDT content at all (eg just CDT or generic projects). This degrades product startup performance.

Investigating the activation trace indicates that the JavaNavigatorLabelProvider registered in the navigatorContentExtension is the culprit : a class load breakpoint and further investigation shows that common navigator instantiates the label provider on any element that's a "possible child" of the content extension.

This is basically the same problem as previously reported for JSDT in bug 350881 - having the possibleChildren expression of the navigatorContentExtension be too broad is the problem.
Comment 1 Martin Oberhuber CLA 2011-07-20 13:05:11 EDT
Created attachment 200027 [details]
patch v1

Attached patch fixes the issue for me, please review and consider.
Comment 2 Dani Megert CLA 2011-07-27 09:19:02 EDT
>Attached patch fixes the issue for me, please review and consider.
Not for me. I tried starting a workbench with only the resource perspective and an empty Project Explorer. A breakpoint in JavaPlugin.start(BundleContext) is even with your patch. This is expected because the common navigator framework eagerly loads bundles that contribute enabled filters, label decorators and action providers to the Project Explorer.

*** This bug has been marked as a duplicate of bug 295136 ***
Comment 3 Dani Megert CLA 2011-07-27 09:19:45 EDT
> A breakpoint in JavaPlugin.start(BundleContext) is even with your patch.
A breakpoint in JavaPlugin.start(BundleContext) is *hit* even with your patch.