首次打开MyDsl xtext编辑器时出现Guice设置错误

问题描述 投票:0回答:1

我正在开发一个xtext域模型,首先一切都很好。但是有些日子我在eclipse中首次使用生成的编辑器打开我的dsl文件时总会出现以下错误:

Guice provision errors:

1) Error injecting method, java.lang.NullPointerException
  at org.eclipse.xtext.ui.editor.formatting.PreferenceStoreIndentationInformation.setPreferenceStoreAccess(Unknown Source)
  at org.eclipse.xtext.ui.editor.formatting.PreferenceStoreIndentationInformation.class(Unknown Source)
  while locating org.eclipse.xtext.ui.editor.formatting.PreferenceStoreIndentationInformation
  while locating org.eclipse.xtext.formatting.IIndentationInformation
    for field at org.eclipse.xtext.ui.editor.autoedit.MultiLineTerminalsEditStrategy$Factory.indentationInformation(Unknown Source)
  while locating org.eclipse.xtext.ui.editor.autoedit.MultiLineTerminalsEditStrategy$Factory
    for field at org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategyProvider.multiLineTerminals(Unknown Source)
  while locating org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategyProvider
  while locating org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategyProvider
    for field at org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration.editStrategyProvider(Unknown Source)
  while locating org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration
    for field at org.eclipse.xtext.ui.editor.XtextEditor.sourceViewerConfiguration(Unknown Source)
  while locating org.eclipse.xtext.ui.editor.XtextEditor

1 error (occurred in org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory)

在我将片段LabelProviderFragment2OutlineTreeProviderFragment2添加到mwe2文件后,我首先注意到了。

重新打开编辑器,然后我可以编辑该文件。唯一不起作用的是我想要添加的大纲中的自定义图标。

eclipse-plugin xtext xtext-gradle-plugin
1个回答
0
投票

我自己找到了答案。问题与添加的片段无关,但是我还添加了输出配置。

在我的输出配置中,我没有为输出指定描述。在我设置了描述并重新安装插件后,错误消失了。访问我的插件的首选项页面时,我也遇到了错误,因为在那里使用了描述。

© www.soinside.com 2019 - 2024. All rights reserved.