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

Bug 319007

Summary: [Documentation] Bug in code snippet for semantic highlighting
Product: [Modeling] TMF Reporter: Lothar Wendehals <lothar.wendehals>
Component: XtextAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: jan, sebastian.zarnekow, tmf.xtext-inbox
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: SR1   
Hardware: All   
OS: All   
Whiteboard:

Description Lothar Wendehals CLA 2010-07-06 09:11:22 EDT
Build Identifier: 20100617-1415

The code in the snippet is inconsistent:

  for (AbstractNode abstractNode : allNodes) {
    if (abstractNode.getGrammarElement() instanceof CrossReference) {
>>>      acceptor.addPosition(node.getOffset(), node.getLength(), <<<
        MyHighlightingConfiguration.CROSS_REF);
    }
  }

should be:
>>>      acceptor.addPosition(abstractNode.getOffset(), abstractNode.getLength(), <<<


Reproducible: Always
Comment 1 Jan Koehnlein CLA 2010-08-05 11:13:58 EDT
Fixed in HEAD.
Comment 2 Karsten Thoms CLA 2017-09-19 15:46:38 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.