Restricting scope to files that are currently open [message #1860220] |
Mon, 24 July 2023 11:10  |
Eclipse User |
|
|
|
Hello,
I was wanting to know whether there was a way to restrict scope to files that are currently open in the editor, irrespective of whether they are present in the project or else where.
I tried using the PlatformUI class to obtain the paths of the files that are currently open, and then created a new Xtext resource for each file path. I then load the contents and add the required reference objects to a list that I pass to the scope.
But loading the contents to the resource is taking too much time and affecting the performance. Is there any better way?
Thank you,
Atul
|
|
|
|
Re: Restricting scope to files that are currently open [message #1860225 is a reply to message #1860222] |
Mon, 24 July 2023 12:06   |
Eclipse User |
|
|
|
Hello,
I'm designing a DSL where references can only be made to other .mydsl files that are currently opened in the editor. Once a file is closed, the references from that file must be removed from the scope. And if a file is opened, the references from that file must be added to the scope. The scope of the references will be in the hands of the user, instead of providing all the references.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03883 seconds