Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Scoping with URI
Scoping with URI [message #1808474] Tue, 25 June 2019 08:01 Go to next message
Eclipse UserFriend
I want to have a scoping for a element but it is getting the URI without the content of actual element.

def getScoping(EReference reference, IScope scope) {
filter = new Predicate<IEObjectDescription>() {
override apply(IEObjectDescription input) {
return (input.EObjectOrProxy instanceof Unit);
}
}

return new FilteringScope(scope, filter);
}

the highlighted "input.EobjectOrProxy" contains only the URI not the actual element details

How to get the actual element in this case.

PS: I have checked the other thread but not working in my case
Re: Scoping with URI [message #1808475 is a reply to message #1808474] Tue, 25 June 2019 08:11 Go to previous messageGo to next message
Eclipse UserFriend
hi, can you please be more specific about that. you should not resolved proxies there
depending on your usecase you can add stuff to the user data map of the IEObjectDescription
(see IDefaultResourceDescriptionStrategy)
Re: Scoping with URI [message #1808478 is a reply to message #1808475] Tue, 25 June 2019 08:42 Go to previous messageGo to next message
Eclipse UserFriend
As the element is from some different location (ie not from the same node may be) so i am getting just the eProxyURI for the element but I need the internal details of the component which are 'null'.

I need the phyDimentionRef name of the element but it is not present in case if it from different file.

I hope the images will help you more.
  • Attachment: uri.jpg
    (Size: 59.77KB, Downloaded 69 times)
  • Attachment: input.jpg
    (Size: 65.44KB, Downloaded 72 times)
Re: Scoping with URI [message #1808479 is a reply to message #1808475] Tue, 25 June 2019 09:39 Go to previous messageGo to next message
Eclipse UserFriend
and moreover in user data map i ma getting null
Re: Scoping with URI [message #1808482 is a reply to message #1808479] Tue, 25 June 2019 09:56 Go to previous message
Eclipse UserFriend
- what do you want to know about the object
- depending on your usecase (question 1) you can adapt IDefaultResourceDescriptionStrategy and store that information in the index, so that you can filter it in the scope
Previous Topic:Saving AST of xText runtime model as an ecore model
Next Topic:Reorder a model via formatter2 or validation and quick fix
Goto Forum:
  


Current Time: Wed Mar 26 07:38:03 EDT 2025

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

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

Back to the top