Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Cross reference problem with rename element
Cross reference problem with rename element [message #1802550] Mon, 11 February 2019 13:36 Go to next message
Eclipse UserFriend
I wrote the following grammar:
Lang: blocks+=(Block)*;

Block: 'begin_block' id=BlockID
       'end_block' ref_id=[BlockID];

BlockID: name=ID;


A simple test file:
begin_block A
end_block A

begin_block A
end_block A


When I select the first A and click on rename element the IDE selects the second and the fourth A (the third A is skipped).
How can I implement rename element to only select the A element which belongs to the right block?
For example, if I select the first A I want to rename only the first and the second A (same for the second block).
Re: Cross reference problem with rename element [message #1802556 is a reply to message #1802550] Mon, 11 February 2019 15:44 Go to previous messageGo to next message
Eclipse UserFriend
how does your scoping implementation look like?
Re: Cross reference problem with rename element [message #1802561 is a reply to message #1802556] Mon, 11 February 2019 17:35 Go to previous messageGo to next message
Eclipse UserFriend
I didn't provide any scoping implementation.
I'm using the default one.

Could you point me what I need to do in order to solve that problem?

Thanks in advance!
Re: Cross reference problem with rename element [message #1802562 is a reply to message #1802561] Mon, 11 February 2019 17:40 Go to previous message
Eclipse UserFriend
Simply implement scoping so that the end actually references the start
If you cutler click or f3 the second end you will se it jumps to the first start
Previous Topic:Action for a context menu on XtextEditor
Next Topic:Usage of and(&) operator in grammar rule
Goto Forum:
  


Current Time: Wed Jun 18 18:22:29 EDT 2025

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

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

Back to the top