|
|
Re: Null Context in quickfix [message #1076734 is a reply to message #1076713] |
Wed, 31 July 2013 19:55 |
|
Btw the following works for me
public Class<? extends IssueModificationContext> bindIssueModificationContext() {
return MyDslIssueModificationContext.class;
}
public class MyDslIssueModificationContext extends IssueModificationContext {
@Override
public IXtextDocument getXtextDocument(URI uri) {
// TODO Auto-generated method stub
IXtextDocument result = super.getXtextDocument(uri);
if (result == null && URI.createURI("dummy/test.mydsl").equals(uri.trimFragment())) {
for (IViewReference r : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences()) {
if (r.getId().equals("org.eclipse.xtext.mqrepl.ui.views.ModelQueryLanguageView")) {
ModelQueryLanguageView view = (ModelQueryLanguageView)r.getView(false);
if (view != null) {
return view.getEmbeddedEditor().getDocument();
}
}
}
}
return null;
}
}
public class ModelQueryLanguageEditedResourceProvider implements IEditedResourceProvider {
@Inject Provider<ResourceSet> rsp;
@Override
public XtextResource createResource() {
return (XtextResource) rsp.get().createResource(URI.createURI("dummy/test.mydsl"));
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04203 seconds