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

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

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

google shop client API returns 400 bad request error while adding an item -