Cannot "cut and paste " from "console"..... [message #1822392] |
Thu, 05 March 2020 09:36  |
Eclipse User |
|
|
|
This is beyond frustrating , but MAYBE there is an option SOMEWHERE.
I feel that Eclipse (2019-12) "developers AKA coders" need to reinvent themselves and IMPLEMENT such basic GUI "feature" as "cut and paste" or "select text" block and use plain Ctrl C / Ctrl V.
Why is such basic editing stuff NOT implemented ?
PS Don't tell me to post bug - it won't take "anonymous" and its too detailed for plain user.
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Cannot "cut and paste " from "console"..... [message #1848317 is a reply to message #1822485] |
Sat, 27 November 2021 20:06  |
Eclipse User |
|
|
|
Hello,
Maybe it will help some people who have problems copying the Eclipse console:
I couldn't paste text that I had selected in the console and copied (either through shortcuts or menus). Or sometimes I had only a part of the text pasted. I realized that the text I was printing in console was built in my code from a badly initialized char array (containing only 0's). Translation: the invisible characters cannot be copied. They even stop the copy of other following selected characters.
It also works like this because the preference of my console "Interpret ASCII control characters" is unchecked.
Small demonstration example (in Java):
public static void main(String[] args) {
char[] array = new char[10]; // new char array, so filled with 0
java.util.Arrays.fill(array, 1, array.length-1, 'x'); // I fill all characters with an x, except the first and the last, which stay to 0.
System.out.println( new String(array) );
char[] array = new char[10];
Arrays.fill(array, 0, array.length, 'x'); // fill the array with 'x'
array[1]=(char)0x005C0000; // then set the 2nd char to null char (the same if I set with 0)
array[array.length-2]=(char)0x005C0000; // then set the 2nd to last char to null.
System.out.println( new String(array) );
}
The console shows "x xxxxx x". CTRL-A (all is selected), CTRL-C then CTRL-V: I get only x.
If I check the preference "Interpret ASCII control characters", the console shows "xxxxxxx" and can be copied and pasted.
|
|
|
Powered by
FUDForum. Page generated in 0.06902 seconds