Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [SOLVED] Deploying an Xtext plugin that references another Xtext plugin
icon5.gif  [SOLVED] Deploying an Xtext plugin that references another Xtext plugin [message #1330321] Sat, 03 May 2014 15:55 Go to next message
Davide G is currently offline Davide GFriend
Messages: 36
Registered: October 2013
Member
Hi, i developed an Xtext plugin(A) that requires another Xtext plugin(B). I integrated B into A by deploying B as plugin (File->Export->deployable plug-ins and fragments) and importing it into A by copying into a folder of this project, and then by adding the jar to the A project classpath (Right click to jars->Build path->Add to Build Path). The problem is that when I deploy A some error occurs in the classes that references to the imported B project jar (The errors are like "The import ... cannot be resolved"). Cleaning the project had no effects. I noticed that when I selected Project->Plugin tools-> Update Classpath the imported jar were automatically removed from the classpath.
Any idea? Sad

[Updated on: Mon, 05 May 2014 08:01]

Report message to a moderator

Re: Deploying an Xtext plugin that references another Xtext plugin [message #1330329 is a reply to message #1330321] Sat, 03 May 2014 15:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i do not understand what you are doing. usually you set a simple plugin dependency (manifest.mf) and it works fine.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Deploying an Xtext plugin that references another Xtext plugin [message #1330365 is a reply to message #1330329] Sat, 03 May 2014 16:22 Go to previous messageGo to next message
Davide G is currently offline Davide GFriend
Messages: 36
Registered: October 2013
Member
The problem is that even if I imported the jar, when i deploy the plugin it seems that the jar are not included in the plugin, in fact I get the error "The import ... cannot be resolved".

Here's what i've done:
- I created an Xtext project, named B.
- I deployed B as plugin (jar)
- I created another Xtext plugin(named A), that requires some classes in B, so I created a folder into A called "libraries" where i put the previously generated jar of project B.
- I added the jar to the project A classpath by selecting Right Click->Build Path-> Add to the build path.
- I deployied A as jar plugin, but here i get the errors.

[Updated on: Sat, 03 May 2014 16:37]

Report message to a moderator

Re: Deploying an Xtext plugin that references another Xtext plugin [message #1330394 is a reply to message #1330365] Sat, 03 May 2014 16:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
HI,

why dont you use eclipse project dependencies????????????
and simply deploy 2 plugins ?!?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Sat, 03 May 2014 16:42]

Report message to a moderator

Re: Deploying an Xtext plugin that references another Xtext plugin [message #1330402 is a reply to message #1330394] Sat, 03 May 2014 16:46 Go to previous messageGo to next message
Davide G is currently offline Davide GFriend
Messages: 36
Registered: October 2013
Member
You mean: do not deploy the project B, but instead set a project dependency and then export the two plugins, right?

edit: i used project dependencies but I had the same errors. I added the required projects as project dependencies to the first project, but the deploy failed. Also, when i select "Update class path" from Plugin tools menu, the references to the projects into the project dependencies are deleted.

[Updated on: Sat, 03 May 2014 17:07]

Report message to a moderator

Re: Deploying an Xtext plugin that references another Xtext plugin [message #1330452 is a reply to message #1330402] Sat, 03 May 2014 17:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
HI,

you have to set a plugin dependency and make sure that both plugins are finally deployed. this is done in 1000 projects
and works fine.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Deploying an Xtext plugin that references another Xtext plugin [message #1330453 is a reply to message #1330402] Sat, 03 May 2014 17:25 Go to previous messageGo to next message
Davide G is currently offline Davide GFriend
Messages: 36
Registered: October 2013
Member
Ok i got it. I imported correctly the jar plugin, BUT i missed referencing in the Dependencies section of the plugin.xml file. Laughing
Re: Deploying an Xtext plugin that references another Xtext plugin [message #1330468 is a reply to message #1330453] Sat, 03 May 2014 17:32 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
the information is actually stored in manifest.mf but yes thats it

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Automatic handling of TODO comments
Next Topic:How to get content assist to work with table names from a database
Goto Forum:
  


Current Time: Sat Apr 20 02:25:27 GMT 2024

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

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

Back to the top