Skip to main content



      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 01:27 Go to next message
Eclipse UserFriend
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 01:38 Go to previous messageGo to next message
Eclipse UserFriend
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)
Re: Cross referenced element name is getting replaced [message #1808638 is a reply to message #1808635] Fri, 28 June 2019 02:04 Go to previous messageGo to next message
Eclipse UserFriend
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 02:10 Go to previous messageGo to next message
Eclipse UserFriend
what do you mean by save? serialize?
Re: Cross referenced element name is getting replaced [message #1808641 is a reply to message #1808639] Fri, 28 June 2019 02:15 Go to previous messageGo to next message
Eclipse UserFriend
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 02:32 Go to previous messageGo to next message
Eclipse UserFriend
xtext does nothing on save
=> there must be something in your code
e.g. do you have a custom IXtextEditorCallback?
Re: Cross referenced element name is getting replaced [message #1808643 is a reply to message #1808642] Fri, 28 June 2019 02:51 Go to previous messageGo to next message
Eclipse UserFriend
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 02:59 Go to previous message
Eclipse UserFriend
Yes but Xtext does nothing on save
Maybe you have something installed activated
That edits eg text files on save
Previous Topic:boolean assignment operator not working as expected
Next Topic:Hover information support in Xtext Web editor
Goto Forum:
  


Current Time: Fri Apr 18 04:01:33 EDT 2025

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

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

Back to the top