Creating an Eclipse Xbase Project

What is the best way to create a new xbase project? Possibilities include:

I tried by starting with 'Script' (the simplest of the 7 languages). However I found it difficult to change it into the naming structure I wanted. The 'Script' name is built into the file and class naming structure everywhere and the Eclipse Refactor/Rename does not seem to work very well in xtext.

Converting xtext into xbase Project

I therefore decided to base my code on the xtend code. I did the following to give simple code which has basic object-oriented functionality and can be easily extended to add the special language features required for a given DSL.

I took the xtend grammar file and removed the 'rich string' stuff (The code is on this page). I then constructed a simple JvmModelInferrer.xtend' file to generate the code from the grammar (This code is also on this page).

This is all I did, all the rest is just as generated by the 'new xtext' wizard. Obviously this does not have the same functionality as the xtend code, but its not intended to, it is intended as a very simple working code which can then be extended in various ways to add project specific DSL features as required.

See this page for the code and step by step instructions.

File Structure

file structure

Key:

Next Steps

For screen shots of each step that I took see this page.

For other information that I am gathering about xbase see this page.


metadata block
see also:

 

Correspondence about this page

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.