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
* 		is the same as for an <code>else</code> keyword</li>
	 * </ul>
	 * 
	 * @param offset the offset for which the reference is computed
	 * @param peekNextChar whether to take the next character (closing
	 *        brace etc.) on the same line as <code>offset</code> into account
	 * 		  and handle indentation accordingly
	 * @return the reference statement relative to which <code>offset</code>
	 *         should be indented, or {@link JavaHeuristicScanner#NOT_FOUND}
	 */
	public int findReferencePosition(int offset, boolean peekNextChar) {
		boolean danglingElse= false;
		boolean unindent= false;
		boolean matchBrace= false;
		boolean matchParen= false;
		boolean matchCase= false;
		
			
			
			
			
			 
		if (peekNextChar) {
			if (offset < fDocument.getLength()) {
				try {
					IRegion line= fDocument.getLineInformationOfOffset(offset);
					int lineOffset= line.getOffset();
					int next= fScanner.nextToken(offset, lineOffset + line.getLength());
					int prevPos= Math.max(offset - 1, 0);
					boolean isFirstTokenOnLine= fDocument.get(lineOffset, prevPos + 1 - lineOffset).trim().length() == 0;