Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331154 - [api] extend TaskOperation to support tooltip and enablement
Summary: [api] extend TaskOperation to support tooltip and enablement
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 enhancement (vote)
Target Milestone: 3.5   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 331626
Blocks: 329164
  Show dependency tree
 
Reported: 2010-11-25 15:52 EST by Frank Becker CLA
Modified: 2011-02-02 01:46 EST (History)
2 users (show)

See Also:


Attachments
API change (3.53 KB, patch)
2010-11-25 16:42 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (42.36 KB, application/octet-stream)
2010-11-25 16:42 EST, Frank Becker CLA
no flags Details
patch V2 (2.87 KB, patch)
2010-11-27 16:54 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (4.53 KB, application/octet-stream)
2010-11-27 16:54 EST, Frank Becker CLA
no flags Details
patch V3 (2.80 KB, patch)
2010-12-02 15:44 EST, Frank Becker CLA
eclipse: review?
Details | Diff
mylyn/context/zip (2.37 KB, application/octet-stream)
2010-12-02 15:44 EST, Frank Becker CLA
no flags Details
adds TaskAttribute.META_DISABLED (3.72 KB, patch)
2011-02-02 01:33 EST, Steffen Pingel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Becker CLA 2010-11-25 15:52:51 EST
I want to add the following two new features.

1) enable/disable of an TaskOperation
2) add Tooltip support

Patch is coming soon.
Comment 1 Frank Becker CLA 2010-11-25 16:42:00 EST
Created attachment 183891 [details]
API change

Here is the patch.

Should I wait with commit this to HEAD until the review is completed?
Comment 2 Frank Becker CLA 2010-11-25 16:42:02 EST
Created attachment 183892 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-11-25 17:20:46 EST
Let's wait with committing until we have converged on the implementation. Can you describe the purpose of the tooltip and enablement attribute? From the patch I can't see how they would be used, e.g. in the editor.
Comment 4 Frank Becker CLA 2010-11-26 17:50:16 EST
(In reply to comment #3)
> Let's wait with committing until we have converged on the implementation. Can
> you describe the purpose of the tooltip and enablement attribute? From the
> patch I can't see how they would be used, e.g. in the editor.

OK I do this over the weekend and post an updated patch with the editor stuff.

In Bugzilla 4.0 the workflow has state UNCONFIRMED and this can be turn on and of per product base. This is why I add the Enable/Disable.

Tooltips are used tho show details like: CONFIRMED operation on new bugs tell yo that you should select the default operation if you did not know that you can set this state.
Comment 5 Frank Becker CLA 2010-11-27 16:54:24 EST
Created attachment 183987 [details]
patch V2

Now I found a way to only change TaskAttribute and TaskEditorActionPart.
Comment 6 Frank Becker CLA 2010-11-27 16:54:26 EST
Created attachment 183988 [details]
mylyn/context/zip
Comment 7 Frank Becker CLA 2010-12-02 15:44:30 EST
Created attachment 184400 [details]
patch V3

now I use the readonly meta for enable/disable the operation.
Comment 8 Frank Becker CLA 2010-12-02 15:44:33 EST
Created attachment 184401 [details]
mylyn/context/zip
Comment 9 Steffen Pingel CLA 2010-12-10 15:30:31 EST
Please feel free to apply. Only change I would like to request is renaming META_TOOLTIP to META_DESCRIPTION. My sense is that the data model should not reference specific UI elements but provide a generic model of a task.
Comment 10 Frank Becker CLA 2010-12-10 15:37:06 EST
(In reply to comment #9)
> Please feel free to apply. Only change I would like to request is renaming
> META_TOOLTIP to META_DESCRIPTION. My sense is that the data model should not
> reference specific UI elements but provide a generic model of a task.

Patch is now in HEAD with your requested change.
Comment 11 Shawn Minto CLA 2010-12-13 15:43:50 EST
Whenever I open a bug, the operations are disabled until i refresh it.  Reopening
Comment 12 Frank Becker CLA 2010-12-14 15:06:40 EST
(In reply to comment #11)
> Whenever I open a bug, the operations are disabled until i refresh it. 
> Reopening

This is because the Task Meta has change, so we need one refresh to have the  Task Meta up to date.
Comment 13 Steffen Pingel CLA 2010-12-14 15:40:15 EST
We need to do this in a backwards compatible way, i.e. the default should be to enable operations.
Comment 14 Frank Becker CLA 2010-12-14 16:05:38 EST
(In reply to comment #13)
> We need to do this in a backwards compatible way, i.e. the default should be to
> enable operations.

Steffen,

the problem is that during open of a Task we create the Controls but the background synchronize of the Task set the readonly to the correct value but did not force an redraw of the open Editor.

Thoughts?
Comment 15 Steffen Pingel CLA 2010-12-14 16:46:33 EST
I'll take a look. The framework basically needs to behave in backwards compatible way, i.e. enable the controls if the state is not known.
Comment 16 Steffen Pingel CLA 2010-12-15 14:47:35 EST
I have commented the enablement out for now. We'll have to revisit this and potentially introduce a new flag for enabling and disabling of actions to maintain backwards compatibility. I'll look into this in more detail next week.
Comment 17 Steffen Pingel CLA 2011-02-02 01:33:37 EST
Created attachment 188117 [details]
adds TaskAttribute.META_DISABLED
Comment 18 Steffen Pingel CLA 2011-02-02 01:35:16 EST
I have reviewed this and added a new attribute TaskAttribute.META_DISABLED which is null/false by default and hence should not have any side effects as controls will be enabled by default. Frank, can you make the necessary changes in Bugzilla to make use of the new flag?
Comment 19 Steffen Pingel CLA 2011-02-02 01:46:22 EST
Looks like we are done here.