Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 135563 - [projection] deleting after the last line of an element blindly deletes from next element
Summary: [projection] deleting after the last line of an element blindly deletes from ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.3.2   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 203164 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-07 10:59 EDT by Rafael Chaves CLA
Modified: 2008-01-24 06:49 EST (History)
6 users (show)

See Also:
philippe_mulet: pmc_approved+


Attachments
3.3.2 Fix (3.83 KB, patch)
2007-09-13 11:47 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2006-04-07 10:59:39 EDT
Found this while trying to reproduce bug 135121:

In "Show Source of Selected Element Only", if you select a multi-line element, position at the last line, and start deleting lines with Ctrl-D, the editor will allow you to blindly delete lines from the next element without ever positioning on them.
Comment 1 Dani Megert CLA 2006-04-07 11:02:07 EDT
This was like this since day one. No action for 3.2.
Comment 2 Rafael Chaves CLA 2006-12-05 09:45:55 EST
This feature (in conjunction with the quick outline) is awesome, however the fact that is so easy to delete code with no notice makes the current implementation too dangerous for me considering using it.

Could this be considered for 3.3?
Comment 3 Dani Megert CLA 2006-12-10 13:30:11 EST
Sorry, we have other priorities for 3.3.
Comment 4 Dani Megert CLA 2007-09-13 03:49:13 EDT
*** Bug 203164 has been marked as a duplicate of this bug. ***
Comment 5 Adam Neal CLA 2007-09-13 10:13:20 EDT
I would like to request that the priority of this defect be bumped up to P1 Major - as this erroneous functionality is causing critical usability problems in our client code.

For example, our editor, that is showing only the visible area of the code, is displaying the user code that is at the same time stored in some 'container object' in memory.  When the user has finished using the editor, everything that is visible is stored back into the container object (later to be generated back to source code).  At the same time the user code is available in a generated source file with specific tags above and below the code so that the user code is isolated.

e.g.
1: void func() {
2:   <some start tag>
3:   userCode();
4:
5:   <some end tag>
6: }

Now when the user preforms this multiple CTRL+D functionality at the end of the visible section (i.e. only lines 3 & 4 are visible), than they will delete lines 5 and 6.  Undoing the CTRL+D actions, will result in lines 5 & 6 being visible (where as they should not be).  This means when the user closes the editor the container object will be updated to contain the code with lines 5 and 6.  Which in turn causes the users code to be invalid.  In situations where the source code is generated, this will cause more problems as there will be two end tags, and extra '}'s.

Please consider increasing the priority of the bug.  Thanks in advance.
Comment 6 Dani Megert CLA 2007-09-13 11:30:42 EDT
OK, let's fix this.
Comment 7 Dani Megert CLA 2007-09-13 11:41:18 EDT
Fixed in HEAD.
Available in 3.4 builds > N20070913-0010.
Comment 8 Dani Megert CLA 2007-09-13 11:47:24 EDT
Created attachment 78322 [details]
3.3.2 Fix
Comment 9 Dani Megert CLA 2007-10-11 07:13:09 EDT
Fixed in R3_3_maintenance.
Comment 10 Dani Megert CLA 2007-10-11 07:13:36 EDT
.
Comment 11 Dani Megert CLA 2007-11-15 06:50:21 EST
Philippe, please approve. This is critical for a client (see comment 5).
Comment 12 Philipe Mulet CLA 2007-11-15 07:50:09 EST
+1 for 3.3.2
Comment 13 Markus Keller CLA 2008-01-24 06:45:08 EST
starting verification...
Comment 14 Markus Keller CLA 2008-01-24 06:49:48 EST
Verified in M20080123-0800.