Community
Participate
Working Groups
It would be nice to include the "hungry delete" feature from emacs. I would assume some people would not like this option so a parameter to enable or disable the feaure would be necessary. For those not familiar with hungry delete, consider the following: myClass. myFunction(); if the cursor is just before the 'm' in myFunction() and the user presses delete (backspace) once, the result is: myClass.myFunction(); Another example: if(condition) { some code; } Place the cursor before the closed brace and press delete once - the result: if(condition) { some code; }
we would probably call this smart backspace ;-)
As an experiment I built SmartDelete and SmartBackspace actions which should be pretty close to what was asked. I must say that it was quite difficult to write these actions when you are not an inner class. Make sure you only use these actions with Editing java source only since the APIs used will only work there. To use this plugin, just assign your favorite keys to Smart Delete/Backspace.
Created attachment 11692 [details] Plugin for SmartDelete/Backspace actions
Since I foresee using the CDT some time in the future, it would be nice if this wasn't Java specific. I have no clue about the Eclipse internals, but from my outside point of view I can't see anything Java specific about this feature.