My Eclipse Word Wrap plug-in and the line number ruler fix

A few days ago I released the first contribution to the Eclipse open-source project. :)

While using TeXlipse I found it hard to write long paragraphs because Eclipse did not have a soft line wrapping feature. Usually for every problem there is an Eclipse plug-in. And so I found the word wrap plug-in by Ahti Kitsik which enabled the missing feature. The only problem was the line number ruler which displayed the wrong numbers for wrapped lines but I could live with that.

Unfortunately by changing to Eclipse Juno 4.2 the word wrap feature did not work anymore because the utilised extension point was deprecated now. So I rewrote the plug-in from scratch and made it compatible with the latest Eclipse release and set me as a goal to fix the line number ruler column too. After creating a working word wrap plug-in I tried to figure out where the line ruler column was rendered and how I could make it work together with the word wrapping. It turned out that the LineNumberRulerColumn class within the org.eclipse.jface.text plug-in has to be modified.

After playing around with that class und adding several lines of new code I can now present a working fix for the line number ruler column to you. :smile: You can find a detailed explanation on its project website and to see it in action please take a look at the closely related word wrap project website. :smile:

Eclipse with Word Wrap plug-in and fixed line number ruler column

This is a solution for a bug that was reported almost ten years ago. I really hope that my work will make it into an official Eclipse release. ;)

It was very nice from Holger Voormann to mention me on Twitter and writing a blog post including a video about my work. Thank you very much! :)

Further Information:

25 thoughts on “My Eclipse Word Wrap plug-in and the line number ruler fix

  1. Pingback: Word Wrap Wanted! -

  2. Pingback: Welcome back on WordPress | brain.flush();

  3. Pingback: Eclipse Word-Wrap Plug-In Update | brain.flush();

  4. Curros

    woooow, really works! I program in a really small screen in my work, and this is perfect!
    Tks for the work!

    1. Flo Post author

      It's great that you like it! That's cool, I never thought about small screens but this seems to be a very good use case for the plugin. :)

    1. Flo Post author

      Hi Tobias,

      I proposed a patch to integrate the word-wrap functionality into Eclipse which is currently under review. If the patch is accepted word-wrap is part of the future Eclipse releases. :)

      I guess at this point we just can wait. ;)

      Kind Regards

  5. Green

    If you can not cleanly view line ruller fix => Eclipse re-run with "-clean" parameters...
    In OSX like this "./ -clean".
    In Windows like this "Eclipse.exe -clean".
    Thanks Florian !

    1. Flo Post author

      You are welcome! :) Thanks for mentioning the -clean parameter again. This should help in most cases. ;)

    2. Matthias

      Good job, Flo!
      This is a feature I missed for years in TeXlipse!

      And thanks to @Green for the hint with -clean which was needed in my case to get it going

  6. Kamil

    great plugin, but I've got a question. I'm using Eclipse Kepler + PDT and line-wrapping works fine. But I've got problem with keybord shortcuts - there are two of them: CTR+ALT+E and the other one is RALT+E. and that second shorcut is boher me becouse It's the same one as one of the polIsh diacritical mark (my native language). I've tried to change it in Properties -> Generals -> Keys and there I found Word Wrap and change shortcut but this solution didn't make the job.

    Is there any way to disable RALT+E shortcut?

    Kind Regards,

    1. Flo Post author

      Hi Kamil,

      sorry, unfortunately it's currently not possible to change the shortcut-key. I'll add this feature in a future version of the word-wrap plugin. :)

      Kind Regards

    1. Flo Post author

      Hi Sascha! I'm working on it but currently struggle with some dependencies.. Hope that it will be included in the next official Eclipse release - keep your fingers crossed :)

Leave a Reply

Your email address will not be published. Required fields are marked *