Bug 27005 [typing] Smart string wrapping
Using1119, I noticed something quite annoying. Consider the following code: String s = ""; If you copy some code like: class A { // comment } And then you paste it between the double-quotes, you will end up with: String s = "public class A { // comment" + "}"; The problem is that this code is not equivalent. I should have a line break at the end of the first line. Otherwise the code contained in my string s doesn't even compile. So the feature is nice, but cannot be used till a line break is added at the end of each part of the string concatenation. So in the above example, I would expect: String s = "public class A { // comment\n" + "}"; or String s = "public class A { // comment\r\n" + "}"; or String s = "public class A { // comment\r" + "}"; The line break could be chosen according to the line breaks in the current file or the platform line delimiter.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.texteditor.ExtendedTextEditorPreferenceConstants;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.ui.text.IJavaColorConstants;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage;
import org.eclipse.jdt.internal.ui.preferences.WorkInProgressPreferencePage;
/**
 * Preference constants used in the JDT-UI preference store. Clients should only read the
 * JDT-UI preference store using these values. Clients are not allowed to modify the 
 * preference store programmatically.
 * 
 * @since 2.0
  */
public class PreferenceConstants {
	private PreferenceConstants() {
	}
	
	/**
	 * A named preference that controls return type rendering of methods in the UI.
	 * <p>
	 * Value is of type <code>Boolean</code>: if <code>true</code> return types
	 * are rendered
	 * </p>
	 */
	public static final String APPEARANCE_METHOD_RETURNTYPE= "org.eclipse.jdt.ui.methodreturntype";
	/**
	 * A named preference that controls if override indicators are rendered in the UI.