Bug 46985 - [ViewMgmt] [Javadoc] Java docs for IViewPart.init(...) confusing.
Summary: [ViewMgmt] [Javadoc] Java docs for IViewPart.init(...) confusing.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2003-11-19 10:43 EST by Mazen Faraj CLA
Modified: 2004-05-27 22:52 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mazen Faraj CLA 2003-11-19 10:43:22 EST
The java docs for org.eclipse.ui.init(...) say:

/**
 * Initializes this view with the given view site.  
 * <p>
 * This method is automatically called by the workbench shortly after part 
 * construction.  It marks the start of the views's lifecycle. Clients must 
 * not call this method.
 * </p>
 *
 * @param site the view site
 * @exception PartInitException if this view was not initialized successfully
 */
public void init(IViewSite site) throws PartInitException;


To the naked eye "shortly after part construction" sounded like immediately 
after createPartControl(Composite parent) in the parent interface. This is not 
the case. Init is called before createPartControl. 
I believe the docs should be clearer.

Mazen.
Comment 1 Nick Edgar CLA 2003-11-20 11:33:48 EST
"after part construction" means after the constructor is called.
"after instantiating the part" may be clearer.
Comment 2 Nick Edgar CLA 2004-05-27 22:52:39 EDT
Fixed up the Javadoc to say:
"This method is automatically called shortly after the part is instantiated."

Fixed both init methods in IViewPart and the one in IEditorPart.