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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -