Cross reference issue while using EmbeddedEditor [message #1720239] |
Fri, 15 January 2016 08:52  |
Eclipse User |
|
|
|
Hi,
Code used to show xtext control (embedded mode) in a standalone application
EmbeddedEditorFactory factory = injector.getInstance(EmbeddedEditorFactory.class);
handle = factory.newEditor(resourceProvider).showErrorAndWarningAnnotations().withParent(parent);
LineNumberRulerColumn lnrc = new LineNumberRulerColumn();
handle.getViewer().addVerticalRulerColumn(lnrc);
To add cross reference capability in standalone application, i injected "ResourceSetBasedAllContainersState" class for IAllContainersState interface in "NGXUiModule"
var state = new ResourceSetBasedAllContainersState();
var containers = Arrays.asList("All");
var container2Uris = ArrayListMultimap.create();
container2Uris.put("Base", URI.createFileURI("/Users/XYZ/file1.ngx"));
container2Uris.put("Base", URI.createFileURI("/Users/XYZ/file2.ngx"));
state.configure(containers, container2Uris)
return state;
"ngx" is the extension provided while creating the xtext project
When i open file2.ngx file using xtext editor in standalone application, it is not looking in file2.ngx for its references.
It gives "Couldn't resolve reference to " error.
Please help me to solve this cross reference issue.
Saravanan A
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.49534 seconds