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
/**
	 * A named preference that controls if comment stubs will be added
	 * automatically to newly created types and methods.
	 * <p>
	 * Value is of type <code>Boolean</code>.
	 * </p>
	 * @since 2.1
	 */
	public static final String CODEGEN_ADD_COMMENTS= "org.eclipse.jdt.ui.javadoc"; 
	/**
	 * A named preference that controls if a comment stubs will be added
	 * automatocally to newly created types and methods.
	 * <p>
	 * Value is of type <code>Boolean</code>.
	 * </p>
	 * @deprecated Use CODEGEN_ADD_COMMENTS instead (Name is more precice).
	 */
	public static final String CODEGEN__JAVADOC_STUBS= CODEGEN_ADD_COMMENTS;
	/**
	 * A named preference that controls if a non-javadoc comment gets added to methods generated via the 
	 * "Override Methods" operation.
	 * <p>
	 * Value is of type <code>Boolean</code>.
	 * </p>
	 * @deprecated New code template story: user can
	 * specify the overriding method comment.
	 */
	public static final String CODEGEN__NON_JAVADOC_COMMENTS= "org.eclipse.jdt.ui.seecomments"; 
	/**
	 * A named preference that controls if a file comment gets added to newly created files.