Bug 374458 - open attachments with system editor
Summary: open attachments with system editor
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 enhancement (vote)
Target Milestone: 3.10   Edit
Assignee: Sam Davis CLA
QA Contact:
URL:
Whiteboard: sprint=7;effort=1;
Keywords: noteworthy, plan
Depends on:
Blocks:
 
Reported: 2012-03-16 02:31 EDT by Mik Kersten CLA
Modified: 2013-11-04 13:35 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2012-03-16 02:31:25 EDT
Currently the Attachments table appears to always open with the web browser, which yields undesirable behavior on Windows in pretty much all cases (not sure about Linux or Mac).  Could we defautl the opening to be the system editor, on Windows at least?
Comment 1 Steffen Pingel CLA 2012-03-23 19:16:12 EDT
Doesn't the attachment table persist the choice and opens future files of the same type in the selected editor? I'm not sure that we would want to change it since browsers can handle many file types and offer more advanced streaming than the mechanism that is used when opening files in system editors.
Comment 2 Mik Kersten CLA 2012-03-26 08:59:34 EDT
I am not sure what the behavior is on Linux or Mac.  But on Windows the behavior of opening the file with the browser is almost always less desirable than opening with the system editor.  What's even worse, is that for repositories that require authentication, opening the attachment with the browser requires the user to enter their credentials, breaking the flow, whereas opening with the system editor does not.  

I think it's fine for this behavior to be OS dependent, eg, if on Linux it's better to keep the browser as default.  But what I'm trying to point out here is that for Windows I think it's pretty clear that we have the wrong default.  This is compounded by the fact it's hard for non-advanced users to discover the "Open with", and the fact that "Open with" only remembers it's preference per file type.
Comment 3 Sam Davis CLA 2012-03-27 14:05:15 EDT
I agree strongly with Mik that this is the wrong default, at least for Windows. I suspect it may be wrong for Linux too. I think it creates a significantly bad experience for new users, and I've been meaning to create a bug for it for a long time.

(In reply to comment #1)
> Doesn't the attachment table persist the choice and opens future files of the
> same type in the selected editor? 

Based on how often I need to specify which editor to use, I feel like it either forgets my choice after some time, or has some more complex way of choosing it than a per-file-type rule.

> I'm not sure that we would want to change it
> since browsers can handle many file types 

The way that browsers (at least Firefox and Internet Explorer) handle most file types, e.g. images, is to pop up a dialog asking if you want to save it or open it in the system editor.

> and offer more advanced streaming than
> the mechanism that is used when opening files in system editors.

I think it is a defect that downloading attachments happens with a modal progress dialog (see also bug 342077).
Comment 4 Steffen Pingel CLA 2012-03-27 15:11:02 EDT
Thanks for the input. I have put this on the backlog.
Comment 5 Sam Davis CLA 2012-11-19 18:53:19 EST
I've created the following review:

8775: 342077: attachments should be downloaded in the background from the task editor [I3ff81534]
https://git.eclipse.org/r/#/c/8775/

I realized that for text files, the best default is to use the default workbench editor, so I decided to use that when there is no preference set, and use the system editor only when there is no preference set and no default workbench editor. This means that in a clean Eclipse on Windows, text files are opened in the internal text editor, and images are opened in the system editor.
Comment 6 Steffen Pingel CLA 2013-05-06 17:51:54 EDT
The proposed change looks good. I'm wondering if we should add a warning dialog similar to how browsers do this before opening files that "can harm your computer"?
Comment 7 Sam Davis CLA 2013-05-06 18:29:50 EDT
That could make sense. If we do, it should have a checkbox to not show it again.
Comment 8 Steffen Pingel CLA 2013-05-06 18:36:32 EDT
(In reply to comment #7)
> That could make sense. If we do, it should have a checkbox to not show it again.

Can you add that to your change? I don't want to make the system editor the default unless we have some level of warning in place.
Comment 9 Sam Davis CLA 2013-05-06 18:53:55 EDT
Ok, but I'm unsure when I will have time to do that.
Comment 10 Steffen Pingel CLA 2013-05-07 03:26:57 EDT
Ok, I'll take this of the milestone for now but we can reconsider in case we get to it in the next couple of days.
Comment 11 Sam Davis CLA 2013-05-17 16:43:53 EDT
I've updated the review so that we will display a dialog with "Some files can harm your computer when opened. Are you sure you want to open {0}?" when any file is opened in the system editor. This will always be displayed until the user disables the warning. How is that?
Comment 12 Sam Davis CLA 2013-08-22 18:57:22 EDT
I have merged the change.