the current selection is the file in the Navigator-View, because the
Wizard is an Export Wizard. The user right-clicks on the gmf-file in the
Navigator-View, chooses "Export" and then my Export-Wizard. So there`s
nothing selected in my Diagram.
So the current selection is useless here.
workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor()
doesn`t work, because when I call:
WorkbenchWindow workbenchWindow =
(WorkbenchWindow)workbench.getActiveWorkbenchWindow();
then workbenchWindow is null.
This is a bit strange, because when I look at workbench during debugging
it has an active WorkbenchWindow and the activeWorkbenchWindow has an
activePage and the activePage has an activeEditor. But I can dig as deep
as I want, I can`t find any EditPart or my ShapesDiagram. So it doesn`t
matter why getActiveWorkbenchWindow() returns null, because nowhere
inside of workbench is something that would help me.
So the workbench is useless, too.
Isn`t there a class where I can get the Instance and then call something
like getShapesDiagram()?
If not, I could also calculate the width and height myself, I think.
Because during the export I parse the whole gmf-file and so I get all
the EditParts, so I think, I just can remember the highest x- and y-Value.
But first I`ll ask my client what he exactly means, when he wants the
width and the height of the diagram :)