Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Use Xtext index to filter linked resources
Use Xtext index to filter linked resources [message #1249472] Tue, 18 February 2014 09:32 Go to next message
marwa rostren is currently offline marwa rostrenFriend
Messages: 3
Registered: February 2014
Junior Member
Hello,

I try to retrieve the list of xtext files (*.ocl files in my case) present in the workspace and in plugins.
I have explored the trail of the "Ctrl + Shift + F3" action in the editor but it is not what I need... at all.

For more details about our use case:
users must have a way to see the list of xtext files which import the uri of their models. Our action is available by right clicking a model in the editor and the expected result must be a list of all registered xtext files which use the current model (in workspace and in plugins).

Is this doable using Xtext index??
Thanks in advance,
Marwa
Re: Use Xtext index to filter linked resources [message #1249896 is a reply to message #1249472] Tue, 18 February 2014 18:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

import the uri is a thing that is not stored in the index.
it stores
- which resources xtext knows
- which objects are exported by these resources
- there is a reference between two object (writing import "bla.blubb" is not such a reference...)

did you have a look at the find references command (you can call it on object in the editor, not files)

you could write something similar using the index

have a look at the index classes:

IResourceDescriptions
IResourceDescription
IReferenceDescription


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Use Xtext index to filter linked resources [message #1250468 is a reply to message #1249896] Wed, 19 February 2014 09:19 Go to previous messageGo to next message
marwa rostren is currently offline marwa rostrenFriend
Messages: 3
Registered: February 2014
Junior Member
Thanks Christian for your answer,
The 'which resources xtext knows' could be util in my case,
I am discovering the find references action, It seems very helpful for what I need to do
Regards

Re: Use Xtext index to filter linked resources [message #1250556 is a reply to message #1250468] Wed, 19 February 2014 10:51 Go to previous messageGo to next message
marwa rostren is currently offline marwa rostrenFriend
Messages: 3
Registered: February 2014
Junior Member
I have took a look at the code of the "findReferences" action.
The index Data contains just xtext files of workspace and not xtext files from plugins Sad
I think what I am looking to do is just not feasible using the index data, I will go directly for the plugin.xml solution.

Thanks again for your precious help
Re: Use Xtext index to filter linked resources [message #1250804 is a reply to message #1250556] Wed, 19 February 2014 16:18 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
So you refer to resources in the workbench from within your workspace?
That doesn't sound like a good idea.
Are you sure don't want to use PDE's target platform and have those
bundles on your project's classpath?

Am 19/02/14 11:51, schrieb marwa rostren:
> I have took a look at the code of the "findReferences" action. The index
> Data contains just xtext files of workspace and not xtext files from
> plugins :( I think what I am looking to do is just not feasible using
> the index data, I will go directly for the plugin.xml solution.
>
> Thanks again for your precious help
>


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Previous Topic:Xtext DSL used as a Java Scripting Engine language
Next Topic:traceability and injector in xText
Goto Forum:
  


Current Time: Fri Mar 29 10:51:51 GMT 2024

Powered by FUDForum. Page generated in 0.02978 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top