Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Trouble customizing widget generation((in order to make generated code use my custom widgets, without having to customize generted code))
[EEF] Trouble customizing widget generation [message #1721560] Thu, 28 January 2016 10:22
Francois Cabrol is currently offline Francois CabrolFriend
Messages: 32
Registered: January 2015
Member
Hi everyone,

I have trouble customizing EEF's widget generation by following the method described in wiki page https://wiki.eclipse.org/EEF/User_Guide/Custom_Widget_Generation

To describe my problem shortly, it seems that my EEF generator overrides are ignored. Details follow.

I am using Eclipse Mars and the following components:
• EEF SDK version 1.5.0.201505291308
• Acceleo version 3.6.2.201510121214

I have created a new Acceleo project in order to override the standard EEF generator. If I understood well, I have to compile my .mtl files to .emtl files in order to package my plugin so that it is taken into account at EEF generation.

==> Is my understanding correct ?

According to this message https://www.eclipse.org/forums/index.php?t=msg&th=812368&goto=1435399&#msg_1435399, it seems that Maven packaging is mandatory to do so.

I have not managed to find the version 3.6.2 of Acceleo's Maven plugins, so I used version 3.6.0-SNAPSHOT found here :https://repo.eclipse.org/content/groups/acceleo/org/eclipse/acceleo/org.eclipse.acceleo.maven.launcher/3.6.0-SNAPSHOT/

I finally managed to package my generator and launched a new Eclipse install having the packaged JAR in its plugins/ directory.

The generator override is described like this the JAR's plugin.xml:
<extension
         point="org.eclipse.acceleo.engine.dynamic.templates">
      <templates
            path="src/thales/thav/dsi/em/factory/eefgen/">
      </templates>
      <generator
            generatorID="org.eclipse.emf.eef.codegen">
      </generator>
   </extension>


Nevertheless, when I run "Generate EEF architecture", it seems that my override is not taken into account.

For example, adding the following override should replace the type of all semantic attributes in generated Java files with TEST but it does not work:
(TEST is not a real Java class but I am first trying to get customization done. I removed the override guard for this purpose too.)

[module enumCommon('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0')
    extends org::eclipse::emf::eef::codegen::services::common /]

[import org::eclipse::emf::eef::codegen::services::imports /]

[template public toJavaType(view : ViewElement) overrides toJavaType]
TEST
[/template]


I checked the Error Log and no message states that no templates can be found in the path I specified. But my template is not taken into account.

==> What did I miss ?

I attached to this post my template, and plugin.xml, pom.xml, MANIFEST.MF files.

Thanks,

François
  • Attachment: pom.xml
    (Size: 2.94KB, Downloaded 231 times)
  • Attachment: plugin.xml
    (Size: 0.75KB, Downloaded 169 times)
  • Attachment: MANIFEST.MF
    (Size: 0.88KB, Downloaded 106 times)
  • Attachment: enumCommon.mtl
    (Size: 0.41KB, Downloaded 109 times)
Previous Topic:[EMFStore] Network and embedded client access to the same server workspace
Next Topic:[Teneo] Enable Full Use API of EntityManager
Goto Forum:
  


Current Time: Fri Apr 26 09:57:26 GMT 2024

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

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

Back to the top