安装scala eclipse plugin导致pom.xml editor打开失败

一 问题描述

    在本机搭建了基于Scala的Eclipse Plugin+scala2.10.3的开发环境, 但打开maven项目pom.xml文件时,却报空指针异常, pom editor打开失败.

    查找了网上的一些资料,发现这是scala-ide-play2的一个BUG导致的.

    可以参考如下信息:

    scala-ide-play2 Version 0.4.0.v-2_10-201308021043-8c62ead breaks Maven POM Editor #176
    https://github.com/scala-ide/scala-ide-play2/issues/176

二:解决方案
   1.升级scala-ide-play2
   2.删除eclipse安装目录中plugins,features目录中包含play的所有目录及jar,重新启动eclipse

   本人采用第二种方案,测试成功

三 异常信息如下:

java.lang.NullPointerException
    at org.eclipse.jface.preference.PreferenceConverter.getColor(PreferenceConverter.java:205)
    at scala.tools.eclipse.util.EclipseUtils$PimpedPreferenceStore.getColor(EclipseUtils.scala:51)
    at scala.tools.eclipse.properties.syntaxcolouring.ScalaSyntaxClass.getStyleInfo(ScalaSyntaxClass.scala:57)
    at scala.tools.eclipse.properties.syntaxcolouring.ScalaSyntaxClass.getTextAttribute(ScalaSyntaxClass.scala:30)
    at scala.tools.eclipse.lexical.AbstractScalaScanner$class.scala$tools$eclipse$lexical$AbstractScalaScanner$$getTextAttribute(AbstractScalaScanner.scala:27)
    at scala.tools.eclipse.lexical.AbstractScalaScanner$class.scala$tools$eclipse$lexical$AbstractScalaScanner$$createToken(AbstractScalaScanner.scala:18)
    at scala.tools.eclipse.lexical.AbstractScalaScanner$$anonfun$getToken$1.apply(AbstractScalaScanner.scala:15)
    at scala.tools.eclipse.lexical.AbstractScalaScanner$$anonfun$getToken$1.apply(AbstractScalaScanner.scala:15)
    at scala.collection.MapLike$class.getOrElse(MapLike.scala:128)
    at scala.collection.AbstractMap.getOrElse(Map.scala:58)
    at scala.tools.eclipse.lexical.AbstractScalaScanner$class.getToken(AbstractScalaScanner.scala:15)
    at org.scalaide.play2.routeeditor.lexical.AbstractRouteScanner.getToken(AbstractRouteScanner.scala:10)
    at org.scalaide.play2.routeeditor.lexical.AbstractRouteScanner.<init>(AbstractRouteScanner.scala:11)
    at org.scalaide.play2.templateeditor.lexical.TemplateDefaultScanner.<init>(TemplateDefaultScanner.scala:11)
    at org.scalaide.play2.templateeditor.TemplateConfiguration.<init>(TemplateConfiguration.scala:51)
    at org.scalaide.play2.templateeditor.sse.TemplateStructuredTextViewerConfiguration.org$scalaide$play2$templateeditor$sse$TemplateStructuredTextViewerConfiguration$$scalaConfiguration$lzycompute(TemplateStructuredTextViewerConfiguration.scala:26)
    at org.scalaide.play2.templateeditor.sse.TemplateStructuredTextViewerConfiguration.org$scalaide$play2$templateeditor$sse$TemplateStructuredTextViewerConfiguration$$scalaConfiguration(TemplateStructuredTextViewerConfiguration.scala:26)
    at org.scalaide.play2.templateeditor.sse.TemplateStructuredTextViewerConfiguration.getConfiguredContentTypes(TemplateStructuredTextViewerConfiguration.scala:77)
    at org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration.getContentAssistant(StructuredTextViewerConfiguration.java:286)
    at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.configure(StructuredTextViewer.java:219)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3416)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447)
    at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1517)
    at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:243)


上一篇:求助阿里云服务器centos7打开6379端口后,本地连接失败的问题


下一篇:我们为什么停用微服务?