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

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -