Bug 195945

Summary: [spec] Javadoc of ICompilationUnit should explain working copies
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: mik.kersten
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2007-07-10 03:06:30 EDT
HEAD

Bug 195361 revealed that the Javadoc of ICompilationUnit.getOwner() does not explain that "no owner" means the primary owner.

Furthermore, I think the explanation of working copies in the Javadoc of IWorkingCopy should be copied to ICompilationUnit. This is still valuable information, but is easy to miss since IWorkingCopy is deprecated.
Comment 1 Mik Kersten CLA 2007-07-10 12:11:15 EDT
This would indeed be helpful.  Just fyi, when fixing bug 195361 I was also wondering if it would make more sense to never have it null and in stead to have a static/singleton/immutable working copy that always answered true to isPrimary() since that would make the API and client code more explicit.  But I assume that this would be too big a change.
Comment 2 Markus Keller CLA 2009-11-12 08:52:44 EST
> ... Javadoc of ICompilationUnit.getOwner() does not
> explain that "no owner" means the primary owner.

This has been fixed with bug 293711.

> Furthermore, I think the explanation of working copies in the Javadoc of
> IWorkingCopy should be copied to ICompilationUnit. This is still valuable
> information, but is easy to miss since IWorkingCopy is deprecated.

Still holds.