Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Scoping with URI
Scoping with URI [message #1808474] Tue, 25 June 2019 12:01 Go to next message
shubhankar chowdhury is currently offline shubhankar chowdhuryFriend
Messages: 17
Registered: January 2018
Junior Member
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 12:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14677
Registered: July 2009
Senior Member
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)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Scoping with URI [message #1808478 is a reply to message #1808475] Tue, 25 June 2019 12:42 Go to previous messageGo to next message
shubhankar chowdhury is currently offline shubhankar chowdhuryFriend
Messages: 17
Registered: January 2018
Junior Member
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 46 times)
  • Attachment: input.jpg
    (Size: 65.44KB, Downloaded 44 times)
Re: Scoping with URI [message #1808479 is a reply to message #1808475] Tue, 25 June 2019 13:39 Go to previous messageGo to next message
shubhankar chowdhury is currently offline shubhankar chowdhuryFriend
Messages: 17
Registered: January 2018
Junior Member
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 13:56 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14677
Registered: July 2009
Senior Member
- 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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
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: Sat May 04 13:25:36 GMT 2024

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

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

Back to the top