Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Created DSL plug-in don't work on a new Eclipse project(Problems exporting and installing DSL plug-in)
Created DSL plug-in don't work on a new Eclipse project [message #1742108] Wed, 31 August 2016 13:50 Go to next message
Márcio Koch is currently offline Márcio KochFriend
Messages: 57
Registered: August 2013
Member
Hello guys.
I created my DSL, I tested it with "Eclipse Application" and it works fine.
So I have exported my projects as a plug-in, selecting "Deployable plug-ins and fragments" as recomended on the forum and at the xtext documentation. But when I have imported then in a other Eclipse for some tests, they were imported. I created at a new project a new file with my DSL extension but nothing happened. In Eclipse > Installation Detais > Plug-ins it is not shown. If I try to install it through the Help > Install New Software and I point to the directory with the generated plug-in files, Eclipse shows "There are no items available".

Note: I don't have any project with sufix ".sdk" as some comment in some issues at the forum, instead I have a project ".feature".

I have been searched a lot at Google, but without success.
I attached some pictures to facilitate.
I'm gratefull for any help.
  • Attachment: img-02.png
    (Size: 27.41KB, Downloaded 257 times)
  • Attachment: img-01.png
    (Size: 78.88KB, Downloaded 267 times)
  • Attachment: img-03.png
    (Size: 22.07KB, Downloaded 224 times)
  • Attachment: img-04.png
    (Size: 74.93KB, Downloaded 229 times)
Re: Created DSL plug-in don't work on a new Eclipse project [message #1742109 is a reply to message #1742108] Wed, 31 August 2016 13:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
you have to do the following on export:

(1) in the wizard select feature and update site option (this gives you the feature.xml and a category.xml)
(2) rightclick the feature.xml -> Export -> Deployable Features ->
(3) (Select target, on options select category.xml)
(4) Finish

if you choose maven in the wizard the it will create a repository zip for you


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Created DSL plug-in don't work on a new Eclipse project [message #1742113 is a reply to message #1742109] Wed, 31 August 2016 14:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Ps and you should install the plugins and not "import" them

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Created DSL plug-in don't work on a new Eclipse project [message #1742147 is a reply to message #1742113] Wed, 31 August 2016 18:21 Go to previous messageGo to next message
Márcio Koch is currently offline Márcio KochFriend
Messages: 57
Registered: August 2013
Member
Thank you very much, it is working fine now.
To help others perhaps with the same situation, I will tell the steps that I have done:
I'm using Eclipse Neon Release (4.6.0) DSL Tools and xText version 2.10.0.
1) Choose menu File > Export
2) I selected "Plug-in Development > Deployable features", and clicked "Next"
3) In "Available Features" I checked my DSL feature
4) I typed the directory where I would like to save the plug-in
5) In "Options" page I checked "Package as individual JAR archives"
5.1) I checked Generate p2 repository
5.2) I checked Categorize repository: and I selected my "category.xml" file
6) Finally I clicked on "Finish" button.

On other Eclipse instalation I have installed my DSL plug-in:
7) Choose menu Help > Install New Software
8 ) Clicked on button "Add..."
9) After clicked on button "Local..."
10) Pointed to the directory informed in step 4 above (Location field)
11) Typed "My DSL name" in field "Name" and clicked "OK" button
12) Finally I checked my DSL feature and clicked "Finish" button
If Eclipse ask you to restart it, say yes.
After we can create our DSL file and it will use our DSL Editor installed above.
Perhaps it will be necessary to set the xText nature to the project.
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771346 is a reply to message #1742147] Thu, 24 August 2017 09:55 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi,
I followed your steps to export the plugin of my dsl. But in "Available Features" no features are listed. Do I need to click anything before I choose export? Earlier I followed File-> Export->Plug-in Develoment->Deployable plug-ins and fragments->selected the five projects related to my dsl->destinations directory was given->checked package plugins as individual jar archives->finish.

But when I try to install the plug-in through Help -> Install New Software-> Click on Add button->Click on Local button->Select the plug-in folder->Click Ok. It says couldn't find the file. Actually can you explain separately what to choose from these two methods "Deployable plug-ins and fragments" and "Deployable features"?

Thank you.
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771347 is a reply to message #1771346] Thu, 24 August 2017 10:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
did you select to create a feature when creating the xtext project?
if not you need to create it manually.
have a look on what the wizard generates


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771354 is a reply to message #1771347] Thu, 24 August 2017 10:22 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi,
No I didn't choose "create feature" when creating the xtext project. Then I guess I need to create the project again.
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771355 is a reply to message #1771354] Thu, 24 August 2017 10:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
you can create a new feature via the corresponding dialog in eclipse

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771356 is a reply to message #1771355] Thu, 24 August 2017 10:34 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi,
Christian Dietrich wrote on Thu, 24 August 2017 10:24
you can create a new feature via the corresponding dialog in eclipse


What did you mean by corresponding dialog in eclipse?
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771357 is a reply to message #1771356] Thu, 24 August 2017 10:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
file -> new -> other -> feature project

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771454 is a reply to message #1771357] Fri, 25 August 2017 08:17 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi,
"5.2) I checked Categorize repository: and I selected my "category.xml" file". In my case I don't have a category.xml file. I have feature.xml and two plugin.xml files.

To create the xtext project what I did was file->new->project->xtext->xtext project->gave names for project and extensions->checked 'create feature' in facets ->finish. I followed this path because "file -> new -> other -> feature project " in this way no xtext projects create.

Haven't I followed a correct path?
Thank you.
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771457 is a reply to message #1771454] Fri, 25 August 2017 08:44 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi,
I had followed the following procedure later.

- created a new feature project
- added the plugins of my dsl to the feature project
- used the export -> deployable features wizard

But again "category.xml" file is missing. How can I find it?
Thank you.

[Updated on: Fri, 25 August 2017 08:45]

Report message to a moderator

Re: Created DSL plug-in don't work on a new Eclipse project [message #1771464 is a reply to message #1771457] Fri, 25 August 2017 09:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Create it there is a wizard as well (category definition I think)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771467 is a reply to message #1771464] Fri, 25 August 2017 10:52 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi,
I am sorry. I didn't understand "Create it there is a wizard as well (category definition I think) ".
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771472 is a reply to message #1771467] Fri, 25 August 2017 11:32 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi,
Actually I don't have a .sdk project to create the category definition. What needs to be selected to create the category definition? I have the following projects.
1.mydsl project
2.mydsl.feature project
3.mydsl.ide project
4.mydsl.tests project
5.mydsl.ui project
6.mydsl.ui.tests project

I am using Eclipse Neon.

You have explained earlier to use the .sdk project.
Quote:

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.

[Updated on: Fri, 25 August 2017 11:35]

Report message to a moderator

Re: Created DSL plug-in don't work on a new Eclipse project [message #1771476 is a reply to message #1771472] Fri, 25 August 2017 12:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Take the feature project ??????????

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Created DSL plug-in don't work on a new Eclipse project [message #1771505 is a reply to message #1771476] Fri, 25 August 2017 19:52 Go to previous messageGo to next message
Udeshika Sewwandi is currently offline Udeshika SewwandiFriend
Messages: 118
Registered: March 2017
Senior Member
Hi Christian,
Yes that worked. Thank you very much.
Re: Created DSL plug-in don't work on a new Eclipse project [message #1786086 is a reply to message #1771505] Wed, 25 April 2018 11:44 Go to previous message
Márcio Koch is currently offline Márcio KochFriend
Messages: 57
Registered: August 2013
Member
Hi all,
Another very easy step to export your dsl plug-in is using Maven, e.g. open your prompt command (I'm using Windows) go to your parent xtext project directory and type mvn clean install. The plug-in artifacts are generated into the ...youdsl.repository/target/repository folder. The repository contents are your plug-in that should be installed in another Eclipse.
Previous Topic:Breakpoint in xtext dsl editor
Next Topic:quickfix support theia/vscode ides
Goto Forum:
  


Current Time: Fri Apr 19 23:04:38 GMT 2024

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

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

Back to the top