Guice provision error when first opening MyDsl xtext editor - eclipse-plugin

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.

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.

Related

I tried to make mutation test. In Intellij idea ı used pitest. But ı get an error message that the HTML file could not be created

Error: Could not find or load main class org.pitest.mutationtest.commandline.MutationCoverageReport
Caused by: java.lang.ClassNotFoundException: org.pitest.mutationtest.commandline.MutationCoverageReport

UWP XAML designer exception - Template10 stopped working suddenly

From one moment to another I am receiving the following error messages:
When starting the UWP app:
One of the content dialog constructor -> InitializeComponent() throws the following exception:
Windows.UI.Xaml.Markup.XamlParseException: 'The text associated with this error code could not be found.
Cannot deserialize XBF metadata property list as 'Behaviors' was not found in type 'Microsoft.Xaml.Interactivity.Interaction'. [Line: 0 Position: 0]'
http://prntscr.com/rb8bdj
And I can't open the XAML Designer:
http://prntscr.com/rb8boo
Template10 version: 1.1.12
Microsoft.Xaml.Behaviors.Uwp.Managed: 2.0.1
So the latest.
There was no any previous sign, this error come up from one moment to another today, everything was working smoothly before.
Can you please suggest anything how can I fix it or debug it?
Solution:
Finally figured out that anything went wrong with the project configuration, after deleting and readding the debug config solved the problem.

expected identifier or )

I have a project that contains several header files, when the project imported into Xcode and compiled, on of the header files caused the following error:
expected identifier or )
../../../projjack/Lumbroot/xx.h
would you please suggest some solution to fix this issue, there are similar questions about solving the same error, but it does not address my issue.
also,why do you think I receive such an error despite the path to the header file does not contain ")" sign?
Because the error is in what is being included not in the file name.
would you please suggest some solution to fix this issue
In Xcode open the file reporting the error then select the menu item Product > Perform Action > Preprocess "<file>". This will produce you a "flat" view of the file with all files included and all processing tokens expanded. The view will contain lines starting with # which indicate the files the various lines originally came from. In this view locate the point at which Xcode shows the error in the original file and then examine the lines preceding that point. You should locate what is causing your issue. You can then open the original file containing the error and fix it.
HTH

Can't get PDFBox CreatePDFA example to work - Color profile not found

I'm trying to get the example for creating a PDF/A document with Apache PDFBox up an running (CreatePDFA.java).
For this I copied the example class as is into a project module that includes a maven-dependency on PDFBox in version 2.0.0-RC3. I only changed the method signature and used a fixed font, filename and message instead of args[].
When trying to run the code I get an NPE in Line 107 because it cant't load the color profile (InputStream is null) When I check the included library in the project details I can see the resources folder, but it does not contain the expected file, namely "pdfa/sRGB Color Space Profile.icm".
Unfortunately, google-ing the problem only turned up more references to always the same example implementation, but after a while I acutally found what seems to be the needed file on apache.googlesource.com
I copied the file to our own resource directory and then used this line of code instead:
InputStream colorProfile = CreatePdfA.class.getResourceAsStream("/pdfa/sRGB Color Space Profile.icm");
This finally stopped the NPE - the file is apparently found - but now I get another exception which says:
java.lang.IllegalArgumentException: Invalid ICC Profile Data
Here, I'm stuck. I had hoped that this would work just out of the box, but it seems like I am missing something. Any ideas?
You already answered one part of the problem yourself: put the file into your resource directory.
The second problem may be a bad repository mirror or a transfer problem (binary to ascii). Here's the official repository URL with the ICC profile from the example:
https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/resources/org/apache/pdfbox/resources/pdfa/

Selenium Webdriver Error Unknown strategy class

I've been trying to use Selenium to test my application. I wrote the initial tests using the Selenium IDE but, when I converted the IDE tests to Selenium Webdriver tests I got errors for about half of my code! So I'm going through each of the errors trying to get the code to work.
The error I'm getting in Web Driver is
ERROR: Caught exception [Error: unknown strategy [class] for locator [class=x-tool-close]]
In Selenium IDE it had simply been Command Click and target class=x-tool-close.
Thanks,
It has been awhile since I posted this question so I cannot be sure if I am addressing what the problem was exactly, but with that said the following is what I use for the command I mentioned above.
driver.findElement(By.xpath("//img[contains(#class,'x-tool-close')]")).click();
The structure of this command is very basic. Since the id of my elements are dynamic I search by xpath. Inside the quotation marks we have said xpath. We are searching for an 'img' element whose class attribute contains 'x-tool-close'. Then we are executing the selenium webdriver command click upon that element.