Bug 50230 Paste omits a character
20040119 - In the following text, double click on 'rel' to get the word selected. - CTRL + C - Set cursor between empty brackets, paste -> only pastes 'el', the letter 'r' is gone protected Object getAttribute(Object parent, int childProperty) { if (child instanceof List) { } else if (rel != null && !rel.equals(child)) { } else if () return child; }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
if (d.get(lineOffset, p - lineOffset).trim().length() != 0)
				return;
			
			
			int pos= scanner.findNonWhitespaceBackward(p, JavaHeuristicScanner.UNBOUND);
			if (pos == -1)
				return;
			int lastLine= d.getLineOfOffset(pos);
			
			
			if (lastLine < line) {
			
				JavaIndenter indenter= new JavaIndenter(d, scanner);
				StringBuffer indent= indenter.computeIndentation(p, true);
				if (indent != null) {
					c.text= indent.append(c.text).toString();
					c.length += c.offset - lineOffset;
					c.offset= lineOffset;
				}
			}
			
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
		
	}
	private void smartIndentAfterNewLine(IDocument d, DocumentCommand c) {
		JavaHeuristicScanner scanner= new JavaHeuristicScanner(d);
		JavaIndenter indenter= new JavaIndenter(d, scanner);