using xtend within eclipse rcp!

106 views
Skip to first unread message

Andreas Schäfer

unread,
Sep 4, 2014, 7:57:52 AM9/4/14
to xtend...@googlegroups.com
Hello everybody!

I'm trying to add xtend to an existing target Plattform of an eclipse rcp (3.8x) application (its working with a target definition file).

So I went to:
http://www.eclipse.org/xtend/download.html

Installed xtend for my standart Eclipse Luna from the update site, and then
I downloaded the runtime libraries xtend and xbase and copied them into the target platform.
But this did not work...
(when I doubleclick on the target definition file I cant choose the newer version 2.6.2 of xtend, only the 2.3.1 wich was there before. Do I have the wrong jars?)

So I tryed to add the libraries in the manifest in the runtime/classpath and in the build tab in the soruce build, binary build and at runtime information I added the libraries (the 2 .jars) and their folder.

Still I get "java.lang.NoClassDefFoundError: org/eclipse/xtend/lib/macro/AbstractClassProcessor" ...

(google.guava is in the target platform already and there is nur failure with it... so)

I'm quite new to plugin development and xtend and it seems that I dont understand the installation instructions for the xtend library.
But I really need this to work.

Can somebody please help me?

Vlad Dumitrescu

unread,
Sep 4, 2014, 9:48:06 AM9/4/14
to xtend...@googlegroups.com
Hi Andreas,

I don't know if this is "The Right Way" for RCP, but I am adding the xtend libraries to my project, not to the target. Since they are included, I don't need to have them installed separately.

regards,
Vlad



--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dennis Hübner

unread,
Sep 5, 2014, 4:29:39 AM9/5/14
to xtend...@googlegroups.com
Hi Andreas,
you need to change your target platform definition file by adding a new location.
Open your *.target file with a text editor and add following into the <locations>...</locations> tag:
<locations>
...

<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.redist.feature.group" version="0.0.0"/>
</location>

...
</locations>

Andreas Schäfer

unread,
Sep 5, 2014, 5:44:45 AM9/5/14
to xtend...@googlegroups.com
Hm, ok, did that and now my targetDef. File looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="Eclipse 3.8.x 32-Bit" sequenceNumber="74">

<locations>
<location path="${workspace_loc}/targetPlatform/artop/4.0.2/eclipse" type="Directory"/>
<location path="${workspace_loc}/targetPlatform/eclipse 3.8.x 32-Bit/" type="Directory"/>

<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.redist.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases"/>
</location>
</locations>

<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
</target>


But he still says unable to locate installable Unit. (Tryed to hit the update button many times but same result.)

By the way: Does somebody know why I can't just copy the runtime library jars into the specified folders of the target platform (it also does not work...) I thought this is also a "normal" way to add a plugin to the targetPlatform?

Dennis Hübner

unread,
Sep 5, 2014, 10:16:03 AM9/5/14
to xtend...@googlegroups.com
But he still says unable to locate installable Unit. (Tryed to hit the update button many times but same result.)
Could you say what exactly can not be located?

By the way: Does somebody know why I can't just copy the runtime library jars into the specified folders of the target platform (it also does not work...) I thought this is also a "normal" way to add a plugin to the targetPlatform?
A normal way is to use a p2 repository or an eclipse installation IMHO. I'm also not sure if location type "Directory" can handle transitive dependencies.  

Andreas Schäfer

unread,
Sep 5, 2014, 10:27:02 AM9/5/14
to xtend...@googlegroups.com
Hm ok, I have to use the target platform that is given to me, not my decision.

But it works now!
Was a combination of Mistakes.
At first it wasn't the right thing to add the library via right clicking at plugin project (build path -> add xtend library).
I had a mistake in the runtime tab too (exported package was wrong) and this(?) caused somehow another bug, wich set source.. = (null) in the build.properties.
After correcting this everything works like intended now!
A big thank you for your answers, it helped me finding the correct path!
Reply all
Reply to author
Forward
0 new messages