Hi Mikro,
The main ingredients for EMFText code generation are described below.
If the patches are released, please let me know so that I can test them
1) Project structure:
<project root dir>
- pom.xml
+ plugins
+ eclipse-plugin-1
+ model
- "the models"
- genmodel.generate.sources.xml
- pom.xml
+ eclipse-plugin-n
..
2) In eclipse-plugin-1 pom.xml
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<configuration>
<appArgLine>-application org.eclipse.ant.core.antRunner -data
../. -nosplash -buildfile genmodel.generate.sources.xml</appArgLine>
</configuration>
</plugin>
By having data ../. it points to the directory <project root dir>/plugins.
3) In root pom.xml in <pluginmanagement>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<dependencies>
<!-- These EXTRA Eclipse plugin's are loaded by equinox
for EMF -->
<dependency>
<artifactId>org.eclipse.ant.core</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.eclipse.emf.ant</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.eclipse.emf.importer.ecore</artifactId>
<type>eclipse-plugin</type>
</dependency>
<!-- EXTRA Plugin's loaded by Equinox when running this
task for EMFText -->
<dependency>
<artifactId>org.emftext.sdk.ant</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.emftext.sdk.codegen</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.emftext.sdk</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.emftext.sdk.antlr3_4_0</artifactId>
<type>eclipse-plugin</type>
</dependency>
</dependencies>
<!-- One or more repository are required -->
<repositories>
<repository>
<id>eclipse-p2-site-kepler</id>
<layout>p2</layout>
<url>${eclipse-repo}</url>
</repository>
<repository>
<id>emftext-p2</id>
<layout>p2</layout>
<url>${emftext-site3}</url>
</repository>
<repository>
<id>eclipse-orbit-p2</id>
<layout>p2</layout>
<url>${orbit-site}</url>
</repository>
</repositories>
</configuration>
<executions>
<execution>
<goals>
<goal>eclipse-run</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
</plugin>
BR Martien
-----Oorspronkelijk bericht-----
Van: Mirko Seifert [mailto:[email protected]]
Verzonden: Tuesday, March 04, 2014 9:09 AM
Aan: Huijsmans, Martien
CC: EMFText Users
Onderwerp: Re: [EMFText-Users] Patches to get EMFText to work under Tycho
Hi Martien,
this is very good news! I was planning on replacing all class names in
UIClassNameConstants (and also in ClassNameConstants) with fully qualified
names to get rid of the dependencies to Eclipse during code generation. I've
already prepared a test that checks that the fully qualified names refer to
existing classes.
I'm planning on testing the modifications using a yet to be written Maven
plug-in for EMFText. We've recently implemented a Maven plug-in for HEDL (the
Hibernate Entity Definition Language) and I think I can adapt the code to
EMFText.
Nonetheless, it would be good if you could send an example on how you trigger
code generation currently, so we can make sure it works for both cases. Can you
do so?
Regarding the UIGenerationContext patch I'll check how we need to modify this
to work on the command line, within Eclipse and as part of the Maven plug-in.
Cheers,
Mirko
Am 03.03.2014 23:00, schrieb Huijsmans, Martien:
> Hi all,
>
> After some effort, I managed to get EMFText to work under Tycho.
> The current status is that I can use the ant xml scripts that are also
> used in Eclipse. I have not established yet if the generated code is ok.
> To get it to work, I have made changes in some EMFText source files.
> The files are attached.
>
> For UIClassNameConstants.java, I had to replace some of the xyz.class
> code by fully qualified class as a String to solev a:
> java.lang.NoClassDefFoundError:
> org/eclipse/debug/ui/AbstractLaunchConfigurationTab
>
> For UIGenerationContext.java, I has to solve a NPE in public String
> getSyntaxProjectName() and public String
> getProjectRelativePathToSyntaxFile()
> because of a null returned by getWorkspaceFile().
> It returns null because candidates.length==0.
> The fix is probably no good, but this worked for me.
>
> Best regards
>
> Martien Huijsmans
> /Technical Consultant
> /*
> Nspyre
> *Dillenburgstraat 25-3
> 5652 AM Eindhoven
>
> M. +31 (0)6 1000 4307
> E. [email protected]
> W. _www.nspyre.nl <http://www.nspyre.nl/>__
>
> _
>
> *Volg ons op *LinkedIn
> <http://www.linkedin.com/company/215415?goback=%2Efcs_GLHD_nspyre_fals
> e_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2&trk=ncsrch_hits>
> ●Twitter <https://twitter.com/NSPYRE_nl> ●Facebook
> <http://www.facebook.com/NspyreNL>
>
>
>
> _______________________________________________
> emftext-users mailing list
> [email protected]
> http://mail-st.inf.tu-dresden.de/cgi-bin/mailman/listinfo/emftext-user
> s
>
--
Dr.-Ing. Mirko Seifert
Geschäftsführer
DevBoost GmbH
Rungestr. 22-24
10179 Berlin
Tel.: +49 1577 444 1168
E-Mail: [email protected]
Handelsregister Amtsgericht Berlin (Charlottenburg) HRB 140026
Geschäftsführer: Dr. Christian Wende, Dr. Mirko Seifert
If you haven't tried our products yet, take them for spin now:
http://www.nat-spec.com
http://www.hibernate-dsl.com
_______________________________________________
emftext-users mailing list
[email protected]
http://mail-st.inf.tu-dresden.de/cgi-bin/mailman/listinfo/emftext-users