ANSI Escape in Console

Add this URL to your Eclipse Installation to reach this solution's update site.

Mars (4.5)
Luna (4.4)
Kepler (4.3)
Juno (4.2, 3.8)
Previous to Juno (<=4.1)
Neon (4.6)
Oxygen (4.7)
Photon (4.8)
2018-09 (4.9)


Learn more...

Details Group Tabs

Details

This Eclipse plugin interprets the ANSI escape sequences to color the console output.

It works for output text with escape sequences directly from Java, Groovy, C/C++, Perl, Python, or any other Eclipse hosted language that outputs text to the standard output.

Additional Details
Eclipse Versions: 
Mars (4.5), Luna (4.4), Kepler (4.3), Juno (4.2, 3.8), Previous to Juno (<=4.1), Neon (4.6), Oxygen (4.7), Photon (4.8), 2018-09 (4.9)
Platform Support: 
Windows, Mac, Linux/GTK
Organization Name: 
Date Created: 
Tue, 2014-04-01 01:25
Development Status: 
Production/Stable
License: 
Apache 2.0
Date Updated: 
Thu, 2018-08-23 15:02
Screenshots
Metrics
DateRankingInstallsClickthroughs
December 2018106/887385 (0.16%)6
November 2018112/939955 (0.15%)15
October 2018109/943975 (0.15%)19
September 2018111/941848 (0.16%)24
August 2018108/939870 (0.17%)16
July 2018104/940935 (0.17%)15
June 2018117/947788 (0.16%)21
May 2018124/954785 (0.14%)21
April 2018116/946835 (0.15%)10
March 2018120/961817 (0.15%)17
February 2018120/940681 (0.15%)25
January 2018118/945785 (0.16%)28
View Data for all Listings
Errors
External Install Button

Marketplace Drag to Install button

By adding the following code below to your website you will be able to add an install button for ANSI Escape in Console.

HTML Code:


Markdown Syntax:



Output: Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client
Thursday, December 13, 2018 - 01:19
drobinsonnd5's picture

I get this error:

Unable to read repository at http /www.miha i-nita.net/ eclipse/content.xml.
Received fatal alert: internal_error

Eclipse IDE for C/C++ Developers, with WICED SDK 3.4.0

Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600

drobinsonnd5's picture

I switched to a different version of Eclipse and was able to install from the Marketplace to that version's plugins directory.

I copied the JAR file to the plugins directory of the version that failed to load and it works.

There appears to be a version incompatibility between the version of Eclipse used by Cypress and the Marketplace (at least for this package.)

asolovjevqet's picture

Does not work properly with multiline coloring. I have about 30 lines of output from c++. Let's say the line 10 is the sequence of red color. Then 3 lines that should be red and the code for restoring the default color in the end of the third line. Other lines should have default color. With such output I've got red in different places while scrolling the eclipse's terminal. Sometimes red are first 10 lines, sometimes last part of the text. May be the plugin works only if setting and restoring sequences are localized in the same line?

Oxygen.3a Release (4.7.3a)

mnita's picture

Unfortiunately, a known problem, and one that I don't really think I can solve.
https://github.com/mihnita/ansi-econsole/issues/3

It is a limitation in the Eclipse console itself: my plugin only get a line at the time, and when the console buffer gets full the top lines are dropped, the line numbers change, and all context is lost. So when coloring the current line there is no way to know what was set X lines above :-(

I am also anoyed by this bug, I have some idea. But is very hacky, but it might also mess up the performance.

Sorry,
Mihai

 

sasadi's picture

Could you notify us whenever you have a new release of "ANSI Escape in Console" for Mac OS High Sierra?

I am using Eclipse C++ in Mac OS High Sierra. It seems this pluging removed a part of messages in the console. 

s_asadi83[at]yahoo.con

rcarrm45's picture

Spring Boot applications that log using ANSI color codes won't display on the eclipse console. If the text is copied from the console to another app (say Terminal), you can read all the text. It is as though  the text is rendered in the same color as the background color of the conole.

mnita's picture

This seems to be a system / SWT problem.
Bug opened, https://bugs.eclipse.org/bugs/show_bug.cgi?id=525383

aamfistomos's picture

Still occurs with Mac OS High Sierra official release...

mnita's picture

This seems to be a system / SWT problem.
Bug opened, https://bugs.eclipse.org/bugs/show_bug.cgi?id=525383

hsengupta's picture

Cannot Install. Facing error
"Unable to read repository at http-www mihai-nita net -eclipse-content xml
peer not authenticated"

Can anyone look into this Please..

vmisingnamekvr's picture

Hi, is it possible to turn on also ANSI-coloring during build in build console for ROS groovy projects?
For some reason it is not ANSI-colored here (Eclipse 4.4)

mnita's picture

Sorry, I don't have an Ubuntu installed (just Win and Fedora).
I have found a VM, and I can try that.

But a quick look at the sources finds this "suspicious" line in catkin_make and catkin_prepare_release:

# force --no-color if stdout is non-interactive
if not sys.stdout.isatty():
    args.no_color = True

Since Eclipse needs to capture its output, it starts the build with the stdio and stderr redirected.
And that makes sys.stdout.isatty() return False (because the Eclipse console is not really a terminal).

It looks like there is no way to get around this without code changes.
But you can just comment these two lines and it should work.

If you are on Windows, the terminal_color.py also needs some fixing, because it assumes that Windows cannot support ANSI escapes (not true):

if os.name in ['nt']:
    disable_ANSI_colors()

The way I would fix ROS "for real" would be by adding a --force-color flag
(or do what most posix apps do: --color=never|always|auto and also honor an environment variable)

Anyway, if commenting the "if not sys.stdout.isatty():" does not work, please let me know, and I will go ahead and try top setup a working ROS environment.

Thank you,
Mihai

mnita's picture

I don't know, I have never played with ROS. Let me give it a try, and will get back to you.
Thank you!
Mihai

pverest's picture

Just look at picture and try to recall all those ANSI codes...