Community
Participate
Working Groups
Using this code: static void orgEclipseUiIdePrefs() { ArrayList<String> lines = new ArrayList<>(); lines.add("MAX_RECENT_WORKSPACES=5"); lines.add( "RECENT_WORKSPACES=C\\:\\\\Users\\\\Timo\\\\workspaceEVE\n" + "RECENT_WORKSPACES_PROTOCOL=3\n" + "SHOW_WORKSPACE_SELECTION_DIALOG=false\n" + "eclipse.preferences.version=1\n" + ""); } 1. Select and copy text from the first lines.add-line so that the selection (without the '-quote marks) is '");<line-break><tab><tab>lines.add(' or as multi-line: "); lines.add( 2. Select the following text from the next line: '\n" + ' 3. Paste the text selected in step 1. The result is static void orgEclipseUiIdePrefs() { ArrayList<String> lines = new ArrayList<>(); lines.add("MAX_RECENT_WORKSPACES=5"); lines.add( "RECENT_WORKSPACES=C\\:\\\\Users\\\\Timo\\\\workspaceEVE\");\n" + " lines.add( "RECENT_WORKSPACES_PROTOCOL=3\n" + "SHOW_WORKSPACE_SELECTION_DIALOG=false\n" + "eclipse.preferences.version=1\n" + ""); } which doesn't compile anymore. The result should be: static void orgEclipseUiIdePrefs() { ArrayList<String> lines = new ArrayList<>(); lines.add("MAX_RECENT_WORKSPACES=5"); lines.add( "RECENT_WORKSPACES=C\\:\\\\Users\\\\Timo\\\\workspaceEVE"); lines.add( "RECENT_WORKSPACES_PROTOCOL=3\n" + "SHOW_WORKSPACE_SELECTION_DIALOG=false\n" + "eclipse.preferences.version=1\n" + ""); } which compiles fine.
Actually, I think a simpler heuristic than what is suggested in the summary would be to do a plain-old paste without any escaping if both the start and the end locations of the replaced selection are not within a String literal.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.