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

Bug 313610

Summary: Bug in org.eclipse.xtext.example.arithmetics.ui.autoedit.InterpreterAutoEdit
Product: [Modeling] TMF Reporter: Harald M <harald.m>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: sven.efftinge
Version: unspecifiedFlags: sven.efftinge: helios+
Target Milestone: RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch sven.efftinge: iplog+

Description Harald M CLA 2010-05-19 15:26:15 EDT
Build Identifier: 

Computation of offset has a bug

*** current:

 int lineStart;
 try {
  lineStart = document.getLineOfOffset(command.offset);
  if (!document.get(lineStart, 3).equals("def")) {

*** fixed:

 int line;
 int lineStart;
 try {
  line = document.getLineOfOffset(command.offset);
  lineStart = document.getLineOffset(line);
  if (!document.get(lineStart, 3).equals("def")) {

Reproducible: Always
Comment 1 Harald M CLA 2010-05-19 15:28:48 EDT
Created attachment 169197 [details]
Patch
Comment 2 Sven Efftinge CLA 2010-05-26 05:17:55 EDT
patch applied, thanks.
Comment 3 Karsten Thoms CLA 2017-09-19 16:14:47 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.