Bug 61999 - [typing] Hungry delete
Summary: [typing] Hungry delete
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-12 16:23 EDT by Bryan Hunt CLA
Modified: 2004-06-30 04:59 EDT (History)
1 user (show)

See Also:


Attachments
Plugin for SmartDelete/Backspace actions (7.08 KB, application/octet-stream)
2004-06-07 22:15 EDT, Michael Fraenkel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Hunt CLA 2004-05-12 16:23:41 EDT
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;
}
Comment 1 Dani Megert CLA 2004-05-13 05:53:00 EDT
we would probably call this smart backspace ;-)
Comment 2 Michael Fraenkel CLA 2004-06-07 22:14:56 EDT
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.
Comment 3 Michael Fraenkel CLA 2004-06-07 22:15:46 EDT
Created attachment 11692 [details]
Plugin for SmartDelete/Backspace actions
Comment 4 Johan Walles CLA 2004-06-30 04:59:39 EDT
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.