Bug 123721

Summary: two types of 'remove' for TODO task tags
Product: [Eclipse Project] JDT Reporter: David Williams <david_williams>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, jerome_lanneluc, thatnitind
Version: 3.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description David Williams CLA 2006-01-13 01:09:30 EST
I've noticed for TODO type task tags (in Java Editor), 
there is a "remove task" action (from Ruler), that removes the task marker. 

But, the task is added again immediately when re-compiled, so removing it 
seems kind of not-very-useful. 

But, there is a "remove task tag" quick fix, that removes the task and the todo text giving rise to it, which is, to me, what users would want from the "remove task" action as well. 

So, I think either the actions should be equivent, or, the "remove task" action not shown for TODO type tasks (that would be quickly re-discovered).
Comment 1 Dani Megert CLA 2006-01-13 03:03:59 EST
JDT Core should call the following code when creating a Task Tag marker:
  marker.setAttribute(IMarker.USER_EDITABLE, false);

This would also fix the the Tasks view where people can set the completion state and delete the Task Tag markers.
Comment 2 Philipe Mulet CLA 2006-01-13 03:29:12 EST
Interestingly, UI keeps asking us to make it read-only or not...
Comment 3 Dani Megert CLA 2006-01-13 03:31:55 EST
?
Comment 4 Philipe Mulet CLA 2006-01-13 04:10:18 EST
Ignore my previous comment. The regression code introduced by some code reorg to optimize array creations (my fault). 
JAVA_TASK_MARKER_ATTRIBUTE_NAMES did not set USER_EDITABLE but ARGUMENTS instead.

Fixed
Comment 5 Philipe Mulet CLA 2006-01-13 04:17:01 EST
Jerome - can you pls add a regression test ?
Comment 6 Philipe Mulet CLA 2006-01-13 04:37:36 EST
Backported to 3.1 maintenance stream (3.1.3?) since 3.1 got affected as well.
Comment 7 Dani Megert CLA 2006-01-13 04:41:39 EST
If you didn't introduce the change after R3.1 (i.e. in 3.1.1 or 3.1.2) then I'd vote against changing this now.
Comment 8 Philipe Mulet CLA 2006-01-13 04:53:36 EST
To clarify, the bug got introduced late in 3.1 cycle when working on performance. It was never intended to work the way it presently does.

Note: the task view is equally broken. Now I understand to fully address this issue, the ruler needs to be upgraded as well.

Dani - would you consider fixing it in 3.1 maintenance as well ? If not, only the task view scenario will be improved with this fix.
Comment 9 Dani Megert CLA 2006-01-13 04:59:50 EST
Ah - since it got introduced/changed late in 3.1 I also vote for this fix to be backported.

Changing the marker ruler actions however is too risky for me to backport into 3.1 maintenance stream and the bug was in there forever and it is not a critical one.
Comment 10 Jerome Lanneluc CLA 2006-01-17 11:31:05 EST
Added regression test BasicBuildTests#testTag3()
Comment 11 Jerome Lanneluc CLA 2006-02-14 12:44:42 EST
Verified for 3.2 M5 using build I20060214-0010