Bug 483602 - Implement deletion of elements from Outline view
Summary: Implement deletion of elements from Outline view
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.8.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-03 12:48 EST by Luis Yanes CLA
Modified: 2020-09-04 15:24 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Yanes CLA 2015-12-03 12:48:38 EST
When writing C code I've realised that I can move elements of the code on the outline view, I can also rename them. But if I try to remove them (hitting the DEL key, BACKSPACE key or right clicking) it is not possible.

The expected behaviour would be to right click and have a delete option and be able to remove code elements using BACKSPACE or DEL keys.

I went on the IRC channel and asked about if this could be enabled on a menu or something but apparently it's available for other languages i.e JAVA (I did not test this myself).
Comment 1 Nathan Ridge CLA 2015-12-03 14:50:55 EST
Presumably deleting an element from the outline view should have the effect of deleting the corresponding code from the source?
Comment 2 Luis Yanes CLA 2015-12-03 15:09:31 EST
Yes correct, that is the expected behaviour but not what is happening. Elements from the outline view should be able to be deleted.
Comment 3 Nathan Ridge CLA 2015-12-03 15:33:30 EST
It's a feature that no one has implemented yet. Patches are welcome!
Comment 4 Eclipse Genie CLA 2015-12-05 19:53:45 EST
New Gerrit change created: https://git.eclipse.org/r/62062
Comment 5 Eclipse Genie CLA 2015-12-15 18:36:42 EST
New Gerrit change created: https://git.eclipse.org/r/62776
Comment 6 Eclipse Genie CLA 2015-12-15 19:15:37 EST
New Gerrit change created: https://git.eclipse.org/r/62777
Comment 7 Nathan Ridge CLA 2016-10-05 00:15:46 EDT
Luis, what is the status of this bug? As far as I can tell, Sergey reviewed the most recent version of the patch on 2015-12-26, with just some minor comments. Have you had a chance to address them?
Comment 9 Marc Khouzam CLA 2016-10-31 09:21:57 EDT
Nice contribution!
Can you add a description to the New&Noteworthy?
https://wiki.eclipse.org/CDT/User/NewIn92
Comment 10 Eclipse Genie CLA 2016-10-31 17:54:41 EDT
New Gerrit change created: https://git.eclipse.org/r/84263
Comment 11 Sergey Prigogin CLA 2016-10-31 18:03:15 EDT
The Delete operation as implemented doesn't properly call
TextEditorAction.validateEditorInputState() and as a result doesn't work
in version control environments that keep unchanged files read-only.
Another problem is that Ctrl+Z doesn't trigger Undo when the Outline
view is active. When the Delete element action is reintroduced it should
be made to behave the same way as in JDT, e.g, display a prompt before
deletion and be bound to the Delete key.

https://git.eclipse.org/r/84263 reverts the change.