Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321120 - MWE2 is not advice-capable
Summary: MWE2 is not advice-capable
Status: RESOLVED WONTFIX
Alias: None
Product: EMFT
Classification: Modeling
Component: MWE (show other bugs)
Version: 1.0.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 09:03 EDT by steven reinisch CLA
Modified: 2010-09-03 03:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steven reinisch CLA 2010-07-28 09:03:20 EDT
Build Identifier: 

Enhancement request:

add generator aop known from MWE using org.eclipse.xpand2.GeneratorAdvice.

Reproducible: Always
Comment 1 Sven Efftinge CLA 2010-08-24 09:11:51 EDT
What concrete use case do you want to solve with this feature?
Comment 2 steven reinisch CLA 2010-09-02 10:11:37 EDT
I have an existing generator that is used as a cartridge from within another generator. the original generator shall be adapted without modifying it.
Comment 3 Sven Efftinge CLA 2010-09-02 10:20:18 EDT
Could you explain in more detail, what existing generator mens (how is it structured) and what exactly you want to modify.
Comment 4 steven reinisch CLA 2010-09-02 10:40:38 EDT
the original generator generates class definitions from a model describing structural system aspects. using a second dsl, the system's behaviour is modeled.
the corresponding generator generates code that implements the modeled behaviour.

the behaviour-generator needs to hook into the structure-generator: it adds code to a class' constructor:

«AROUND templates::BaseClasses::Constructor FOR Interface»
   «targetDef.proceed()»
   //behavioural code goes here
«ENDAROUND»

furthermore, additional methods need to be generated into the classes:

«AROUND templates::BaseClasses::Methods FOR Interface»
  «targetDef.proceed()»
  //more methods
«ENDAROUND»
Comment 5 Sven Efftinge CLA 2010-09-02 10:49:32 EDT
That'S Xpand's AOP facility, which is still present.
Comment 6 steven reinisch CLA 2010-09-02 11:07:09 EDT
indeed, but is it possible to specify a generator-advice with mwe2 as it is possible with mwe?

I already asked this question in the forum: http://www.eclipse.org/forums/index.php?t=msg&goto=549856&
Comment 7 Sven Efftinge CLA 2010-09-03 03:31:28 EDT
I posted a solution to the mentioned newsgroup thread.