How do I implement the "Find References" function? [message #1862767] |
Thu, 28 December 2023 14:12 |
David Sun Messages: 45 Registered: July 2020 |
Member |
|
|
I created two DSLS with xtext, one called DSL A and one called DSL B.
I created a project in eclipse.
In my project, I used DSL A to create a source code file called xxx.a and in it I created a variable "abcd";
In my project, I created a source code file called zzz.b with DLS B and used the variable "abcd" in xxx.a.
I am now going to implement the "Find References" function from the right-click menu in XtextEditor to find out where the variable "abcd" is being used in the file xxx.a in my project.
The function of "Find the References" was implemented by the org.eclipse.xtext.findReferences.ReferenceFinder.
I debuged the ReferenceFinder.java.
In the method org.eclipse.xtext.findReferences.ReferenceFinder.findAllReferences(TargetURIs targetURIs, IResourceAccess resourceAccess,
IResourceDescriptions indexData, Acceptor acceptor, IProgressMonitor monitor), indexData.getAllResourceDescriptions () statement returns no IResourceDescription object in the result. The variable "indexData" is object of org.eclipse.xtext.builder.impl.DirtyStateAwareResourceDescriptions.
How do I implement the "Find References" function?
Please give me some proposals.
Thanks a lot !
-
Attachment: xtext.png
(Size: 66.08KB, Downloaded 54 times)
|
|
|
|
Powered by
FUDForum. Page generated in 0.03865 seconds