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
private CharSequence createIndent(int indent) {
		
		JavaCore plugin= JavaCore.getJavaCore();
		if (plugin == null) {
			StringBuffer ret= new StringBuffer();
			while (indent-- > 0)
				ret.append('\t');
			
			return ret;
		} else {
			StringBuffer oneIndent= new StringBuffer();
			if (JavaCore.SPACE.equals(JavaCore.getOption(JavaCore.FORMATTER_TAB_CHAR))) {
				int tabLen= Integer.parseInt(JavaCore.getOption(JavaCore.FORMATTER_TAB_SIZE));
				for (int i= 0; i < tabLen; i++)
					oneIndent.append(' ');
			} else if (JavaCore.TAB.equals(JavaCore.getOption(JavaCore.FORMATTER_TAB_CHAR)))
				oneIndent.append('\t');
			else
				oneIndent.append('\t'); 
			
			StringBuffer ret= new StringBuffer();
			for (int i= 0; i < indent; i++)
				ret.append(oneIndent);
			
			return ret;
		}
		
	}
	
	/**