java - Gef: How to access GraphicalEditor instance from EditPart? -
inside editpart class, need instance of graphicaleditor editpart belongs to. easiest way without passing required object editpartfactories , on editparts?
i found solution problem: can access editpart via
workbench.getinstance().getactiveworkbenchwindow().getactivepage().getactiveeditor();
this works because can assume editpart has focus when code executed, forgot mention in question.
Comments
Post a Comment