2

I have an Eclipse project which is set up to work with EMF and Xtend. I does work, however, I am experiencing some weird compilation issues that I am unable to resolve.

Again I want to stress, that the code I am using does in fact work, but I have to perform teadious steps in order to run the project.

There are three files affected by this issue.

AppController.xtend Generator.xtend ScreenNavigatorController0.xtend

I am unsure when the issue started but I did not experience it before I started using the AppController to run the program. The specific code in AppController that produces the error is:

screenNavigatorController = new ScreenNavigatorController0(this, navigatorMap);
Here this is underlined with red dots and the message is:

Type mismatch: cannot convert from AppController to AppController

The constructor looks like this: new(Object controller, HashMap<Integer, String> map) {...} (It should be AppController controller but I just wanted to make sure it was unrelated)

All the three class files are marked with the red x (cross) in eclipse's package explorer, representing an error.

Now you might be thinking that there is another coding error somewhere, but this is where it gets weird.

If I clean the project, I get a lot of error messages. Classes cannot be found etc. But if I open Generator.xtend and just edit one random line, e.g whitespace/newline and resave, then both AppController.xtend and Generator.xtend resolves with no issues and the red x is gone.

Now only ScreenNavigatorController0.xtend is left with the red x. I add a random whitespace in it and save, and now it all works.

And now where it gets really annoying. I can edit Generator.xtend and ScreenNavigatorController0.xtend without issues, however, if I edit AppController.xtend then I get the initial error message and have to do everything above in order to resolve it.

I have tried deleting and adding AppController again, but with no luck. I hope someone can shine some light on this.

Thank you for your time

Fredrik

Fhl
  • 1,079
  • 1
  • 12
  • 26

0 Answers0