Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » No EObjectDescription could be found in Scope (invocationTargetException)(invocationTargetException)
No EObjectDescription could be found in Scope (invocationTargetException) [message #1089496] Sun, 18 August 2013 21:12 Go to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Hi all,

I have two different resource (referenced DSL one to other) .

I have two different dsl :
such as :

Web returns Web:
'Web'
name=QualifiedName
'{' ('sitePermission' '=' sitePermission = [user::SitePermission|QualifiedName])?

SitePermission is defined other dsl :

UserModel returns UserModel:
'UserModel' name = QualifiedName '{'
('sitePermissions' '{' sitePermissions+=SitePermission (sitePermissions+=SitePermission)* '}' )?
'}'
;



I use SitePermission Object for referenced automatically.
User must not enter manually.

Related code :
SitePermission s= sitepermission6.createDefaultSitePermission(contentUnitNames.get(index),guid);
sitepermission6.loadForCreateSitePermission(rootWeb, s);
rootWeb.setSitePermission(s); // this initialization is give error Sad.

Hence not come qualifiedname. such as UserModel.SP must come but onlly come SP. and I do not give string for setSitePermission already.

I am aim :I must do it : give reference automatically ,not use CTRL+SPACE .is it possible with XTEXT?

Best regards
Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092054 is a reply to message #1089496] Thu, 22 August 2013 09:13 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Sorry, but I did not understand this. The text confused me.

Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092117 is a reply to message #1092054] Thu, 22 August 2013 10:51 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Hi Karsten,

I want to give automatic refence. if you want to show my code ,I load my project.

Best regards

Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092125 is a reply to message #1092117] Thu, 22 August 2013 11:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi

the Problem is as follows:

Junior want (automatically/on autoedit/save/<similar hook>)

- create a new Instance of an EObject in a different Resource.
- create a reference to this EObject in the current Resource.

Using Content Assist or a Quickfix is not an Option (it should be 100% automatic)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092137 is a reply to message #1092125] Thu, 22 August 2013 11:28 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Hi Christian,

I understand my problem.My problem is second resource is not indexed so I receive outher scop problem. Now I give automatically added and reference. but I have an index problem.correct instance is not given reference.

UserModel model = (UserModel) resource.getContents().get(0);
resourceSet.getResources().add(resource);

resource.getContents().add(s);

model.getSitePermissions().add(0,s); // it is solved automatically refernce but not given correct refence realted instance.

if you want my little project ,I load it

Best regards

[Updated on: Thu, 22 August 2013 11:30]

Report message to a moderator

Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092140 is a reply to message #1092137] Thu, 22 August 2013 11:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

as said before: the problem to solve is:

- what todo to fulfil your requirements
- and not: how to i get rid of the exception (that says that the stuff is not in scope - probably cause it is not indexed)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092160 is a reply to message #1092140] Thu, 22 August 2013 12:02 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Hi Christian,

I added related instance other (second) model with index and then give reference it first model but added related instance second every time.if created element do not added second time ,not referenced it .in addition ,automatically created instance's index start with -1.it added last and end index hence it is added two time :(Sad

Best regards

[Updated on: Thu, 22 August 2013 12:10]

Report message to a moderator

Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092225 is a reply to message #1092160] Thu, 22 August 2013 13:45 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Hi Christian,

Really ,I do not understand my problem.My code is added two SitePermission instance and give reference automatically but I do not understand Xtext index Sad
I load my project .Please help me ,I tried a lots of method . I solved one problem and then I have other problem.

Best Regards







Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092228 is a reply to message #1092225] Thu, 22 August 2013 13:46 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Second part in the project
Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092229 is a reply to message #1092228] Thu, 22 August 2013 13:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
as i said: i am not able to tell if your way of solution is the right one and can ever work.
this is why i asked you to ask a new question on how to solve your business problem.
maybe then i can tell sebastian or sven to have a look.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1092255 is a reply to message #1092229] Thu, 22 August 2013 14:20 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Hi Christian ,

Thank you very much for reply.If I solved this problem ,I am very happy Smile .Realy, I could not find another solution. İndex problem occur now and I do not give correct index created and referenced object
(actually I added instance automatically but two instance added .After second instance added , can be given correct referens )Sad


Best Regards
Re: No EObjectDescription could be found in Scope (invocationTargetException) [message #1093679 is a reply to message #1092255] Sat, 24 August 2013 13:16 Go to previous message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
Hi Christian,

I create a ne thread about give automatic Reference from the other resource

Best Regards,
Previous Topic:Emit errors and warnings during code generation, preferally by file, line, and column number
Next Topic:Xtext model debug
Goto Forum:
  


Current Time: Thu Apr 25 15:38:12 GMT 2024

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

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

Back to the top