Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Publishing my DSL as a plugin?(Is there an easy way?)
Publishing my DSL as a plugin? [message #725570] Thu, 15 September 2011 08:50 Go to next message
Phil R is currently offline Phil RFriend
Messages: 99
Registered: September 2011
Member
Hi all,

I'm a beginner at XText but I have already problems to get a plugin for my DSL.
I've been trying to generate a plugin from the 15 min. tutorial DSL example. The DSL works as I can run from the Xtext project a new Eclipse application where everything works fine (syntax coloring etc...). The problems start when I want to package the DSL in a plugin so that the DSL can be used in a new fresh Eclipse SDK for others. I have followed the tutorial at kthoms.wordpress.com/2010/11/12/setting-up-a-rcp-product-for-a-dsl/ but at step 7 the project crashes. I've added the log below.
Also this tutorial does not give me a plugin but a whole new Eclipse Application.
Is there an easy way to get the plugin out of this Xtext project?

Regards,
Phil

!SESSION 2011-09-15 10:21:00.002 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=nl_BE
Framework arguments:  -product org.example.domainmodel.product.product
Command-line arguments:  -product org.example.domainmodel.product.product -data C:\Workspaces\FOWorkspace/../runtime-domainmodel.product -dev file:C:/Workspaces/FOWorkspace/.metadata/.plugins/org.eclipse.pde.core/domainmodel.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

!ENTRY org.eclipse.osgi 4 0 2011-09-15 10:21:02.828
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry. The applications available are: org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.ant.core.antRunner, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.equinox.app.error.
	at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
	at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Re: Publishing my DSL as a plugin? [message #725576 is a reply to message #725570] Thu, 15 September 2011 09:08 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Use "File / Export / Plug-in Development / Deployable features". Export your DSL feature to another Eclipse installation. You could also consider creating a Dropins Folder to deploy to.

~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Publishing my DSL as a plugin? [message #725582 is a reply to message #725576] Thu, 15 September 2011 09:31 Go to previous messageGo to next message
Phil R is currently offline Phil RFriend
Messages: 99
Registered: September 2011
Member
Ok, thank you! I'll check it out.
Re: Publishing my DSL as a plugin? [message #725929 is a reply to message #725582] Fri, 16 September 2011 08:14 Go to previous messageGo to next message
Phil R is currently offline Phil RFriend
Messages: 99
Registered: September 2011
Member
this works but the Eclipse application where the plugin will be deployed to must have the Xtext framework installed. How can I package my DSL plugin with the minimum dependencies of the Xtext framework to get it working for an Eclipse application without the Xtext framework installed?
It is important for me to have the installation of the plugin for users easy.

My plugin.xml file :
http://img412.imageshack.us/img412/7290/eclipsepluginproblem.jpg
I have questions marked at the required plugins (in the green box), but no information is given why Eclipse is alerting those questions. How to find out what those question marks means? Could that be the problem?

[Updated on: Fri, 16 September 2011 10:02]

Report message to a moderator

Re: Publishing my DSL as a plugin? [message #725968 is a reply to message #725929] Fri, 16 September 2011 09:55 Go to previous messageGo to next message
Michel Simeon is currently offline Michel SimeonFriend
Messages: 130
Registered: December 2009
Senior Member
You could create an update site project (New -> plug-in Development -> Update Site project), which will include all required dependencies. Then you can distribute the update site as a single zip file. Your users would then need to (i) unzip the file to get a local update site; and (ii) use Help -> Install New Software to add the site to the list and install from it.

To find out what is the minimum list of dependencies you could define a run configuration for your application, look at the list of required plug-ins, and substract from the list what would already be in your users installation (the minimum being the distribution of the bare Eclipse Platform.

You will most likely need to include:
- the plug-ins that make your application
- a number of "modelling bits" :
de.itemis.xtext.antlr
org.eclipse.emf.common
org.eclipse.emf.common.ui
org.eclipse.emf.ecore
org.eclipse.emf.ecore.change
org.eclipse.emf.ecore.edit
org.eclipse.emf.ecore.xmi
org.eclipse.emf.edit
org.eclipse.emf.edit.ui
org.eclipse.emf.mwe.core
org.eclipse.emf.mwe.utils
org.eclipse.emf.mwe2.runtime
org.eclipse.emf.mwe2.lib
org.eclipse.xpand
org.eclipse.xtend
org.eclipse.xtend.typesystem.emf
org.eclipse.xtext
org.eclipse.xtext.builder
org.eclipse.xtext.generator
org.eclipse.xtext.logging
org.eclipse.xtext.ui
org.eclipse.xtext.ui.shared
org.eclipse.xtext.util

and also:

com.google.collect
com.google.inject
org.antlr.generator
org.antlr.runtime
org.aopalliance
org.apache.commons.cli
org.apache.commons.lang
org.apache.log4j
org.eclipse.ant.launching
org.eclipse.ant.ui
org.eclipse.ui.views.log
org.hamcrest.core
org.junit

Hope this helps
MS
Re: Publishing my DSL as a plugin? [message #725972 is a reply to message #725968] Fri, 16 September 2011 10:09 Go to previous messageGo to next message
Phil R is currently offline Phil RFriend
Messages: 99
Registered: September 2011
Member
Thank you Michel for your help, I'll work it out.
Re: Publishing my DSL as a plugin? [message #725994 is a reply to message #725972] Fri, 16 September 2011 11:21 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Project Spray has an automated build for that based on Maven Tycho. It is a good reference for building Xtext plugins including an Eclipse Repository from command line.

~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Publishing my DSL as a plugin? [message #726745 is a reply to message #725994] Mon, 19 September 2011 12:20 Go to previous message
Phil R is currently offline Phil RFriend
Messages: 99
Registered: September 2011
Member
Michel and Karsten, I would like to thank you for your support!

Regards,
Phil

[Updated on: Mon, 19 September 2011 12:21]

Report message to a moderator

Previous Topic:The generated @Inject constructor in the label provider
Next Topic:download.itemis.com is down
Goto Forum:
  


Current Time: Thu Apr 25 01:32:21 GMT 2024

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

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

Back to the top