Problems extending Xbase with XText 2.0.1 [message #720353] |
Tue, 30 August 2011 12:40 |
Mark Utting Messages: 9 Registered: August 2011 |
Junior Member |
|
|
I'm trying to create a DSL similar to Xtend (i.e., XBase plus a few class-like constructs and extra kinds of expressions), so I thought I'd start with the working Xtend code, and modify it incrementally.
However, although the pre-built tutorials and purexbase interpreter work fine for me, they do not work correctly when built from source, following the recommended development environment setup instructions here:
[http] www.eclipse.org/Xtext/developers/workspaceSetup.php
Here is a detailed description of the problem:
1. I downloaded clipse-SDK-3.7-Xtext-2.0.1-win32-x86_64.zip from [http] download.itemis.com/distros/?C=M;O=A and unpacked it. (I'm running on Windows 7 64-bit, using JDK 1.6.0_26, and cygwin shell)
2. Clone the 2.0.1 GIT repository from: [git] git.eclipse.org/gitroot/tmf/org.eclipse.xtext.git
Since I wanted to have a stable well-tested version, I downloaded
org.eclipse.xtext-2.0.1.tar.bz2 from [http] git.eclipse.org/c/tmf/org.eclipse.xtext.git/tag/?id=v2.0.1
and unpacked it, thus obtaining a directory: org.eclipse.xtext-2.0.1
3. Start up the Eclipse that I downloaded in step 1, set its workspace to be the directory created in step 2, and import all the Eclipse projects beneath that directory (61 of them!).
This gives 128 compiler errors, including lots of "An API baseline has not been set for the current workspace", so I add an API baseline that is the Eclipse downloaded in step 1, leaving 108 compiler errors (see COMPILE_ERRORS.txt attached).
Am I meant to go through and fix these? Eg. by downloading easymock, mylyn, and other things that seem to be missing?
4. [Carrying on anyway] If I close the five projects that have errors, I can run the org.eclipse.xtext.purexbase project as an Eclipse Application (with its VM args set to: -Xms40m -Xmx512m -XX:MaxPermSize=128m). In the new Eclipse that opens:
4a. I create a new Java project called project1.
4b. Then create a text file src/eg1.xbase, close it and reopen it.
4c. Say Yes to "Do you want to add the Xtext nature to the project 'project1'?"
4d. Type in various Xbase blocks, and see how they get evaluated. Simple constants work okay, but operators cannot be resolved.
------------------------------------------------------
{ 42 }
// 42 (int)
{ 1 + 3 } // error on "+", saying: "Couldn't resolve reference to JvmIdentifiableElement +".
// (I get similar errors in my own DSL project, after making my grammar extend xbase.)
// DSLs that don't use xbase seem to work fine.
{ Collections.EMPTY_LIST } // error on both words, even after I add import java.util.collections up the top of the file.
------------------------------------------------------
(I also tried doing a git clone on the head version, but that had similar problems, plus more).
Any ideas what is causing these problems?
How can I set up a usable development environment for Xtext / Xbase / Xtend 2.0.1?
Thanks
Mark
|
|
|
|
Powered by
FUDForum. Page generated in 0.02752 seconds