mihnita / ansi-econsole

Eclipse plugin that understands ANSI escape sequences to color the Eclipse console output.
http://www.mihai-nita.net/java/
Other
90 stars 25 forks source link

No colors on Eclipse 2020-09 #59

Closed simark closed 2 years ago

simark commented 3 years ago

Hi!

I have been using this plugin with no problem, compiling with gcc's -fdiagnostics-color=always and getting nice colors in the console. Since updating my Eclipse to 2020-09, colors don't show up, I see the escape sequences in the console. Here's a screenshot of the test C++ program (from the wiki):

image

And idea where to start digging to find out why it doesn't work?

mihnita commented 3 years ago

I can't reproduce it (I am on 2020-09 since the release, on Win, MacOS and Linux)

But I have a guess what might happen.
Can you please click the enable / disable button a few times? (and make sure it ends "enabled")

I have a known bug (https://github.com/mihnita/ansi-econsole/issues/45) where the icon shows enabled when Eclipse starts even if the plugin is in fact disabled.

If that does not solve it, please provide a bit more info (plugin version, OS version, if it also happens from other programming languages, anything else you might think of)

Thank you very much, Mihai

simark commented 3 years ago

I can't reproduce it (I am on 2020-09 since the release, on Win, MacOS and Linux)

But I have a guess what might happen. Can you please click the enable / disable button a few times? (and make sure it ends "enabled")

I had already tried it (should have mentioned it in the original post). Clicking enable/disable a few times does not help.

I have a known bug (#45) where the icon shows enabled when Eclipse starts even if the plugin is in fact disabled.

If that does not solve it, please provide a bit more info (plugin version, OS version, if it also happens from other programming languages, anything else you might think of)

This is interesting: image The

adsa
^~~~

part does get colored correctly, but not the rest. I didn't see a difference between the escape sequence used for that part and for other parts that don't work. Here's an excerpt of the bytes emitted by the command:

00000180: 4b 65 72 72 6f 72 3a 20 1b 5b 6d 1b 5b 4b e2 80  Kerror: .[m.[K..
00000190: 98 1b 5b 30 31 6d 1b 5b 4b 61 64 73 61 1b 5b 6d  ..[01m.[Kadsa.[m
000001a0: 1b 5b 4b e2 80 99 20 77 61 73 20 6e 6f 74 20 64  .[K... was not d
000001b0: 65 63 6c 61 72 65 64 20 69 6e 20 74 68 69 73 20  eclared in this 
000001c0: 73 63 6f 70 65 0a 20 37 37 39 37 20 7c 20 1b 5b  scope. 7797 | .[
000001d0: 30 31 3b 33 31 6d 1b 5b 4b 61 64 73 61 1b 5b 6d  01;31m.[Kadsa.[m
000001e0: 1b 5b 4b 0a 20 20 20 20 20 20 7c 20 1b 5b 30 31  .[K.      | .[01
000001f0: 3b 33 31 6d 1b 5b 4b 5e 7e 7e 7e 1b 5b 6d 1b 5b  ;31m.[K^~~~.[m.[
00000200: 4b 0a 63 6f 6d 70 69 6c 61 74 69 6f 6e 20 74 65  K.compilation te
mihnita commented 3 years ago

Short version: I am making this and issue #50 a priority for the next release.


Long version

Sorry, I was a bit busy with the 1.4.4 release (and other things)

I can't reliably reproduce it, but I do see problems at times. They seem "random" (sure, they are not, I just don't see the pattern) Sometimes colors fail to show, I clear the console and rebuild, and it works.

Anyway, it looks to me like there is some conflict between what I do and what the C++ build console does.

If you go to Preferences -- C/C++ -- Build -- Console there are also settings for color. My best guess is that it also listens (and acts) on line coloring LineStyleListener.lineGetStyle()

I also suspect that this is related to issue #50

So now, with 1.4.4 out of the way, I will focus on the C/C++ build console (this issue and issue #50)