Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Stand allone xtext application
Stand allone xtext application [message #754060] Mon, 31 October 2011 15:52 Go to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
What is the easiest way to get a stand allone xtext text editor with eclipse indigo on a windows platform? It should have a text editor, an outline view and a file menu.
Is it better to export a runnable jar or to use rcp? I found these tutorials, but could not get them running with eclipse indigo and xtext 2.1:

http://zarnekow.blogspot.com/2010/06/how-to-deploy-xtext-standalone.html

http://kthoms.wordpress.com/2010/11/12/setting-up-a-rcp-product-for-a-dsl/

Do you know a tutorial and/or example files that are up to date and can be used by a newbe like me?

[Updated on: Wed, 02 November 2011 12:14]

Report message to a moderator

Re: Stand allone xtext application [message #754065 is a reply to message #754060] Mon, 31 October 2011 16:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi,

both scenarios you describe are totally different. if you want to deliver an editor you have to go the product way. karstens blog should be sufficient as a tutorial for this.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Stand allone xtext application [message #754183 is a reply to message #754065] Tue, 01 November 2011 09:03 Go to previous messageGo to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
Hi Christian,

thank you for your answer. If I import the example files from Karstens blog
(http://dl.dropbox.com/u/662339/Blogs/XtextExampleProduct.zip)
I get following error:

http://matameko.wikispaces.com/file/view/eclipse_error.png/270545300/eclipse_error.png

I guess the problem is that I use a newer verson of xtext than Karsten did?
How do I have to modify this lines for xtext 2.1?

Best regards,

Stefan

[Updated on: Wed, 02 November 2011 12:14]

Report message to a moderator

Re: Stand allone xtext application [message #754189 is a reply to message #754183] Tue, 01 November 2011 09:45 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi, just create a New project with the wizard and Compare the two Workflow Files.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Stand allone xtext application [message #754204 is a reply to message #754189] Tue, 01 November 2011 11:17 Go to previous messageGo to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
Ok,

i replaced the

lines

// outline API 
fragment = outline.TransformerFragment {}
fragment = outline.OutlineNodeAdapterFactoryFragment {}
fragment = outline.QuickOutlineFragment {}


with

// outline API
fragment = outline.OutlineTreeProviderFragment {}
fragment = outline.QuickOutlineFragment {}


and the workflow file works. I also can run an eclipse application to test the dsl.


The export of the product does not work. Therefore I changed

the Plug-ins in feature.xml of org.xtext.example.mydsl.platform.feature:

- updated versions of
com.google.collect
org.eclipse.xtend.typesystem.emf
org.eclipse.xtext.xtend
- removed
de.itemis.xtext.antlr
org.antlr.gen
org.eclipse.xtend.typesystem.emf.xsd
org.eclipse.xtend.util.stdlib

Now I get following error when I try to export the product:

http://matameko.wikispaces.com/file/view/eclipse_error2.png/270563742/eclipse_error2.png

I could not find a file "build.xml". Do I have to add other plugins to
the platform feature? Is it for example ok to remove "org.eclipse.xtend.util.stdlib" or do I have to find some replacement?

Or do I somehow have to change the product settings?


[Updated on: Tue, 01 November 2011 11:21]

Report message to a moderator

Re: Stand allone xtext application [message #754206 is a reply to message #754204] Tue, 01 November 2011 11:30 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

you should not stick too much to an outdated sampleproject. the blog describes semantically everything you need to get it running (even with Xtext 2.0.1). if you insist on the old code why dont you use a old helios with Xtext 1.0.2 then?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Stand allone xtext application [message #754324 is a reply to message #754206] Wed, 02 November 2011 06:43 Go to previous messageGo to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
Hi Christian,

at first I tried to follow the descriptions in the blog. That did not work for me. Then I asked in this forum for help or an working example because it takes me a loooong time as newbe to go the trial and error way and for experts it might only take a few minutes to adapt the (maybe) old code/tutorial. I am always not sure if I for example pushed a single wrong butten or if there is an error/not up to date information in the tutorial.

Then I thougt I can go on by using the finished files and ask for support to overcome the concrete issues. Now I am at the starting point again.
If I would follow the descriptions I would end at the same problem: not knowing which plugins I have to include in the platform feature.

I really dont want to stick on outdated sampleprojects. And I would like to use up to date code to be ready for the future and further developments. If it is so easy for you to follow the descriptions ... please do it and post the resulting files for me.

And thank you anyway because I got at least a little further.

Stefan
Re: Stand allone xtext application [message #754491 is a reply to message #754324] Wed, 02 November 2011 18:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

Still dont not get your problem. I highly recommend some tutorials on eclipse plugindevelopment / features / products etc.

(1) take a clean workspace
(2) create a new Xtext project
(3) generate the Language
(4) generate the product project
(5) generate the feature and add
org.xtext.example.mydsl
org.xtext.example.mydsl.product
org.xtext.example.mydsl.ui

(6) create the platform feature*
(7) configure the product (plugin.xml)
(Cool do the .product file
(9) export it hand have fun

* if you do not exactly know what to add here
use the validate button (top right) of the dialog in step 8
you might use the feature.xml from karstens blog as a start

here is my quick and dirty result

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.xtext.example.mydsl.platform.feature"
      label="Feature"
      version="1.0.0.qualifier">

   <description url="http://www.example.com/description">
      [Enter Feature Description here.]
   </description>

   <copyright url="http://www.example.com/copyright">
      [Enter Copyright Description here.]
   </copyright>

   <license url="http://www.example.com/license">
      [Enter License Description here.]
   </license>

   <includes
         id="org.eclipse.rcp"
         version="0.0.0"/>

   <includes
         id="org.eclipse.platform"
         version="0.0.0"/>

   <includes
         id="org.eclipse.jdt"
         version="0.0.0"/>

   <plugin
         id="org.eclipse.xtend.util.stdlib"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.mwe2.runtime"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="com.google.inject"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.antlr.runtime"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.apache.commons.cli"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.apache.commons.lang"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.apache.log4j"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.common"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.ecore"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.ecore.edit"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.ecore.xmi"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.mwe.core"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.mwe.utils"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xpand"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtend"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtend.typesystem.emf"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.util"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtend.typesystem.xsd"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.aopalliance"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.ui.shared"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.edit"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xsd"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.edit.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.emf.common.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ui.views.log"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.apache.commons.logging"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.hamcrest.core"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ecf.provider.filetransfer"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="de.itemis.xtext.antlr"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="com.ibm.icu"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.ui.console"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.builder"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.xbase.lib"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.xtend2.lib"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="com.google.collect"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.common.types"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.ui.codetemplates.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.common.types.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.ui.codetemplates"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.antlr.generator"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature>



~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Stand allone xtext application [message #754563 is a reply to message #754491] Thu, 03 November 2011 09:56 Go to previous messageGo to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
Hi Christian,

thank you very much! It works now. My zipped example workspace can be found here:
http://matameko.wikispaces.com/file/view/xtext_rcp_product.zip/271401864/xtext_rcp_product.zip

I used this eclipse download:
http://download.itemis.com/distros/eclipse-SDK-3.7-Xtext-2.0.1-win32.zip

(The product export sometimes did not create an exe file. Deleting old export files or changing the export path worked for me.)

Sunny regards,

Stefan
Re: Stand allone xtext application [message #833629 is a reply to message #754563] Sat, 31 March 2012 20:14 Go to previous message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
(You might need some extra java installations to get my example running, e.g. 1.5. Error messages will tell you the missing versions.)

[Updated on: Sat, 31 March 2012 20:15]

Report message to a moderator

Previous Topic:Grammar: Multiple alternative
Next Topic:How to implement Cut & Paste using EObject
Goto Forum:
  


Current Time: Fri Apr 19 23:12:14 GMT 2024

Powered by FUDForum. Page generated in 0.04023 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top