-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrapped unsafe TemplateStructuredTextViewerConfiguration.scalaConfiguration in Option. #179
Wrapped unsafe TemplateStructuredTextViewerConfiguration.scalaConfiguration in Option. #179
Conversation
…ration in option. This prevents possible null pointer exceptions in other SSE component who create instances of this class, such as the Maven POM Editor. Fixes scala-ide#176
The part I'm missing is why this code is invoked by the Maven plugin. The changes seem to patch the problem, but I would prefer to get in a state where our code doesn't leak in other people plugins. |
I really don't know, unfortunately. My only guess would be that our content type "org.scalaide.play2.templateSource" somehow steps on the feat of other content types that have .html as a possible file type (implying that whatever content type that the pom editor is using also includes .html as a possible extension). I do know of some existing wonkiness between the HTML editor and the template editor, and I had spent a day trying to figure out how disambiguate based on the fact that our extension type is .scala.html, but I came to the conclusion (based on other peoples experience on the internet and my failed attempts) that it's just not possible (or, it is possible, but nobody in the world knows the solution :P). So, when a .xml or .html file is create, in certain extension points, our template extension points take precedence, |
Can this be merged as a temporary fix to the problem, and I'll file an issue for the deeper problem? |
This LGTM, but I think @skyluc has a better understanding now. So I leave it to him to decide if this workaround is a good idea or not. |
I think #182 fixes the problem of having the Play code called by Maven editor. |
Yes, I agree that #182 fixes the "root" issue. However, I believe the code introduced in this PR is still an improvement (safeguards a possible null pointer exception in the case of bad initialization) that is worth incorporating in its own right. |
@skyluc WDYT? Should we merge this as well? |
Can one of the admins verify this patch? |
ok to test |
Test FAILed. |
test this please |
Test FAILed. |
test this please |
Test FAILed. |
test this please |
Test FAILed. |
test this please |
Test PASSed. |
retest this please |
Also, @skyluc I didn't see your comment on whether we should consider this one in its own right |
Test PASSed. |
Anyway, this LGTM ! |
👍 |
Wrapped unsafe TemplateStructuredTextViewerConfiguration.scalaConfiguration in Option.
This prevents possible null pointer exceptions in other SSE component who create instances of this class, such as the Maven POM Editor.
Fixes #176