Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross referenced element name is getting replaced
Cross referenced element name is getting replaced [message #1808634] Fri, 28 June 2019 05:27 Go to next message
Nagashree KN is currently offline Nagashree KNFriend
Messages: 16
Registered: September 2018
Junior Member
Hi,

In my xtext project i am overriding qualifiedName() method from IQualifiedNameProvider.
As per my requirement i am returning element's path because if two elements have same name but present in different path xtext is not able to differentiate.
here my problem is on saving the editor, xtext is replacing the path to elemet's name, and it will give error couldn't resolve reference.
How i can avoid replacing. please any one can help.

Thanks!!
Re: Cross referenced element name is getting replaced [message #1808635 is a reply to message #1808634] Fri, 28 June 2019 05:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
Hi, can you please give more details (grammar + model snippet) and what you mean by replacing (is it replacing caused by implicit imports like the parent name / first part of the name is the same)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Cross referenced element name is getting replaced [message #1808638 is a reply to message #1808635] Fri, 28 June 2019 06:04 Go to previous messageGo to next message
Nagashree KN is currently offline Nagashree KNFriend
Messages: 16
Registered: September 2018
Junior Member
Thanks for quick replay.

For example i am returning the name form qualifiedName() like this - "ElementName1 [/parentContainer1/parentContainer2/ElementName1]"
but after saving the file in editor it will display only "ElementName1".

I want to dispaly full path, how i can achieve that.
Re: Cross referenced element name is getting replaced [message #1808639 is a reply to message #1808638] Fri, 28 June 2019 06:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
what do you mean by save? serialize?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Cross referenced element name is getting replaced [message #1808641 is a reply to message #1808639] Fri, 28 June 2019 06:15 Go to previous messageGo to next message
Nagashree KN is currently offline Nagashree KNFriend
Messages: 16
Registered: September 2018
Junior Member
Save means here saving the dirty xtext editor, to save the edited contents
Re: Cross referenced element name is getting replaced [message #1808642 is a reply to message #1808641] Fri, 28 June 2019 06:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
xtext does nothing on save
=> there must be something in your code
e.g. do you have a custom IXtextEditorCallback?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Cross referenced element name is getting replaced [message #1808643 is a reply to message #1808642] Fri, 28 June 2019 06:51 Go to previous messageGo to next message
Nagashree KN is currently offline Nagashree KNFriend
Messages: 16
Registered: September 2018
Junior Member
Yes i have. i am extending NatureAddingEditorCallback class and overrided afterCreatePartControl(). in that method i am not implementing any thing.
Because i do not want the dialog "Convert to xtext project".
Re: Cross referenced element name is getting replaced [message #1808644 is a reply to message #1808643] Fri, 28 June 2019 06:59 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
Yes but Xtext does nothing on save
Maybe you have something installed activated
That edits eg text files on save


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:boolean assignment operator not working as expected
Next Topic:Hover information support in Xtext Web editor
Goto Forum:
  


Current Time: Thu Aug 22 18:01:14 GMT 2019

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

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

Back to the top