Menu

#15 changing template no effect on .java output

All_versions
open
nobody
5
2005-09-16
2005-09-16
halkmund
No

When changing the content of a template mapped to a model entity
and regenerating the .java file for this entity, the old .java file is not
overwritten.

This seems to be due to a (oldContent != newContent) check allways
returning false:

the oldContent and newContent both are equal to
jmerger.getTargetCompilationUnitContents()

changing line 974 of file JETMappingGeneratorImpl to

newContents = jMerger.getSourceCompilationUnitContents();

solved the problem.

Discussion

  • halkmund

    halkmund - 2005-09-17

    Logged In: YES
    user_id=1346067

    Must be going bananas, after two days of testing and nothing, today I fire
    up Eclipse and it works from the first shot arghhh :-w
    sorry for any inconvenience.

     
  • Eike Stepper

    Eike Stepper - 2005-10-30

    Logged In: YES
    user_id=1006510

    Hi Joel ;-)

    I also vote for this fix!
    Some time ago I decided to switch from OAWG to your Merlin
    Generator and I'm quite happy with that decision. I'm
    rapidly progressing with my templates and it's fun most of
    the time. Unfortunately the here mentioned bug is quite
    annoying during template/model development.

    Do you suggest to use the HEAD version?

    Btw. first by reading this bug I discovered that Merlin uses
    JMerge. I don't like it very much (as I don't like to mix
    generated and non-generated portions of the code in
    general). Is there a way to switch it off without modifying
    the Merlin source - which I don't like either ;-)

    On the other hand it'd be comfortable to have the generator
    launched through an Ant script. Did I only not find the hint?

    Cheers
    /Eike

     

Log in to post a comment.