Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331248 - Open In browser uses different enablement checks for editor and context menu
Summary: Open In browser uses different enablement checks for editor and context menu
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: 3.5   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-26 16:21 EST by Thomas Ehrnhoefer CLA
Modified: 2011-01-13 23:31 EST (History)
1 user (show)

See Also:


Attachments
patch (3.74 KB, patch)
2010-11-26 16:34 EST, Thomas Ehrnhoefer CLA
thomas.ehrnhoefer: review?
Details | Diff
mylyn/context/zip (5.59 KB, application/octet-stream)
2010-11-26 16:34 EST, Thomas Ehrnhoefer CLA
no flags Details
fix (8.05 KB, patch)
2010-12-09 12:25 EST, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (44.81 KB, application/octet-stream)
2010-12-09 12:26 EST, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Ehrnhoefer CLA 2010-11-26 16:21:03 EST
Editor seems to do a connector.getTaskUrl() call, whereas the context menu of the task list uses task.getUrl(), thus requiring a taskAttribute to be set.

I think they should both do the same check, as if e.g. the task does not contain the Url, the open in browser works in the editor, but not in the context menu, which is confusing.

I would vote for not using task.getUrl, as the connector.getTaskUrl() needs to be called in various places anyway, thus being there already. Or could that be too expensive? Maybe a double-check, first task.getUrl(), if not set, connector.getTaskUrl(), but for both occurrences the same
Comment 1 Thomas Ehrnhoefer CLA 2010-11-26 16:34:13 EST
Created attachment 183962 [details]
patch

This patch check task.getUrl and then connector.getAuthenticatedUrl. Also added the isValidUrl check to the editor action
Comment 2 Thomas Ehrnhoefer CLA 2010-11-26 16:34:14 EST
Created attachment 183963 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-12-09 12:25:54 EST
Created attachment 184875 [details]
fix
Comment 4 Steffen Pingel CLA 2010-12-09 12:26:08 EST
Created attachment 184876 [details]
mylyn/context/zip
Comment 5 Steffen Pingel CLA 2010-12-09 12:27:23 EST
Thanks for pointing this out. We should have a single action that handles enablement and execution. Thomas, please verify that the committed changes works as expected.
Comment 6 Thomas Ehrnhoefer CLA 2010-12-09 13:37:01 EST
Thanks Steffen, works as expected