Community
Participate
Working Groups
203 1. Rename org.eclipse.jdt.internal.ui.wizards.dialogfields to org.eclipse.jdt.internal.ui.wizards.dialogfields1 2. Look at ListDialogField.java Half of the imports are corrupted. (i missing) /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards.dialogfields1; import java.util.ArrayList; mport java.util.Iterator; mport java.util.List; import org.eclipse.swt.SWT; mport org.eclipse.swt.events.SelectionEvent; mport org.eclipse.swt.events.SelectionListener; mport org.eclipse.swt.graphics.Image; mport org.eclipse.swt.widgets.Button; mport org.eclipse.swt.widgets.Composite; mport org.eclipse.swt.widgets.Control; mport org.eclipse.swt.widgets.Display; ...
Created attachment 5 [details] test case
reproduced - it has sth to do with line delimiters. see the attached file - line delims are unusual. refactoring forwards the call to IPackageFragment::rename moving to jcore.
I wonder why this file contains \r\n and \r line delimiters. The problem seems to come from the normalizeCRs in the Buffer class. I'll investigate more as soon as I can debug again. Is it normal that a file contains two different line delimiters?
I found the problem. It was located in the normalizeCRs(char[]) in the Buffer class. When we got '\r' even if the next character was not '\n', we increment the lineStart by two. This is why we missed the 'i' character at the beginning of the import statements. Fixed and released in HEAD. All tests are green.
Files are allowed to have more than one kind of line delimiter. This is handeled correctly by the editor. Anyhow, all our operations try to not introduce new line delimiters.