Bug 203771 - When a task is completed, Mark Completed option is enabled
Summary: When a task is completed, Mark Completed option is enabled
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 4.7 M3   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Yossi Luson CLA
URL:
Whiteboard:
Keywords: bugday, helpwanted
: 205722 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-18 09:59 EDT by Gadi Goldbarg CLA
Modified: 2016-10-04 04:07 EDT (History)
6 users (show)

See Also:


Attachments
Mark Completed is active even if task is marked as complete (44.62 KB, image/png)
2010-05-20 08:57 EDT, Gadi Goldbarg CLA
no flags Details
Screenshot (27.57 KB, image/png)
2016-06-14 10:36 EDT, Sylvia Tancheva CLA
no flags Details
marker view is now fixed (206.77 KB, image/gif)
2016-09-26 15:15 EDT, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gadi Goldbarg CLA 2007-09-18 09:59:26 EDT
1. Open the Task View
2. Have a task in the view
3. Right click on it and select Mark Completed
4. Right click on the task again

Expected result: The option Mark Completed is disabled
Actual result: The option Mark Completed is enabled 

Mantis: 0016803
Comment 1 Roy Ganor CLA 2007-10-16 09:20:24 EDT
*** Bug 205722 has been marked as a duplicate of this bug. ***
Comment 2 Gadi Goldbarg CLA 2008-12-01 10:59:55 EST
Reproducible in PDT 2.0.0 as well
Tested on Wix XP
Eclipse SDK
Version: 3.4.1
Build id: M20080911-1700
debugger - org.zend.php.debug_feature-I20081127
pdt - N20081130
dltk-core-sdk-I-I200811251145-200811251145-incubation

[Kalin Yanev kalin.a@zend.com]
Comment 3 Gadi Goldbarg CLA 2008-12-02 05:09:28 EST
I'm changing the product version to 2.0.0
Kalin Yanev kalin.a@zend.com
Comment 4 Zhongwei Zhao CLA 2010-05-19 23:22:58 EDT
I think this has been fixed already
Comment 5 Gadi Goldbarg CLA 2010-05-20 08:56:42 EDT
Re-tested at PDT-2.2.0.v20100517

The same behavior appear again

Have marked complete task if perform again right-context menu over this task again have active Mark Complete menu option 

See attached screen - Mark_Цomplete_Аctive_Аgain.png

Reopened by
Teodor Kirkov
teodor.k@zend.com
Comment 6 Gadi Goldbarg CLA 2010-05-20 08:57:51 EDT
Created attachment 169336 [details]
Mark Completed is active even if task is marked as complete
Comment 7 Dawid Pakula CLA 2016-06-05 18:43:19 EDT
It's not possible to mark PHP Task Tags as completed. This option is always disabled.
Comment 8 Sylvia Tancheva CLA 2016-06-14 10:36:58 EDT
Created attachment 262438 [details]
Screenshot
Comment 9 Sylvia Tancheva CLA 2016-06-14 10:39:47 EDT
Dawid, you are right about PHP Task Tags - currently they cannot be marked, but the other tasks in task view still act like in description (I replaced the screenshot with a new one).
Yet I'm not really sure if this is PDT bug or platform issue? Let me know
Comment 10 Dawid Pakula CLA 2016-06-14 11:03:44 EDT
In this case this is platform bug. From PDT side, we can do nothing.

Moving to Platform: Task created by user (Task View => Context Menu => Add Task...), have "Mark Completed" action always enabled.
Comment 11 Patrik Suzzi CLA 2016-06-15 04:06:50 EDT
Issue reproduced in neon RC3
see animation: http://i.imgur.com/qk7WlpN.gifv

MarkCompletedHandler is responsible. 
the "mark done" operation consists in putting a key,value pair: ("done", true)
attrs.put(IMarker.DONE, Boolean.TRUE)

However, the enablement is not checking whether the selected tasks have all the attribute "done" set to false. 

A possible solution in declarative way, is: 

Open org.eclipse.ui.ide/plugin.xml at line 2266, where the handler is defined, 
Change the <enabledWhen> condition, to consider the value of the attribute. 

I'm not sure this check is doable in a declarative way. 

Below you see the current code: 

      <handler
            class="org.eclipse.ui.internal.views.markers.MarkCompletedHandler"
            commandId="org.eclipse.ui.ide.markCompleted">
            <activeWhen>
             <with
                       variable="activePart">
                    <instanceof value="org.eclipse.ui.internal.views.markers.ExtendedMarkersView"/>
                    <test
                          args="org.eclipse.ui.ide.tasksGenerator"
                          property="org.eclipse.ui.ide.contentGenerator">
                    </test>
                 </with>
         </activeWhen>
          <enabledWhen>
            <iterate
                  ifEmpty="false"
                  operator="and">
               <instanceof value="org.eclipse.ui.internal.views.markers.MarkerEntry"/>
               <test
                     forcePluginActivation="false"
                     property="org.eclipse.ui.ide.editable">
               </test>
            </iterate>
         </enabledWhen>
      </handler>
Comment 12 Patrik Suzzi CLA 2016-09-26 10:51:56 EDT
Update: reading the article [#1], I decided to search for IPropertyTester implementations, and I found a couple of property testers explicitly created for MarkersView and Markers: MarkerPropertyTester and MarkersViewPropertyTester. 

Hence, the extent of the solution is limited to use the existing MarkerPropertyTester implementation to check if "done" 


[#1] http://www.robertwloch.net/2011/01/eclipse-tips-tricks-property-testers-with-command-core-expressions/
Comment 13 Eclipse Genie CLA 2016-09-26 12:34:17 EDT
New Gerrit change created: https://git.eclipse.org/r/81931
Comment 14 Patrik Suzzi CLA 2016-09-26 12:36:19 EDT
The proposed change fixes the behavior. See: http://imgur.com/wrPwz1d.png
Comment 15 Patrik Suzzi CLA 2016-09-26 15:15:30 EDT
Created attachment 264423 [details]
marker view is now fixed
Comment 17 Patrik Suzzi CLA 2016-10-04 04:07:28 EDT
In master now.