1

I have created a Xtext project with dependencies to an Ecore model. I am able to run/use my defined DSL by selecting my Xtext project and running it as "Eclipse Application".

By using this Run configuration there is a new Eclipse instance starting in which i am able to use my DSL in an Editor. I used the original Xtext tutorial for help: https://www.eclipse.org/Xtext/documentation/102_domainmodelwalkthrough.html

Now my question is how can i export this project or make a runnable file (e.g. .exe or something else) which i can give to other people. My idea is that others can run run the created/exported file and a new Eclipse Instance is starting like my Eclipse instance in which i am able to use my DSL.

Is something like this possible or are there other ways to deploy Xtext projects to other users?

My project structure looks like that: project structure

The selected "example.app.dsl" folder is the one i am able to "Run as Eclipse Application" to use the editor of my DSL.

The AppEcore folder is an Ecore model which is referenced by my DSL to work like a metamodel.

4
  • 1
    You can export a deployable feature or plug-in which can be installed in an existing Eclipse, or you can build an Eclipse RCP which is a complete executable.
    – greg-449
    Aug 27, 2020 at 9:55
  • 1
    How would you create such an plug-in? I tried by selecting my Xtext-project and clicking "Export" -> "Plug-in Development" -> "Deployable plug-ins and fragments". This created a folder with executable jar files inside. But how do i install them in a new eclipse instance?
    – DanLand
    Aug 27, 2020 at 12:26
  • 'Help > Install New Software' use "Add.." and then "Local" to point to the plug-in jar
    – greg-449
    Aug 27, 2020 at 12:33
  • 1
    I have tried this and got the error "Could not find file:/.../" by trying to select "Archive" i can select the jar file but i get the same error "Could not find jar:file:/..."
    – DanLand
    Aug 27, 2020 at 12:52

2 Answers 2

1

You may want to look at this tutorial on packaging Eclipse plug-ins: https://www.vogella.com/tutorials/EclipsePlugin/article.html

What you probably want to do is to create an Eclipse repository (aka update site) that your users may then install in their own Eclipse installation (provided the versions fit).

If you want to distribute a "whole application" then you are probably looking to create an Eclipse Product which is the Eclipse way to release a "full desktop application" in which you include the plug-ins you have developed.

1
  • 1
    do you know the wizard has options to create (a) the feature & update site (p2 repo) as well as a tycho based maven build? Aug 28, 2020 at 8:35
0

I found a working solution to my problem.

The tutorial given here: https://wiki.eclipse.org/Sirius/Tutorials/UpdateSiteTutorial can be applied to Xtext projects as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.