* Executes the action.
*/
@Override
public void run()
{
NeoGraphViewPart view = (NeoGraphViewPart) getWorkbenchPart();
// let the user select the print mode
PrintDialog dialog = new PrintDialog(
view.getViewer().getControl().getShell(), SWT.NULL );
PrinterData data = dialog.open();
if ( data != null )
{
// TODO This is only a temporary implementation, until the Zest
// Graph supports true
// scalable printing...
// print the neo figure
Graph g = view.getViewer().getGraphControl();
PrintFigureOperation p = new PrintFigureOperation( new Printer(
data ), g.getContents() );
p.setPrintMode( PrintFigureOperation.FIT_PAGE );
p.run( view.getTitle() );
}
}