| Summary: | NPE in ContentTypeDecorator for UML files | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Ed Willink <ed> |
| Component: | UI | Assignee: | Dani Megert <daniel_megert> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, Ed.Merks, remy.suen, sebastian.zarnekow |
| Version: | 3.7 | ||
| Target Milestone: | 3.8 M6 | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 251776, 370864 | ||
|
Description
Ed Willink
This is new code added for bug 251776. Ed, did you play around with the new 'editorAssocitaionOverride'? If not, the code should not pass line 52. I wasn't conscious of doing anything. I was just debugging my own problem and my NPE breakpoint stopped in your code. Then I saw that it was on the console log too. The UML file type is non-trivial since it now has at least four different content types for different namespaces. I don't see any file association elements in uml2.uml/plugin.xml or uml2.uml.editor/plugin.xml. As I indicated in my final comment, I don't think that the UML content icon was being correctly detected in 3.8M4 either. In both 3.8M4 and 4.2M5 I see a Windows tool icon, although the Open Editor pull down offers me an (Eclipse) UML Editor option. I suspect a simple null guard will hide the message and restore the status quo. One day you can perhaps improve an icon. Fixed in R3_development: 5434bb309a41cdffe2752c29a6f5fa35dd1556ba Fixed in master: 5eff455b45bc433967c3d7c5ef520fa231ce29ec (In reply to comment #3) I asked because the NPE happens in a code branch where you should not end up, if you didn't try out the new 'editorAssocitaionOverride' extension point. If you have time I'd appreciate if you could debug it again and see why if (hasEditorAssociationOverrides()) { returns true and then causes the NPE. The following derives from Xtext
<fragment>
<extension
point="org.eclipse.ui.ide.editorAssociationOverride">
<editorAssociationOverride
class="org.eclipse.xtext.common.types.shared.SharedCommonTypesExecutableExtensionFactory:org.eclipse.xtext.common.types.shared.jdt38.OriginalEditorSelector"
id="xtext.common.types.originalEditorSelector">
</editorAssociationOverride>
</extension>
</fragment>
and is the sole override.
Wow, they are fast adopters! Thanks for checking Ed. *** Bug 371346 has been marked as a duplicate of this bug. *** *** Bug 373174 has been marked as a duplicate of this bug. *** |