| Summary: | [EditorMgmt] Contradicting Javadoc in org.eclipse.ui.IElementFactory.createElement(IMemento) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> |
| Component: | UI | Assignee: | Boris Bokowski <bokowski> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.4 | ||
| Target Milestone: | 3.4 M5 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 186977 | ||
See also bug 186977. The full text is: Under normal circumstances, the resulting object can be expected to be persistable; that is, result.getAdapter(org.eclipse.ui.IPersistableElement.class) should not return null. I don't see a contradiction. The result can be null, but any non-null result should be adaptable to IPersistableElement. forgot to change the resolution Sorry to be a pain ;-) "Under normal circumstances" == "could not be created"? The API gives no clue what "normal circumstances" are i.e. is it abnormal and hence OK to return 'null' - when the file no longer exists? - when a exception happens? - when it snows in summer? Changed the Javadoc to: * <p> * If the result is not null, it should be persistable; that is, * <pre> * result.getAdapter(org.eclipse.ui.IPersistableElement.class) * </pre> * should not return <code>null</code>. * </p> Is this better? Yes. Verified by code inspection on Windows XP using I20080205-0010. |
3.4 M3 The Javadoc in org.eclipse.ui.IElementFactory.createElement(IMemento) is contradicting: In the Javadoc it says: * should not return <code>null</code>. but the @return tag says: @return an object, or <code>null</code> if the element could not be created