|
|
|
|
|
|
Re: Virtual Node Factory for classification of Nodes [message #991040 is a reply to message #990343] |
Mon, 17 December 2012 07:35 |
Hazem ELRAFFIEE Messages: 61 Registered: September 2012 |
Member |
|
|
Well .. I used to use sapphire 0.5, and now I'm trying to migrate to sapphire 0.6.1 in order to make use of the 2 new bug fixes you just mentioned.
I guess I have problems migrating to 0.6.1:
I changed the Editor class that extends SapphireEditorForXml as the following:
From:
super( "org.mywork.msxmleditor" );
setRootModelElementType( IDocument.TYPE );
setEditorDefinitionPath( "org.mywork.msxmleditor/org/mywork/msxmleditor/ui/editor.sdef/editor.page" );
To
super
(
IDocument.TYPE,
DefinitionLoader
.context( MSXMLEditor.class.getClassLoader() )
.sdef( "org.mywork.msxmleditor.ui.editor" )
.page( "editor.page" )
);
And also some services used the internal Model Elements, which couldn't be resolved, so I used the Model IElements instead.
I changed nothing else, and I have no errors before compiling. At runtime, I get an error telling me that it cannot launch the editor because it was unable to instantiate IDocument (the base class for the root tag)
I'm still debugging, but do you have any ideas? the IDocument class has nothing special !!
[Updated on: Mon, 17 December 2012 07:35] Report message to a moderator
|
|
|
|
|
Re: Virtual Node Factory for classification of Nodes [message #991444 is a reply to message #991278] |
Wed, 19 December 2012 08:10 |
Hazem ELRAFFIEE Messages: 61 Registered: September 2012 |
Member |
|
|
Something else, which I don't know if it's applicable or not, but it could be very helpful if you try to make it while developing 0.7
When you have errors in the "sdef" file, you can only know it by opening the "sdef" and noticing the error red flag, but in the eclipse project explorer, you don't find an error red flag on the "sdef" file as a source file to the project.
In short words, when a java file has some errors, it has red flag in the project explorer, but when an "sdef" file has some errors, it doesn't have any red flags in the project explorer. (that's really confusing sometimes)
|
|
|
Re: Virtual Node Factory for classification of Nodes [message #991481 is a reply to message #991444] |
Wed, 19 December 2012 12:40 |
Konstantin Komissarchik Messages: 1077 Registered: July 2009 |
Senior Member |
|
|
Quote:I'd recommend adding some guidelines like these to the migration guide.
Adding more guidance is always possible, but first I need to get a better understanding about what wasn't obvious. What steps did you initially follow to update your Sapphire environment?
Quote:When you have errors in the "sdef" file, you can only know it by opening the "sdef" and noticing the error red flag, but in the eclipse project explorer, you don't find an error red flag on the "sdef" file as a source file to the project.
There is an enhancement request tracking this need, but as with all such items, there isn't enough time for everything. Some day.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=329080
My general migration advice is to avoid the temptation of going solely by errors. Some of the migration tasks will advertise themselves with errors, but many will not. I recommend going through the migration guide section-by-section and seeing if the stated case applies to your code. This approach will minimize the risk of long debugging sessions stemming from missed migration steps.
- Konstantin
[Updated on: Wed, 19 December 2012 12:40] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03552 seconds