Bug 200253 - [TOC][Editors] Hyperlinks open arbitrary file types
Summary: [TOC][Editors] Hyperlinks open arbitrary file types
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Noam Chitayat CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-08-16 16:46 EDT by Noam Chitayat CLA
Modified: 2007-08-22 17:19 EDT (History)
1 user (show)

See Also:
mike.pawlowski: review+


Attachments
Patch for bug 200253. (3.99 KB, patch)
2007-08-22 13:39 EDT, Noam Chitayat CLA
no flags Details | Diff
Patch for bug 200253. (5.51 KB, patch)
2007-08-22 14:48 EDT, Noam Chitayat CLA
mike.pawlowski: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Chitayat CLA 2007-08-16 16:46:59 EDT
Build: 3.4 M1

As Mike wrote in bug 199126:
>Given the context of a given TOC editor field, we probably >do not want
>    to open arbitrary file types that are not applicable to >the fields
>    acceptable contents
>    -> e.g. Should not be able to open an HTML file from a >link field
>       which should contain a path to an XML file
>    -> Suggest opening a dialog indicating the file type is >wrong
>       (in the future, field validation would be desirable)


The "Open" in the context menu, the hyperlinks, and double-clicking on elements should only open files if they are of relevant type to the selected element.
Comment 1 Noam Chitayat CLA 2007-08-22 13:39:48 EDT
Created attachment 76678 [details]
Patch for bug 200253.

Refactored the open* methods some more beyond the changes in bug 199126, and added some error messages if the user tries to open an invalid file in the context of the selected element.
Comment 2 Mike Pawlowski CLA 2007-08-22 14:39:57 EDT
Hi Noam.  The patch appears incomplete.  Missing externalized strings.
Comment 3 Noam Chitayat CLA 2007-08-22 14:48:19 EDT
Created attachment 76687 [details]
Patch for bug 200253.

DAMMIT! I have no idea how I missed PDEUIMessages in the patch... sorry about that!
This new patch has every file affected.
Comment 4 Mike Pawlowski CLA 2007-08-22 17:18:47 EDT
Comment on attachment 76687 [details]
Patch for bug 200253.

Tested well.  Thanks Noam.
Comment 5 Mike Pawlowski CLA 2007-08-22 17:19:21 EDT
Patch released to HEAD.

Target:  3.4 M2