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

brain.flush(); > Development > 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

  • Pascal

    Respect, sure good for your vita

    Reply
  • Markus

    Interesting, englischer Beitrag in nem deutschen Blog xD

    Reply
    • Flo

      Yes, I will restart brain.flush() in pure english soon :D and based on wordpress... again :D

      Reply

Pingback: Word Wrap Wanted! - eclipsehowl.wordpress.com

  • Lars Vogel

    Congratulations and thank you for your effort.

    Reply
    • Flo

      Thank you. I really appreciate your comment! :)

      Reply

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

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

  • Torsten

    Saubere Arbeit! Danke für dieses Plug-in, das ich in funktionierender Form schon ewige Zeiten in Eclipse vermisse ...

    Reply
    • Flo

      Danke! :) Mich hat das auch schon ewig gestört... So entstehen solche Bugfixes, was? ;)

      Reply
  • Curros

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

    Reply
    • Flo

      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. :)

      Reply
  • Tobias

    What is to do, to get this into the Eclipse main release - so that we don't need an plugin?

    Reply
    • Flo

      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. :)

      https://git.eclipse.org/r/#/c/33542/

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

      Kind Regards
      Florian

      Reply
  • Green

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

    Reply
    • Flo

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

      Reply
    • 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

      Reply
      • Flo

        Thanks, Matthias! I'm glad the plugin helped you :)

        Reply
  • Kamil

    Hi,
    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,
    Kamil

    Reply
    • Flo

      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
      Florian

      Reply
  • rayex

    I just want to say Thank you!

    Reply
    • Flo

      You are welcome! :)

      Reply
  • Sascha

    Great work. Can this plugin be updated for Mars SR2? Thanks!

    Reply
    • Flo

      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 :)

      Reply
      • Sascha

        Great, can't wait! Thanks!

        Reply

Leave a Reply

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

Archives