Internationalization Cookbook
This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

My Eclipse Plugins & Java tools

Table of Contents

All open source, all GitHub hosted :-)

Installation

To install the plugins in Eclipse select “Help” -> “Install New Software…” and click “Add…” to add the following URL:

http://www.mihai-nita.net/eclipse

You can then select the site in the “Work with” list and continue the installation like with any other plugin.

ANSI escape sequences in Eclipse Console

Ansi Console uses ANSI escape sequences to color the console output. This can be pretty handy when using something like jansi

But is also works if you output escape sequences directly from Java. Or from Perl, C++, or Groovy, or any other Eclipse hosted language.

See here the complete info.

ANSI Console Sample

External Filter for Eclipse

This is a plugin that allows you to take text content from an Eclispe document, process it through an external tool,
and the make the result available in Eclispe at the end.
The text is “feed” to the tool as standard input and the standard output becomes the result.

See here the complete info.

Configuration dialog

Color console logging for log4j, jdk, and loogback

The project (with sources, of course), and a ReadMe on how to use the loggers is hosted on GitHub,
https://github.com/mihnita/java-color-loggers.

This is a hosting place for the binaries, since GitHub does not offer binaries download anymore :-(

GitHub has now “releases” to host binaries, so go there to take the latest version.

12 Comments to “My Eclipse Plugins & Java tools”

  1. vak says:

    i put questions in two comments on http://marketplace.eclipse.org/content/ansi-escape-console
    but they are not yet approved…

  2. dantel says:

    Sounds like a nice plugin, but I encounter problems using it with Indigo. I can see some colors, but they keep changing when I scroll through the console. Is this a known issue? I tested it with the System.out.println provided in the comments ( System.out.println(“This is \u001b[1;31mRED\u001b[0m and works.”);). So – the only red part of this should be the word RED. This is what I see: http://s1.directupload.net/images/140802/e5veh4gy.png

    And it keeps changing as I scroll.

    Any advice? Would really like to use this plugin.

    • Mihai says:

      Sorry, it is a known bug (https://github.com/mihnita/ansi-econsole/issues/3)
      It is caused by colors that go across several lines.

      But unfortunately I have no clue how to attack it. At least for now.
      Eclipse calls my function for each line, to get color info.
      And it used to “remember” the colors once set. But not anymore.
      So I would have to do the remembering myself, but there is nothing to uniquely identify a line.
      The only fix I can think about means some caching, and some heuristics (but nothing 100% reliable).

      Anyway, sorry, it bothers me, and I keep thinking…
      For now the only workaround is to avoid multi-line colors.
      (for instance in your instance coloring only the ERROR / WARN part, of possible)

  3. Neil says:

    using Kepler … getting:
    Unable to read repository at http://www.mihai-nita.net/eclipse/content.xml.
    Unable to read repository at http://www.mihai-nita.net/eclipse/content.xml.
    Invalid argument

    when I try to connect to the install repository

  4. Vitaly says:

    Awesome work on the ANSI console. I am working on some hobby MUD game projects and it is really useful to have color output on the console. Thank you, thank you, thank you!

  5. OLF says:

    ANSI Console is not working in my Juno Eclipse
    Installation without errors, no issues in .log.
    Any suggestions how to knock down the issue?

    • Mihai says:

      Try something very simple, that does not involve any third-party library, for instance

        System.out.println("This is \u001b[1;31mRED\u001b[0m and works.");
      

      If that works, then it is not the plugin or Eclipse, but something else that you are using / doing.

      One cause possible: many libraries detect if the standard output is redirected, and if that is the case, they don’s output ANSI escapes anymore.

      In most cases there are ways to force them to do that, but the solution is library specific.
      One example is jansi, and the way to force it is by setting jansi.passthrough
      (http://jansi.fusesource.org/blog/releases/release-1.8.html)

  6. Joel says:

    Hi this is kinda of off topic but I was wondering if blogs use WYSIWYG editors
    or if you have to manually code with HTML. I’m starting a blog soon but have no coding know-how so I wanted
    to get advice from someone with experience. Any help would be greatly appreciated!

    • Mihai says:

      I do direct HTML codding. But that’s just me: I host my own instance of WordPress, on my own site, designed my own theme… :-)

      It does not have to be this way, or course. You can find some blogging software that has WYSIWYG. But I had no interest in that, and I did not research.

      So sorry, there is not much help I can offer here.
      Except that I am sure that if you search, you will find a lot of options with decent blog hosting and WYSIWYG.

Leave a comment