Re: No EObjectDescription could be found in Scope [message #1092427] |
Thu, 22 August 2013 19:50 |
junior developer Messages: 354 Registered: January 2013 |
Senior Member |
|
|
Hi all,
My project has the capability to include referencing elements of one dsl from other dsl.When I save one editor ,related elements that is defined in the other DSL, added other editor and then automatically created element is given reference first editor automatically . I have two resource and one resourceset. My two resource is added in the one resourceset.
my aim is the created element in first dsl to automatically created in a other dsl with similar name -> I am able to do this at the moment
Such as :
my content.xtext
Web returns Web:
'Web'
name=QualifiedName
'{' ('sitePermission' '=' sitePermission = [user::SitePermission|QualifiedName])? '}'
my user.xtext
UserModel returns UserModel:
'UserModel' name = QualifiedName '{'
('sitePermissions' '{' sitePermissions+=SitePermission (sitePermissions+=SitePermission)* '}' )?
'}'
;
When I create a web instance in the content editor ,its SitePermission is created automatically in the user editor.( I am able to do this at the moment)
PS:When save the first (content) editor, I take created Web instance's name and then create SitePermission instance ( has Web instance's name) in second editor.(I done it) but do not give reference automatically
And then I want to use created SitePermission instance for referenced in the content editor.This process must do automatically.(When I save content editor)
The created element in second editor should be referenced in the first editor but i get scope failure :
Save Failed
No EObjectDescription could be found in Scope Web.sitePermission for UserModel'UM'.sitePermissions[3]->SitePermission'EEEEE'
Semantic Object: ContentModel'CT'.ownedWeb->Web'EEEEE'
if user press ctrl + space elements in second dsl will be shown and user can choose one of them. This should be done automatically.
i wand to build up cross referened field. User should not choose, it should filled automatically.
I'm working long time on this, but i couldn't solve this problem. can you help me out?
PS :NOW,I can do this:but I have index and give correct reference problem
I created instance and given reference automatically ,but if I use model.getSitePermissions().add(index, object) , I can give reference created instance automatically BUT automatic created element is added second time :
first added : I receive NO EOBJECTDESCRIPTION could be found in Scope but
SECOND ADDED :GİVEN CORRECT reference OBJECT
ı hope, ı can explain my problem.I load my little project
|
|
|
|
Powered by
FUDForum. Page generated in 0.02771 seconds