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/internal/ui/preferences/JavaEditorPreferencePage.java
}
		String[][] items= new String[listModelItems.size()][];
		listModelItems.toArray(items);
		return items;
	}	private Control createTypingPage(Composite parent) {
		Composite composite= new Composite(parent, SWT.NONE);
		GridLayout layout= new GridLayout();
		layout.numColumns= 1;
		composite.setLayout(layout);
		String label= PreferencesMessages.getString("JavaEditorPreferencePage.smartHomeEnd"); 
		addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_HOME_END, 1);
		label= PreferencesMessages.getString("JavaEditorPreferencePage.subWordNavigation"); 
		addCheckBox(composite, label, PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, 1);
	
		addFiller(composite);
		Group group= new Group(composite, SWT.NONE);
		layout= new GridLayout();
		layout.numColumns= 2;
		group.setLayout(layout);
		group.setText(PreferencesMessages.getString("JavaEditorPreferencePage.typing.description")); 
		label= PreferencesMessages.getString("JavaEditorPreferencePage.wrapStrings"); 
		addCheckBox(group, label, PreferenceConstants.EDITOR_WRAP_STRINGS, 1);
		
		label= PreferencesMessages.getString("JavaEditorPreferencePage.smartPaste"); 
		addCheckBox(group, label, PreferenceConstants.EDITOR_SMART_PASTE, 1);
		label= PreferencesMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs"); 
		addCheckBox(group, label, PreferenceConstants.EDITOR_SPACES_FOR_TABS, 1);
		label= PreferencesMessages.getString("JavaEditorPreferencePage.closeStrings"); 
		addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_STRINGS, 1);
		label= PreferencesMessages.getString("JavaEditorPreferencePage.closeBrackets");