Bug 144470 - [project explorer] J2EEProjectDecorator causes premature plugin loading
Summary: [project explorer] J2EEProjectDecorator causes premature plugin loading
Status: CLOSED DUPLICATE of bug 144475
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Michael D. Elder CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords: performance
Depends on: 144475
Blocks:
  Show dependency tree
 
Reported: 2006-05-30 11:35 EDT by Linda Damus CLA
Modified: 2006-09-26 10:06 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Linda Damus CLA 2006-05-30 11:35:21 EDT
JST and WST plugins are activated when a simple project is created.  The time required to activate these plugins adds unnecessary overhead to the creation of projects that have no interest in these features.  Creating a new project of a particular domain is often the user's first step in using an Eclipse feature, and so it is important that it perform well in order to create a favourable first impression.

To demonstrate this problem, I have installed Eclipse SDK 3.2 RC5, and then installed the "Web and J2EE development" (and its requirements) from the Callisto Discovery Site. 

The org.eclipse.jst.j2ee.navigator.internal.J2EEProjectDecorator is enabled for all IProjects and IJavaProjects.  This causes the org.eclipse.jst.j2ee.navigator.ui plugin to be activated as soon as any new project is created, even when the new project has no interest in java or web features.

Activation of the org.eclipse.jst.j2ee.navigator.ui plugin causes activation of the org.eclipse.wst.common.emfworkbench.integration plugin (for its WorkbenchResourceHelper), which in turn causes the org.eclipse.wst.common.emf plugin to be activated (for its ExtendedEcoreUtil).

Please consider a tighter restriction on the enablement of the J2EEProjectDecorator extension so that these plugins are not loaded unnecesarily.
Comment 1 David Williams CLA 2006-05-30 13:24:56 EDT
I'm marking as P2 to be sure investigated for WTP 1.5. 

Seems to me, the current enablement is 
        <enablement>
           <or>
            <objectClass name="org.eclipse.core.resources.IProject"/>
            <objectClass name="org.eclipse.jdt.core.IJavaProject"/>
           </or>
         </enablement>

What else _could_ it be? Seems the IProject line should just be removed? 

Comment 2 Michael D. Elder CLA 2006-05-31 10:44:38 EDT
*.ear projects are only IProjects, while all other module types are IJavaProjects.

We could use the facet property tester here though to beef up the condition. 

I'll take a look at the decorator and see if we can do something to avoid the plugin dependencies loading here. 
Comment 3 Michael D. Elder CLA 2006-06-01 09:38:23 EDT
The limitation here is with the extension point schema, which only supports ActionFilters, not Core Expressions. This means that we cannot reuse the property tester for facets, so we will not be able to address this for 1.5.
Comment 4 Linda Damus CLA 2006-06-01 16:53:09 EDT
I was going to suggest that maybe we could at least put the J2EEProjectDecorator in a package that doesn't cause it's plugin to activate.  

However, I gave that a try, and I find that both of the other plugins:

   org.eclipse.wst.common.emfworkbench.integration
   org.eclipse.wst.common.emf

are still activated because of bug 144475 (but at least we save the activation cost of org.eclipse.jst.j2ee.navigator.ui).  Anyway, both of these bugs will have to be fixed before we see the benefits of either one.

Comment 5 Michael D. Elder CLA 2006-06-01 17:05:17 EDT
Is there a don't load this plugin/per-package PDE setting? I didn't see anything obvious in the PDE editor.

Comment 6 Linda Damus CLA 2006-06-01 17:28:00 EDT
Yes, I had a hard time finding the option, too.  It doesn't seem to be supported by the PDE editor.  The syntax is:

Eclipse-LazyStart ::= ( 'true' | 'false' ) ( ';' 'exceptions' '=' '"' exceptions-list '"' ) ?
exceptions-list ::= a comma ',' separated list of packages

I found this on the "OSGi Bundle Manifest" page in the Eclipse on-line help (navigate to: Platform Plug-in Developer Guide->Reference->Other reference information->OSGi Bundle Manifest, or search for "Eclipse-LazyStart").
Comment 7 Linda Damus CLA 2006-06-02 11:11:16 EDT
I've updated bug 144475 with results of some experimental work to reduce the plugin loading in this scenario.  It involves the J2EEProjectDecorator and some other things in the WST plugins.

Comment 8 Michael D. Elder CLA 2006-06-07 13:16:15 EDT

*** This bug has been marked as a duplicate of 144475 ***
Comment 9 Linda Damus CLA 2006-07-06 13:38:25 EDT
I have verified the fix on S-1.5RC6-200606230444, and can confirm that the only plugin that is activated when I create a new 'General' project is:

org.eclipse.wst.common.project.facet.core_1.1.0.v200606130645.jar

None of the other JST and WST plugins are activated. 

Thanks!
Comment 10 John Lanuti CLA 2006-09-26 10:06:20 EDT
Closing.