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/JavaIndenter.java
}
	
	/**
	 * Returns <code>true</code> if the current tokens look like a method
	 * declaration header (i.e. only the return type and method name). The
	 * heuristic calls <code>nextToken</code> and expects an identifier
	 * (method name) and a type declaration (an identifier with optional 
	 * brackets) which also covers the visibility modifier of constructors; it
	 * does not recognize package visible constructors. 
	 * 
	 * @return <code>true</code> if the current position looks like a method
	 *         declaration header.
	 */
	private boolean looksLikeMethodDecl() {
		/*
		 * TODO This heuristic does not recognize package private constructors
		 * since those do have neither type nor visibility keywords.
		 * One option would be to go over the parameter list, but that might
		 * be empty as well - hard to do without an AST...
		 */
		
		nextToken();
		if (fToken == Symbols.TokenIDENT) { 
			do nextToken();
			while (skipBrackets()); 
			return fToken == Symbols.TokenIDENT; 
			
		}
		return false;
	}