Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325729

Summary: [Grammar Editor] Some quirks
Product: [Modeling] TMF Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: sven.efftinge
Version: 1.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: M2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 325815    
Bug Blocks:    

Description Sebastian Zarnekow CLA 2010-09-20 06:06:05 EDT
Entering "RuleName:" will automatically insert the closing ";". 
Completing the rule with (| == cursor position)
RuleName: name=ID|; 
and pressing enter will lead to
RuleName: name=ID
;;

=========

RuleName:|
  name=ID
;

Enter leads to

RuleName:
    |
;
  name=ID
;

=========
RuleName:
  ('[' value=ID)|
  (value2=ID ']')
;

Enter leads to
RuleName:
  ('[' value=ID)
    |
  (value2=ID ']')
;
Comment 1 Sebastian Zarnekow CLA 2010-09-20 06:09:06 EDT
Set severity to major as editing a grammar is hard.

Another quirk (>< indicates the selection:

RuleName:
  (>'<[' value=ID)
;

Entering double quotes leads to

RuleName:
  ("|"[' value=ID)
;

Expected:
RuleName:
  ("[' value=ID)
;

Removing the superflous doublequote and selecting the second singlequote to replace it by a double quote leads to:

RuleName:
  ("["|" value=ID)
;

which is unexpected as well.
Comment 2 Sebastian Zarnekow CLA 2010-09-20 07:38:47 EDT
Another issue (again | == cursor position):

RuleName:
  (
  |'a' 'b' &
  'c' 'd'
  )
;

Typing ( should only insert an opening brace.
Comment 3 Sven Efftinge CLA 2010-09-21 16:20:46 EDT
fixed
Comment 4 Karsten Thoms CLA 2017-09-19 16:06:32 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.