| Summary: | tutorial "Five simple steps to your JVM language" contains some pitfalls | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Lorenzo Bettini <lorenzo.bettini> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | btickets, sven.efftinge |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | v2.5 | ||
The documentation now says: "Xbase relies on a small runtime library on the class path. To add this, right-click on the project and go to Java Build Path -> Libraries -> Add Library and choose Xtend Library" So I guess this is fixed. yes, thanks for checking. Requested via bug 522520. -M. Requested via bug 522520. -M. |
I've just tried the Five simple steps to your JVM language tutorial and when trying the editor it all seems to work (and I added the xtext nature to the project), but for expressions like these: op getFullName() : String { return firstName + " " + name; } op getFriendsSortedByFullName() : List<Person> { return friends.sortBy( f | f.fullName); } with errors: Couldn't resolve reference to JvmIdentifiableElement '+'. Couldn't resolve reference to JvmIdentifiableElement 'sortBy'. The problem is that the documentation, in the section "Try the Editor" is slightly confusing: it says to create a Java project in the runtime workspace; however, in order to use the '+' for strings, and the extension sortBy you need to # create a plugin project (instead of a Java project) # add the dependency 'org.eclipse.xtext.xbase.lib'