Bug 48641 [typing] Smart paste "fixes" comments
A new feature was added to M5 where smart paste fixes C style comments into Java style comments: /* * */ becomes: /* * */ The problem is that we have lots of text that is formatted the using C style and using smart paste makes the code inconistent. I don't use the feature but others on the team do. Shouldn't smart paste just indent the code?
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
* 
	 * @param document the document being modified
	 * @param position the first character position in <code>document</code> to be considered
	 * @param partitioning the document partitioning
	 * @return <code>true</code> if the content of <code>document</code> looks like an anonymous class definition, <code>false</code> otherwise
	 */
	private static boolean looksLikeAnonymousClassDef(IDocument document, String partitioning, JavaHeuristicScanner scanner, int position) {
		int previousCommaOrParen= scanner.scanBackward(position - 1, JavaHeuristicScanner.UNBOUND, new char[] {',', '('});
		if (previousCommaOrParen == -1 || position < previousCommaOrParen + 5) 
			return false;
		if (isNewMatch(document, previousCommaOrParen + 1, position - previousCommaOrParen - 2, partitioning))
			return true;
		return false;
	}
	/**
	 * Checks whether <code>position</code> resides in a default (Java) partition of <code>document</code>.
	 * 
	 * @param document the document being modified
	 * @param position the position to be checked
	 * @param partitioning the document partitioning
	 * @return <code>true</code> if <code>position</code> is in the default partition of <code>document</code>, <code>false</code> otherwise
	 */
	private static boolean isDefaultPartition(IDocument document, int position, String partitioning) {
		Assert.isTrue(position >= 0);
		Assert.isTrue(position <= document.getLength());
		
		try {
			ITypedRegion region= TextUtilities.getPartition(document, partitioning, position);
			return region.getType().equals(IDocument.DEFAULT_CONTENT_TYPE);