Guice provision error when first opening MyDsl xtext editor

76 views Asked by At

I am developing a xtext domainmodel and first everything was fine. But since some days I always getting the following error when first opening my dsl file with the generated editor in eclipse:

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)

I first noticed that after I have added the fragments LabelProviderFragment2 and OutlineTreeProviderFragment2 to the mwe2 file.

Reopening the editor works and I can then edit the file. The only thing that does not work are the custom icons in the outline I wanted to add.

1

There are 1 answers

0
Thomas Jörger On BEST ANSWER

I found the answer myself. The problem had nothing to do with the added fragments, but with the output configuration I also added.

In my output configuration I did not specify a description for my outputs. After I have set the descriptions and reinstalled the plugin, the error is gone. I also had an error when visiting the preferences page for my plugin because the description is used there.