Bug 352631 - JDT UI bundle is activated prematurely in non-JDT workspace due to navigatorContentExtension
Summary: JDT UI bundle is activated prematurely in non-JDT workspace due to navigatorC...
Status: CLOSED DUPLICATE of bug 295136
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 13:04 EDT by Martin Oberhuber CLA
Modified: 2011-07-27 09:19 EDT (History)
4 users (show)

See Also:


Attachments
patch v1 (2.72 KB, patch)
2011-07-20 13:05 EDT, Martin Oberhuber CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.