danieldietrich / xtext-protected-regions

Xtext Protected Regions
danieldietrich.net
12 stars 6 forks source link

Protected region overwritten #38

Closed fonvitale closed 12 years ago

fonvitale commented 12 years ago

Hi,

I'm using your plug-ins in a xtext project. The code generator has been developed using xtend. After configure MANIFEST and RuntimeModule class, I try my DSL IDE. It generates a simple C# class with a protected region:

public ClassName : SuperClass {

/* PROTECTED REGION ID(custom.methods) ENABLED START */

/* PROTECTED REGION END */

}

I write some code into the protected region:

public ClassName : SuperClass {

/* PROTECTED REGION ID(custom.methods) ENABLED START */

   public void PRTest() {}

/* PROTECTED REGION END */

}

Running again the code generation we get the class file without the new code, I mean, the protected region is overwritten.

I followed the documentation, but do not know if I miss something. Can you help me?

Thanks in advance.

PS: I'm using Juno 4.2 and Xtext 2.3.

fonvitale commented 12 years ago

Solved!

I had to changed the RuntimeModule.java. I was using the standalone code generators code instead of the eclipse base code generator code.

fonvitale commented 12 years ago

Solved!

ceefour commented 12 years ago

Happy to know you've used it successfully :)