Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPand] The EMF Typesystem
[XPand] The EMF Typesystem [message #524240] Wed, 31 March 2010 10:02 Go to next message
Federico Tomassetti is currently offline Federico TomassettiFriend
Messages: 190
Registered: July 2009
Location: Dublin
Senior Member

Hello,
I have a created an EMF project containing an ecore file. It is exported in the plugin.xml file:

<plugin>

   <extension point="org.eclipse.emf.ecore.generated_package">
      <package
            uri="http://softeng.polito.it/moma/des"
            class="it.polito.softeng.moma.des.des.DesPackage"
            genModel="model/des.genmodel"/>
   </extension>

</plugin>


I created then an XPand project, added the project containing the ecore file as dependency and checked that the EMF typesystem is used in the configuration.

When I create an XPand template I do not have access to my ecore package. It is not listed in autocompletion when I use the directive "import".

What should I check? What am I missing?

Thank you,

Federico

P.S. I am using Xpand 0.7.2


Re: [XPand] The EMF Typesystem [message #524244 is a reply to message #524240] Wed, 31 March 2010 10:14 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
If you have generated Java code you have the option to either use the
emf metamodel adapter or the JavaBeans metamodel adapter. I recommend to
use the latter, because it then you don't have an impedance missmatch as
soon as you switch to java (i.e. JAVA extensions). Also the tooling is a
bit better, because it leverages JDT.

If you use Java the imports are of the form:

<<IMPORT my::java::pack>>

if you use ecore the form is:

<<IMPORT packageName>>

Note that it is the package's name not its URI.

Does that help?

Sven


Federico Tomassetti schrieb:
> Hello, I have a created an EMF project containing an ecore file. It is
> exported in the plugin.xml file:
>
>
> <plugin>
>
> <extension point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http://softeng.polito.it/moma/des"
> class="it.polito.softeng.moma.des.des.DesPackage"
> genModel="model/des.genmodel"/>
> </extension>
>
> </plugin>
>
>
> I created then an XPand project, added the project containing the ecore
> file as dependency and checked that the EMF typesystem is used in the
> configuration.
>
> When I create an XPand template I do not have access to my ecore
> package. It is not listed in autocompletion when I use the directive
> "import".
>
> What should I check? What am I missing?
>
> Thank you,
>
> Federico
>
> P.S. I am using Xpand 0.7.2


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [XPand] The EMF Typesystem [message #524247 is a reply to message #524244] Wed, 31 March 2010 10:26 Go to previous message
Federico Tomassetti is currently offline Federico TomassettiFriend
Messages: 190
Registered: July 2009
Location: Dublin
Senior Member

It helps because the JavaBeans metamodel is working, I still do not understand why the EMF metamodel do not but now I am not stuck.

Once again thank you Sven!


Previous Topic:Proposal provider for a rule
Next Topic:[Xpand] unresolved proxy between ecore models
Goto Forum:
  


Current Time: Fri Apr 26 12:04:47 GMT 2024

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

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

Back to the top