I want to trigger the serializer from a context menu in my language editor on the existing EMF model, i.e. without re-parsing the source code... how can I obtain the Resource (and then the AST) starting from my command handler which extends AbstractHandler?
Ok if I want my context menu to be a menuContribution with locationURI "popup:org.eclipse.jdt.ui.PackageExplorer", but what about if I want it to have instead locationURI="popup:#TextEditorContext?after=additions"?
In this case, how can I get the Resource in my handler to trigger the serializer on the EMF model? Is it possible to get it from that context?