Bug 288171 - [api] enable maximize for any task editor part
Summary: [api] enable maximize for any task editor part
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows NT
: P3 enhancement (vote)
Target Milestone: 3.5   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 158921
  Show dependency tree
 
Reported: 2009-08-31 14:51 EDT by David Shepherd CLA
Modified: 2011-02-05 20:34 EST (History)
2 users (show)

See Also:


Attachments
Patch to add toggle maximize button to any AbstractTaskEditorPart (7.98 KB, patch)
2009-08-31 16:03 EDT, David Shepherd CLA
no flags Details | Diff
mylyn/context/zip (5.56 KB, application/octet-stream)
2009-08-31 16:03 EDT, David Shepherd CLA
no flags Details
updated patch (7.49 KB, text/plain)
2009-09-11 00:50 EDT, Steffen Pingel CLA
no flags Details
patch that addresses comment 4 (6.96 KB, patch)
2010-08-18 01:31 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (19.47 KB, application/octet-stream)
2010-08-18 01:32 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Shepherd CLA 2009-08-31 14:51:40 EDT
Currently a maximize button appears on the toolbar of the task description and new comment parts, and can be enabled on any TaskEditorRichTextPart that a client may create.  It would be beneficial to have the maximize capability for other types of parts as well, especially if that part has a similarly large control that could present a full screen of data, such as a table or a tree.
Comment 1 David Shepherd CLA 2009-08-31 16:03:28 EDT
Created attachment 146106 [details]
Patch to add toggle maximize button to any AbstractTaskEditorPart

This patch involves the following changes:
* Moving the ToggleToMaximizeAction up one class in the hierarchy
* Changing calls in its run() method from getEditor().getControl() to getControl() (please verify that these calls are equivalent)
* Implementing isAutoTogglePreview in the new comment part
* Moving isAutoTogglePreview and getMaximizeAction up once class in the hierarchy

A new part that implements AbstractTaskEditorPart can then add a toggle to maximize button by adding toolbarManager.add(getMaximizeAction()) in fillToolbar.  This was left to subclasses, e.g., the TaskRichEditorPart already has logic determining when to add the button. 

This patch has been tested on the default bugzilla editor.  It has also been tested with a new part that has a treeviewer.
Comment 2 David Shepherd CLA 2009-08-31 16:03:32 EDT
Created attachment 146107 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2009-09-11 00:50:05 EDT
Created attachment 146927 [details]
updated patch
Comment 4 Steffen Pingel CLA 2009-09-11 00:50:28 EDT
The patch changes how the maximize actions works. Previously the action set layout constraints on the editor control nested within the task editor part, with the patch applied the action modifies the grid data of the part's control (typically a section). This seems right to me but unfortunatelly breaks for editable descriptions (e.g. for JIRA tasks). If you can fix that I'll consider the patch.

I attached an updated version that remove the unneeded isAutoToggle() flag.
Comment 5 Kilian Matt CLA 2010-07-05 13:31:52 EDT
That would actually benefit the Reviews project too, as we could use this functionality. I've applied the patch and tested it (Bugzilla, JIRA and Mylyn Reviews) and it seems to work for me.
Comment 6 Steffen Pingel CLA 2010-07-05 14:22:06 EDT
Ok, I'll tentatively schedule it. I'll need to verify whether the concern in comment 4 needs to be addressed.
Comment 7 Steffen Pingel CLA 2010-08-18 01:31:59 EDT
Created attachment 176862 [details]
patch that addresses comment 4
Comment 8 Steffen Pingel CLA 2010-08-18 01:32:01 EDT
Created attachment 176863 [details]
mylyn/context/zip
Comment 9 Steffen Pingel CLA 2010-08-18 01:32:30 EDT
Kilian, can you verify if the latest patch works for you?
Comment 10 Steffen Pingel CLA 2011-02-05 20:34:23 EST
I have applied the patch to head. Please reopen if you run into any problems.