Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [SOLVED] How to deploy an Xtext plugin on a clean Eclipse ?
[SOLVED] How to deploy an Xtext plugin on a clean Eclipse ? [message #1373845] Thu, 22 May 2014 10:52 Go to next message
Etienne de Sarrieu is currently offline Etienne de SarrieuFriend
Messages: 4
Registered: May 2014
Junior Member
Hi,

Sorry for this probably easy question for some of you, but I spent much time on internet and with various solutions without getting a proper answer to my problem:

I need to deploy an Xtext plugin on an existing Eclipse CDT: so I need to deploy first Xtext runtime, am I wrong ?

-> I tried to do it, but when I start this Eclipse (Xtext Runtime installed) with my Xtext plugins (composed of org.xtext.example.mydsl.tests_1.0.0.201404271003.jar, org.xtext.example.mydsl.ui_1.0.0.201404271003.jar and org.xtext.example.mydsl_1.0.0.201404271003.jar) I get the following message :

!ENTRY org.eclipse.ui 2 0 2014-05-22 12:15:23.440
!MESSAGE Warnings while parsing the key bindings from the 'org.eclipse.ui.commands' extension point
!SUBENTRY 1 org.eclipse.ui 2 0 2014-05-22 12:15:23.440
!MESSAGE Cannot bind to an undefined command: plug-in='org.eclipse.xtext.ui', id='org.eclipse.xtext.ui.editor.outline.QuickOutline'


And I cannot find any explanation on what this means. And of course, my plugin does not work (files of proper extension are not displayed as it is when I test in "Run As" configuration from my Xtext dev environment, with Xtext SDK).



Thank you by advance for your help Smile


(To be more precise, my final objective is to produce a full package that can be deployed in one shot on an existing Eclipse CDT - which does not contains any Xtext component - so if you have an easy way to achieve that I am interested !)

[Updated on: Fri, 23 May 2014 08:49]

Report message to a moderator

Re: How to deploy an Xtext plugin on a clean Eclipse ? [message #1374391 is a reply to message #1373845] Thu, 22 May 2014 16:13 Go to previous messageGo to next message
Stefan Prisca is currently offline Stefan PriscaFriend
Messages: 11
Registered: July 2013
Junior Member
Hi Etienne,

You can try to make a feature project. You can afterwards export it as a p2 repository and install it in the fresh Eclipse IDE.

You need to make sure to include all the necessary xtext plug-ins though, as well as your org.xtext.example.mydsl.ui and org.xtext.example.mydsl plug-ins.

Your feature.xml file should look something like this.[1] This is just a minimum list of dependencies that worked for me.

Hope this helps!

Best Regards,
Stefan.

[1]:

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.xtext.example.mydsl.sdk"
      label="MyDsl SDK Feature "
      version="1.0.0.qualifier">
<plugin
         id="org.xtext.example.mydsl"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.xtext.example.mydsl.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.ecore"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.generator"
         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.codetemplates"
         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.ui.ecore"
         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.xtext.xbase"
         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.xbase.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.xtext.xtext.ui"
         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.eclipse.emf.mwe.utils"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

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

   <plugin
         id="org.eclipse.emf.codegen"
         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.emf.mwe2.language"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

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

   <plugin
         id="org.eclipse.emf.mwe2.lib"
         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="org.eclipse.xtext"
         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.common.types"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

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

   <plugin
         id="org.eclipse.xtend.lib"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>
</feature>
Re: How to deploy an Xtext plugin on a clean Eclipse ? [message #1374811 is a reply to message #1374391] Thu, 22 May 2014 20:20 Go to previous messageGo to next message
Etienne de Sarrieu is currently offline Etienne de SarrieuFriend
Messages: 4
Registered: May 2014
Junior Member
Thank you very much Stefan.

I tried it, I succeeded in exporting my feature (great !), so first step is ok, unfortunately I fail at deploying it in Eclipse (read some tutorial but I do not find the problem...): I do not want to use an update site, so I exported it by Selecting the "Directory" option in "Destination" tab, and in the "Options" tab if I unchek "Package as individual JAR archives", then I get two folders (plufins and features) that I copy in my target Eclipse "dropins" folder: anything happens, no error log appended in .log file, no mention of the plugin in installed plugins list, and expected behavior (editor for a given file extension) doe not appear.
I also tried to check "Package as individual JAR archives" and to copy the files and folders in "dropins", but I have the following error :

Quote:

!ENTRY org.eclipse.equinox.p2.core 4 0 2014-05-22 21:34:17.514
!MESSAGE Provisioning exception
!STACK 1
org.eclipse.equinox.p2.core.ProvisionException: No repository found at jar:file:/D:/MyCLEANTest/eclipse/dropins/content.jar!/.


that makes me think that I am doing something not expected by Eclipse.

If you have any idea of how to debug or what I am doing wrong do not hesitate to tell !
I will continue to work on this tomorrow (I am french - sorry for my english - and here it is time to go to sleep...).

Regards,

Etienne
Re: How to deploy an Xtext plugin on a clean Eclipse ? [message #1374849 is a reply to message #1374811] Thu, 22 May 2014 20:45 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13314
Registered: July 2009
Senior Member
Hi,

i am not sure what your problem is.
the xtext wizard creates a project yourdsl.sdk
this project can be used to create a p2 repository (update site) containing your plugins.

therefore

(1) create a new category definition in the sdk project. give it a name and add the org.xtext.example.mydsl.sdk featur
(2) rightclick on the feature.xml
(3) export -> deployable features
(4) choose a location (folder or zip)
(5) under options choose the category.xml file created before
(6) hit finish

if you add this update site + one containing xtext (you may download the all in one repo zip http://www.eclipse.org/modeling/tmf/downloads/?project=xtext), then p2 should do all dependency magic for you.

alternatively you could use build tools like buckminister or maven tycho to create the update site or even a complete product.


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 22 May 2014 20:47]

Report message to a moderator

Re: How to deploy an Xtext plugin on a clean Eclipse ? [message #1374866 is a reply to message #1374849] Thu, 22 May 2014 20:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13314
Registered: July 2009
Senior Member
P.S: and make sure you dont have any warning on build.properties files in your projects

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to deploy an Xtext plugin on a clean Eclipse ? [message #1375741 is a reply to message #1374811] Fri, 23 May 2014 05:39 Go to previous messageGo to next message
Stefan Prisca is currently offline Stefan PriscaFriend
Messages: 11
Registered: July 2013
Junior Member
Hello again Etienne,

An Eclipse p2 repository should have the following layout:

<site root>/
    content.jar
    artifacts.jar
    features/
        feature archives   (eg. org.eclipse.javatools_1.0.1.jar)
    plugins/
        plug-in archives   


You should not copy the folders from the p2 repository anywhere. After you export your feature in the repository, use the Eclipse update manager to install your DSL feature from that repository directly.

Here is an article on how to use eclipse update manager [1]. You will have to chose the local path to your p2 repository. (You can do this by Add New -> Local and select the repository folder).

Best Regards,
Stefan

[1] http://www.day.com/eclipse.html/
Re: How to deploy an Xtext plugin on a clean Eclipse ? [message #1375952 is a reply to message #1375741] Fri, 23 May 2014 07:37 Go to previous messageGo to next message
Etienne de Sarrieu is currently offline Etienne de SarrieuFriend
Messages: 4
Registered: May 2014
Junior Member
OK thank you for both of you, indeed it seems better to deploy through an update site (I knew this procedure, but I found it more complicated than just copying files in "dropins"). Above all, I have now a precise explanation of something wrong in my dependencies :

Quote:
Cannot complete the install because one or more required items could not be found.
Software being installed: MyDsl SDK Feature 1.0.0.201405230927 (org.xtext.example.mydsl.myfeature.sdk.feature.group 1.0.0.201405230927)
Missing requirement: Modeling Workflow Engine 2 Runtime 2.6.0.v201405070412 (org.eclipse.emf.mwe2.runtime 2.6.0.v201405070412) requires 'bundle com.google.inject 3.0.0' but it could not be found
Cannot satisfy dependency:
From: MWE2 Lib 2.6.0.v201405070412 (org.eclipse.emf.mwe2.lib 2.6.0.v201405070412)
To: bundle org.eclipse.emf.mwe2.runtime 2.3.0
Cannot satisfy dependency:
From: MyDsl SDK Feature 1.0.0.201405230927 (org.xtext.example.mydsl.myfeature.sdk.feature.group 1.0.0.201405230927)
To: org.eclipse.emf.mwe2.lib [2.6.0.v201405070412]


But now I think I can solve this problem by myself, I will add missing dependencies to my feature until everything is allright. I keep you informed of the final resolution, thank you again you saved me !
Re: How to deploy an Xtext plugin on a clean Eclipse ? [message #1376079 is a reply to message #1375952] Fri, 23 May 2014 08:49 Go to previous message
Etienne de Sarrieu is currently offline Etienne de SarrieuFriend
Messages: 4
Registered: May 2014
Junior Member
I had several successive problems : when all dependencies seemed resolved, failing while installing : I had to uncheck "contact all update sites ..." from install window, then I had to add other dependencies in my feature, and finally, installation did not work due to a strange error about repository... But then I tried to put my plugins in the dropins folder and it worked Question

I did not understand everything, but I learned some thanks to you. It is OK for me, topic resolved, thanks again Thumbs Up !

Hope this topic will bring some help to other people at the same level of knowledge than me.
Previous Topic:Xtext 2.6 Available
Next Topic:Set values to an object by changing references.
Goto Forum:
  


Current Time: Wed Jan 22 16:25:05 GMT 2020

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

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

Back to the top