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? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -