-1

I'm just getting started with xtext 2.9.2 on IntelliJ IDEA 2016.3. I try to follow the simple 15 Minutes Tutorial. The first iteration was fine, but the imports do not work.

I have created 2 repos on github:

How does xtext try to resolve the imports? e.g. does it automatically look for all my *.dmodel files in the whole project?

TmTron
  • 17,012
  • 10
  • 94
  • 142
  • does your project have yourdsl facet? i dont see it on github. and i am not sure that that old xtext version works with that new idea – Christian Dietrich Dec 13 '16 at 17:15
  • Hey, I've downvoted you because SO prefers code to be placed in the question itself, not linked on other sites (even github) because the links go stale and the question will become worthless to future generations. If you can provide a [mcve] I'll remove it. – Software Engineer Dec 13 '16 at 22:49
  • @ChristianDietrich: what is the newest version of xtext? the [download page](http://www.eclipse.org/Xtext/download.html) only shows 2.9.0. Or do you mean, that I should use an older IntelliJ version (V15)? – TmTron Dec 15 '16 at 13:51
  • @EngineerDollery I doubt that there is some problem with the code anyway, because this is straight out of their tutorial. Thus, in order to reproduce it (if possible at all), you need all 2 projects (and maybe even the correct IntelliJ version installed). Posting all files of the those projects here on SO and maybe attaching the complete IDE is for sure not an option.. – TmTron Dec 15 '16 at 13:56
  • 1
    First you should add the facet – Christian Dietrich Dec 15 '16 at 14:04
  • @ChristianDietrich do maybe know if this can also work in Android Studio (v2.2.3)? I cannot find a way to add a facet. – TmTron Dec 19 '16 at 17:29
  • I found out that [Android Studio and IntelliJ use the same project format](https://blog.jetbrains.com/idea/2013/05/intellij-idea-and-android-studio-faq/). So I just opened the Android Studio project in IntelliJ, added the facet, saved the project and reopened in Android Studio: that worked fine. – TmTron Dec 20 '16 at 08:29

1 Answers1

1

In the project that uses the generated editor, I had to go to File - Project Structure... - Modules and add the Domainmodel facet:

enter image description here

TmTron
  • 17,012
  • 10
  • 94
  • 142