Bug 3811 Setter / Getter generates setter for final fields (1GEUMGT)
- private final String fName; - generate Setter and Getter - you get public void setName(String name) { fName= name; } which produces a compile error. NOTES: EG (6/5/2001 3:41:01 AM) not critical, can be documented. MA (02.08.2001 16:49:08) fixed in 200
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/codemanipulation/ImportsStructure.java
buf.append(lineDelim);	
				if (importsStart > 0) { 
					buf.insert(0, lineDelim);
					buf.insert(0, lineDelim);  
				} else {
					buf.append(lineDelim);
				}
			}
			String newContent= buf.toString();
			if (hasChanged(doc, importsStart, importsLen, newContent)) {
				doc.replace(importsStart, importsLen, newContent);
			}
		} catch (BadLocationException e) {
			
			JavaPlugin.log(e);
		}
	}
	
	private boolean hasChanged(IDocument doc, int offset, int length, String content) throws BadLocationException {
		if (content.length() != length) {
			return true;
		}
		for (int i= 0; i < length; i++) {
			if (content.charAt(i) != doc.getChar(offset + i)) {
				return true;
			}
		}
		return false;	
	}