Bug 378488 - "Open With > ..." should not store the default editor
Summary: "Open With > ..." should not store the default editor
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal with 2 votes (vote)
Target Milestone: 4.18 M3   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy, usability
: 7701 (view as bug list)
Depends on:
Blocks: 566539
  Show dependency tree
 
Reported: 2012-05-04 08:55 EDT by Markus Keller CLA
Modified: 2020-10-28 05:12 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2012-05-04 08:55:03 EDT
"Open With > ..." currently stores the selected editor as default editor for the selected file. This is wrong in 99.9% of usages.

The main usage scenarios for Open With > ... are:
1.) Open the file with a different editor this time (but keep the default).
2.) Always open similar files with the chosen editor.

Scenario 2 can be supported with bug 378485 if the "Open With > Other..." dialog comes up with the current default editor pre-selected.

This bug is for scenario 1.

The "store default editor per file" scenario should become a power-user feature. A simple implementation:
- Open With > [editorX] ==> doesn't store as default editor
- Open With > [editorX] with Ctrl held down => stores the default editor

To announce the "default per file" functionality, a new disabled menu item could be added after the last editor entry with label:
"<Hold Ctrl to set as default for this file>"

Implementation hints:
- Make sure not to break subclasses of OpenWithMenu that override #openEditor(IEditorDescriptor, boolean).
- Modifier should be MOD1, which is Command on the Mac.
Comment 1 Carl Verbiest CLA 2017-06-26 03:57:44 EDT
"Open with ..." is the  exception. 
The defaults are set in the "file association" and should not be changed by "open with".
Next open of a file should follow file associations
Comment 2 Dani Megert CLA 2017-06-26 04:46:38 EDT
*** Bug 7701 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2020-06-20 15:53:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Feng Shao CLA 2020-09-23 04:54:58 EDT
I vote for this, please someone let me know which project I should look at in https://git.eclipse.org/c/ , I would like make code change for this, which annoyed me years.
Comment 5 Lars Vogel CLA 2020-09-23 04:59:55 EDT
.
Comment 6 Paul Pazderski CLA 2020-09-23 05:24:47 EDT
(In reply to Feng Shao from comment #4)
> please someone let me know which project I should look at
> in https://git.eclipse.org/c/

eclipse.platform.ui.git

A good starting point is probably org.eclipse.ui.internal.navigator.resources.actions.OpenActionProvider from the org.eclipse.ui.navigator.resources project.

For the setup I suggest to try using Oomph as described here: https://wiki.eclipse.org/Platform_UI/How_to_Contribute/Oomph


And a note for the suggested announcement entry: I expect it (especially with the proposed text) to be quite ugly and would rather do without it.
Comment 7 Lars Vogel CLA 2020-09-29 04:05:48 EDT
Feng, any update here? OpenWithMenu line 326 seems to be the bad guy here. 

IMHO we can simply remove this functionality, I doubt that the option to set a "default" editor for one file is likely to be useful for users. Users can use the advanced dialog to set the default for all files.
Comment 8 Eclipse Genie CLA 2020-10-23 04:27:05 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/171167
Comment 10 Eclipse Genie CLA 2020-10-23 11:40:13 EDT
New Gerrit change created: https://git.eclipse.org/r/c/www.eclipse.org/eclipse/news/+/171194