Bug 6410 File unchanged but dirtied by code assist
1122. Open a Java file. Place the cursor inside the left-most parenthesis of a method call. For example, consider "I" to be the cursor below: Object o = anotherObject.method(I); Press Ctrl-Space. The file is dirtied but not changed, and code assist does not appear. If code assist has nothing to suggest, it should not dirty the file.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposal.java
}
	/**
	 * Sets the image.
	 * @param image The image to set
	 */
	public void setImage(Image image) {
		fImage= image;
	}
	/*
	 * @see ICompletionProposalExtension#isValidFor(IDocument, int)
	 */
	public boolean isValidFor(IDocument document, int offset) {
		
		if (offset < fReplacementOffset)
			return false;
		
		int replacementLength= fReplacementString == null ? 0 : fReplacementString.length();
		if (offset >=  fReplacementOffset + replacementLength)
			return false;
		
		try {
			int length= offset - fReplacementOffset;
			String start= document.get(fReplacementOffset, length);
			return fReplacementString.substring(0, length).equalsIgnoreCase(start);
		} catch (BadLocationException x) {
		}		
		
		return false;
	}
}