Community
Participate
Working Groups
For 4.2M5 I get java.lang.NullPointerException at org.eclipse.ui.internal.ide.ContentTypeDecorator.decorate(ContentTypeDecorator.java:52) at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:371) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:331) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) when the file is a UML file. MDT/UML2 is installed so that there is a UML Model Editor available, but the icon backs off to the (Windows Vista) system where StarUML is available. (The icon back off was present in 3.8M4 too and did not appear right there.)
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. ***