Bug 96280 [typing] Smart paste has problems if second line has only whitespaces
N20050523-0010 Paste the following into a method: void hasOneExitPoint() { } void hasTwoExitPoints(int i) { if (i < 0) callsMethodThatThrowsRuntimeException(i); }
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, fProject);
				StringBuffer indent= indenter.computeIndentation(p, true);
				String toDelete= d.get(lineOffset, c.offset - lineOffset);
				if (indent != null && !indent.toString().equals(toDelete)) {
					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, fProject);
		StringBuffer indent= indenter.computeIndentation(c.offset);
		if (indent == null)
			indent= new StringBuffer(); 
		int docLength= d.getLength();