[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] add .xpt template

Hi,

I want to add some template to generate custom files.

I can modify existing, I mean : I modify an existing .xpt, so the generated class is correctly modified

But when I create a new .xpt file in order to generate a class... it seems that the .xpt is not used...

The new .xpt files are in the same folder of existing templates.

The most strange is that at the first "generate diagram code", there was a trace in the log which indicates errors but now there is no more trace in the log at the "generate diagram code" invocation.

Is there something to do to consider the new .xpt files?

Thanks for any help


One of my new .xpt file(PropertySourceExtended.xpt) :

«IMPORT "http://www.eclipse.org/gmf/2008/GenModel"»;
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»;

«DEFINE Class FOR gmfgen::GenCustomPropertyTab»
    «EXPAND xpt::Common::copyright FOR sheet.editorGen-»
package «sheet.packageName»;

«EXPAND xpt::Common::generatedClassComment»
public class PropertySourceExtended extends org.eclipse.emf.edit.ui.provider.PropertySource implements org.eclipse.ui.views.properties.IPropertySource{
«EXPAND createPropertyDescriptorMethod»



} «ENDDEFINE»

«DEFINE createPropertyDescriptorMethod FOR gmfgen::GenCustomPropertyTab-»
«EXPAND xpt::Common::generatedMemberComment»
protected IPropertyDescriptor createPropertyDescriptor(org.eclipse.emf.edit.provider.IItemPropertyDescriptor itemPropertyDescriptor) {
return new PropertyDescriptorExtended(object, itemPropertyDescriptor);
}
«ENDDEFINE»