| Summary: | [misc] filebuffers.documentCreation semantics are undefined for multiple doc. factories for the same file extension | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Marat Boshernitsan <maratb> |
| Component: | Text | Assignee: | Kai-Uwe Maetzel <kai-uwe_maetzel> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | burner, david_williams |
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Marat Boshernitsan
Kai, please commment *** Bug 55415 has been marked as a duplicate of this bug. *** This is still an issue for me. Unlike the poster of bug 55415, I do not have a distinct editor instance that reports a different content type (so, I cannot resolve this conflict based on content type). I have a document factory that is registered to the content type of the org.eclipse.jdt.core.javaSource, with intention to provide an alternative IDocument implementation for the JDT's CompilationUnitEditor. As far as I can tell, the culprit is this method in org.eclipse.core.internal.filebuffers.ExtensionsRegistry, which always returns the first element of the extension set: private IConfigurationElement selectConfigurationElement(Set set) { if (set != null && !set.isEmpty()) { Iterator e= set.iterator(); return (IConfigurationElement) e.next(); } return null; } I'd vote for either making these pseudo-random APIs work consistently for all or removing them. So far document sharing has brought us one collision after another. |