| Problems migrating to 0.6 [message #989586] |
Thu, 06 December 2012 16:01  |
Eyck Jentzsch Messages: 16 Registered: August 2012 |
Junior Member |
|
|
Hi,
I tried to migrate my plugin(s) from 0.5.2 to 0.6.0 but ran into problems.
I changed the constructor of the Editor class (extending SapphireEditorForXml) from
public MyEditor(){
super( MyPlugin.PLUGIN_ID);
setRootModelElementType( IMy.TYPE );
setEditorDefinitionPath( MyPlugin.PLUGIN_ID+"/"+resourcePath+"/main.page" );
}
to
public MyEditor(){
super(IMy.TYPE,
DefinitionLoader
.context( MyEditor.class.getClassLoader() )
.sdef( "a.b.c.MyEditor" )
.page( "main.page" )
);
}
Running this i just get a ClassCastException:
java.lang.ClassCastException: org.eclipse.sapphire.ui.def.internal.SapphireCustomPartDef cannot be cast to org.eclipse.sapphire.ui.def.FormDef
at org.eclipse.sapphire.ui.FormPart.initChildParts(FormPart.java:121)
at org.eclipse.sapphire.ui.FormPart.init(FormPart.java:42)
at org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:179)
at org.eclipse.sapphire.ui.SapphirePart.create(SapphirePart.java:1206)
at org.eclipse.sapphire.ui.FormPart.initChildParts(FormPart.java:126)
So it seems I missed something in the migration process. Does anybody have an idea?
BTW, the migration guide says in section 'FormEditorPage' 'context( getClass().getClassLoader() )' to be called in the constructor but there you cannot call getClass() as the object just gets constructed....
Best regards
-Eyck
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01692 seconds