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
endOfWS= scanner.findNonWhitespaceForwardInAnyPartition(lineOffset, lineOffset + lineLength);
				if (endOfWS == JavaHeuristicScanner.NOT_FOUND)
					endOfWS= lineOffset + lineLength;
				
				int wsLen= Math.max(endOfWS - lineOffset, 0);
				temp.replace(lineOffset, wsLen, indent.toString());
			}
			
			temp.setDocumentPartitioner(IJavaPartitions.JAVA_PARTITIONING, null);
			command.text= temp.get(prefix.length(), temp.getLength() - prefix.length() - afterContent.length());
			
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		} catch (BadPartitioningException e) {
			JavaPlugin.log(e);
		}
	}
    private static int getPeerPosition(IDocument document, DocumentCommand command) {
    	/*
    	 * Search for scope closers in the pasted text and find their opening peers
    	 * in the document. 
    	 */
    	Document pasted= new Document(command.text);
    	installJavaStuff(pasted);
    	int firstPeer= command.offset;
    	
    	JavaHeuristicScanner pScanner= new JavaHeuristicScanner(pasted);
    	JavaHeuristicScanner dScanner= new JavaHeuristicScanner(document);