views:

15

answers:

2

I want to make a toolbar button in eclipse that when pressed, removes all newlines from my selection.

How can I do this?

+2  A: 

You'll need to create a plugin for Eclipse. Take a look at PDE: http://www.eclipse.org/pde/

But maybe this plugin does what you need: http://andrei.gmxhome.de/anyedit/

Paulo Guedes
I've used the anyedit plugin and it is fairly useful. However, I don't think it has this specific functionality. At the very least, @Kyle can look at the source of the plugin as a starting point for his own plugin.
javamonkey79
+1  A: 

As @Paulo suggested, you'll need an Eclipse plugin. More specifically, it sounds like you'll need a java editor extension. The Eclipse plugin development version that you can download and setup has some fairly easy wizards such as editor extensions and toolbar contributions - from there it is a matter of figuring out how to tie it together.

javamonkey79