[Xtext 2.2] Question about Xtext's index [message #784644] |
Fri, 27 January 2012 20:31 |
Alex Ruiz Messages: 103 Registered: March 2011 |
Senior Member |
|
|
Greetings,
I'm sorry if this question has been answered before. I've been looking everywhere for answers (including Xtext's source code) but I got completely lost
In one of our Xtext-based editors, we'd like to implement a function that takes a QualifiedName (or a String representing a QualifiedName) and open the file containing the EObject associated with that QualifiedName. Something like this:
public class ModelObjectFinder {
public void openDefinition(QualifiedName qualifiedName) {
// implementation goes here.
}
}
I found "org.eclipse.xtext.ui.editor.IURIEditorOpener#open(URI, boolean)" and I think it can be useful for what we are trying to achieve. If this is correct, the key here is to find the URI of the EObject whose QualifiedName matches the one passed to "openDefinition."
Would it be possible to use Xtext's index to find the URI of an EObject, given its QualifiedName? If so, I'd truly appreciate some pointers (I'm not looking for a completely solution, just where to look in Xtext's code.)
Many thanks in advance,
-Alex
[Updated on: Fri, 27 January 2012 20:32] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04889 seconds