Problem: replacing root edit part gives blank white editor [message #228859] |
Thu, 11 January 2007 07:38  |
Eclipse User |
|
|
|
Platform: Intel Pentium M, Ubuntu Dapper
eclipse 3.2, eclipse GEF SDK 3.2
I'm trying to adapt the code for enabling zoom commands in the logic
editor GEF example to my GEF editor.
One problem I'm seeing now, is that when I try to replace the root
edit part (which according to the debugger by default is a
ScalableRootEditPart) with the ScalableFreeFormEditorPart of the
example, ie. in the editor use:
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
ScalableFreeformRootEditPart root = new ScalableFreeformRootEditPart();
getGraphicalViewer().setRootEditPart(root);
getGraphicalViewer().setEditPartFactory(this);
}
then the editor frame becomes blank.
I'm deriving from GraphicalEditor, while the logic editor derives from
GraphicalEditorWithFlyoutPalette, but that shouldn't matter...?
The logic example wizard is able to create a four bit adder in the
same workspace where my editor fails, so it shouldn't be a version
number? (...unless the example source is out of sync with the actual
example plugin, that is...).
Any idea what the problem might be? Is there somewhere else I have to
register the root edit part? Can't ScalableFreeformRootEditPart be
used by a GEF editor? (but if so, why does it work for LogicEditor?)
Thanx!
|
|
|
|
|
|
|
Re: Problem: replacing root edit part gives blank white editor [message #228935 is a reply to message #228889] |
Thu, 11 January 2007 10:08  |
Eclipse User |
|
|
|
>>>>> Steinar Bang <sb@dod.no>:
>> But the ZoomComboContributionItem() is disabled, even though I've
>> copied all code relating to it from the logic editor's
>> configureGraphicalViewer() method, and the action bar contributor's
>> contributeToToolBar() method.
>> Is there something I'm missing, I wonder...?
> Some edit policy on the root part, perhaps?
> I haven't defined any edit policies on any edit parts, since what I
> have is a pure viewer, and I haven't seemed to be needing any yet.
I've now successfully enabled the zoom combo box.
I had to implement the ERDiagramEditor#getAdapter() method, as defined
in the IBM "Using the Graphical Editor Framework and the Eclipse
Modeling Framework", on page 146/147.
http://www.redbooks.ibm.com/redbooks/pdfs/sg246302.pdf
|
|
|
Powered by
FUDForum. Page generated in 0.03192 seconds