[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: (probably stupid) problem with dynamic templates

Hi.

Alex Shatalin <vano@xxxxxxxxxxx> writes:

>> I've changed the plugin id in the .gmfgen file so that a new project
>> is created. Now the code generation doesn't abort, but all the
>> XXXEditPart.java files are empty (0 bytes)...
> Can you generate the code with "dynamic templates" option switched off?

Yes, no problems.

> Anything in .log file? 

Nothing but the NPEs already quoted in my very first message.

> If you switch dynamic templates on then ".JETEmitters" project should be
> created in your workspace + all the templates should be converted to .java
> files and compiled there. Can you see this project?

In the FS I can see it, and after disabling the filters, it's also in the
project explorer. 

> any compilation errors in it?

Yep, tons of. A little investigation showed that the root cause of the error
was that the .JETEmitters project was not generated with any specific project
settings regarding the Java Compiler, it was using the default workspace
setting, which was set to 1.4 compliance for my workspace. And the templates
use 5.0 specific instructions... Anyway, after changing the project specific
settings to a compliance level of 5.0, everything worked. 

I added a few sentences to
http://wiki.eclipse.org/index.php/GMF_GenModel_Hints#GenEditorGenerator to
reflect this issue - hope it's understandable :-)

Thanks a lot for the help.
  Volker

-- 
* Volker Wegert * http://www.volker-wegert.de/contact *
* I used to drive a Heisenbergmobil, but everytime I looked at the
* speedometer, I got lost.  
*