Bug 27482 - Early plugin activation of HelpPlugin
Summary: Early plugin activation of HelpPlugin
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-12-02 06:11 EST by Erich Gamma CLA
Modified: 2002-12-02 06:51 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2002-12-02 06:11:47 EST
1) empty workspace
2) switch to the JavaPerspective
->HelpPlugin is activated
Comment 1 Martin Aeschlimann CLA 2002-12-02 06:50:47 EST
fixed > 20021202

However, I don't understand why the VM decides to load this class. It seems 
when a class is instantiated, its code is analysed and all references to 
classes are resolved (byte code validation?)

This was our code
class JavaUIHelpListener {
  String fContextId;


  public JavaUIHelpListener(String id) {
    fContextId= id;
  }

  public helpPerformed(HelpEvent e) {
    IContext context= new JavadocHelpContext(fContextId);
    ....
  }
}

JavadocHelpContext extends IContext, and this fact made the VM (Sun 1.4) loads 
IContext (and the help plugin), even helpPerformed has not been invoked and 
only the JavaUIHelpListener constructor is invoked.

If I create a static method in JavadocHelpContext that does all that 
helpPerformed does, no loading of IContext happens at the time of the 
constructor invocation.
Comment 2 Martin Aeschlimann CLA 2002-12-02 06:51:14 EST
fixed