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

Alex Shatalin a Ãcrit :
Hello Aurelien,

the definiton :
ÂDEFINE Class FOR gmfgen::GenCustomPropertyTabÂ
This definition is not one you are calling (there should be ÂDEFINE Class FOR gmfgen::GenDiagram to satisfy used parameters).

You have to either create ÂDEFINE Class FOR gmfgen::GenDiagramÂ

I've tried to use a different input object : ÂDEFINE Class FOR gmfgen::GenDiagram Â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 PropertySourceExtendedConstructorÂ
ÂEXPAND createPropertyDescriptorMethodÂ
}
ÂENDDEFINEÂ



with error :

Exception (No Definition xpt::propsheet::PropertySource::Class for GenDiagram could be found!) while generating code


or call
doGenerateJavaClass for gmfgen::GenCustomPropertyTab (use different input object as a last parameter in doGenerateJavaClass method call).

Instead of:
doGenerateJavaClass(myEmittersCustom.getPropertySourceEmitter(), "org.ow2.jasmine.design.model.jonas.diagram.sheet", "PropertySourceExtended", myDiagram);


You have to use:
doGenerateJavaClass(myEmittersCustom.getPropertySourceEmitter(), "org.ow2.jasmine.design.model.jonas.diagram.sheet", "PropertySourceExtended", selectCustomPropertyTabs(myDiagram.getEditorGen().getPropertySheet().getTabs()));



I also tried something like that :

    private Object selectCustomPropertyTabs(EList<GenPropertyTab> tabs) {
        for (GenPropertyTab tab :tabs) {
            if(tab instanceof GenCustomPropertyTab) {
                return tab;
            }
        }
        return null;
    }

with :

Â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 PropertySourceExtendedConstructorÂ
ÂEXPAND createPropertyDescriptorMethodÂ
}
ÂENDDEFINEÂ



with error :
Exception (No Definition xpt::propsheet::PropertySource::Class for GenCustomPropertyTab could be found!) while generating code





----------------- Alex Shatalin