Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Platform UI/AutoSave"
(→Behavior) |
(→First version of auto-save for Eclipse) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
== First version of auto-save for Eclipse == | == First version of auto-save for Eclipse == | ||
+ | |||
+ | The associated bug is https://bugs.eclipse.org/bugs/show_bug.cgi?id=486644 | ||
=== Behavior === | === Behavior === | ||
− | Here is a | + | Here is a proposition for a FIRST implementation of the auto-save in Eclipse: |
*The auto-save will be disabled by default. Thus, this will be without consequences for Eclipse users. It need feedback of the community to have a clear view of the impact on usage and performance. | *The auto-save will be disabled by default. Thus, this will be without consequences for Eclipse users. It need feedback of the community to have a clear view of the impact on usage and performance. | ||
*The auto-save will only save textual editors. | *The auto-save will only save textual editors. | ||
− | *The auto-save will be active for all | + | *The auto-save will be active for all editors at once. |
− | *The auto-save will save dirty | + | *The auto-save will save dirty editor(s) automatically (based on the keyboard activity). Once save, the editor(s) will not be in a dirty state, until new modification (the same behavior as a manual save). |
+ | *The auto-save will save the file(s) associated with the editor(s). | ||
*The period of inactivity before automatic save will be customizable in Eclipse Preferences (from Window > Preferences > General > Editors > Auto-save). | *The period of inactivity before automatic save will be customizable in Eclipse Preferences (from Window > Preferences > General > Editors > Auto-save). | ||
*The default value of inactivity before automatic save will be set to 60 seconds. | *The default value of inactivity before automatic save will be set to 60 seconds. | ||
Line 38: | Line 41: | ||
=== Limitations === | === Limitations === | ||
− | Here is | + | Here is the limitations of this first implementation: |
− | *It will not be possible to enable/disable auto-save for each | + | *It will not be possible to enable/disable auto-save for each editor. |
*It will not be possible to extends/overrides the auto-save mechanism. | *It will not be possible to extends/overrides the auto-save mechanism. | ||
*It will not take into account possible crash recoveries. | *It will not take into account possible crash recoveries. | ||
Line 58: | Line 61: | ||
[[File:Platform_UI_AutoSave_StatusBar.png]] | [[File:Platform_UI_AutoSave_StatusBar.png]] | ||
− | In the main status bar of Eclipse, a quick access to enable/disable the auto-save is available. A double-click on the label allows to switch the state of the auto-save. This quick access is | + | In the main status bar of Eclipse, a quick access to enable/disable the auto-save is available. A double-click on the label allows to switch the state of the auto-save. This quick access is always visible. |
[[File:Platform_UI_AutoSave_WrongValue.png]] | [[File:Platform_UI_AutoSave_WrongValue.png]] | ||
Line 65: | Line 68: | ||
=== Possible evolutions === | === Possible evolutions === | ||
− | |||
*It will be possible to enable/disable auto-save for each editor. | *It will be possible to enable/disable auto-save for each editor. | ||
*It will be possible to extends/overrides the auto-save mechanism, to allow users to enable/disable the auto-save for a specific type of file, or set a specific value for a specific type of file. | *It will be possible to extends/overrides the auto-save mechanism, to allow users to enable/disable the auto-save for a specific type of file, or set a specific value for a specific type of file. |
Latest revision as of 11:19, 8 February 2016
Contents
Auto-save in Eclipse
User story
After analyzing all the comments on the bug 34076, read all opinions on the ide-dev mailing list discussion (https://dev.eclipse.org/mhonarc/lists/ide-dev/msg00959.html), here are the mains points that users take care of for the auto-save feature:
- Some users want to have an auto-save that save dirty editors as often as possible (based on the keyboard activity).
- Some users want to have an auto-save that save dirty editors periodically (with a period defined by the user).
- Some users want to have an auto-save that save dirty editors when the focus is lost on them.
- Users want to have the simplest possible user interface for auto-save settings.
- Users want to have a quick access to the auto-save settings (i.e. directly accessible from the main window).
- Most of users want to have a non default enabled auto-save
- Users worry about problems of performances that may arise with auto-save (especially the auto-build action that will be triggered after each save).
- Users worry about the local history issues that may arise with auto-save, because the local history size will grow up fast and will possibly become hard to use.
- Users worry about the « undo actions» issues that may arise with auto-save, because the stack of undo actions will grow up fast and reach his limit size quickly.
- Some users already reproduce auto-save by frequently hitting the save keys on their keyboards.
First version of auto-save for Eclipse
The associated bug is https://bugs.eclipse.org/bugs/show_bug.cgi?id=486644
Behavior
Here is a proposition for a FIRST implementation of the auto-save in Eclipse:
- The auto-save will be disabled by default. Thus, this will be without consequences for Eclipse users. It need feedback of the community to have a clear view of the impact on usage and performance.
- The auto-save will only save textual editors.
- The auto-save will be active for all editors at once.
- The auto-save will save dirty editor(s) automatically (based on the keyboard activity). Once save, the editor(s) will not be in a dirty state, until new modification (the same behavior as a manual save).
- The auto-save will save the file(s) associated with the editor(s).
- The period of inactivity before automatic save will be customizable in Eclipse Preferences (from Window > Preferences > General > Editors > Auto-save).
- The default value of inactivity before automatic save will be set to 60 seconds.
- The minimum value will be 1 second.
- The maximum value will be the maximum value of a java integer (2147483647 for a 32-bits JVM).
- A warning message will be displayed in case of unauthorized values.
- The status bar will provide a quick access to enable/disable the auto-save (by double-click).
- This quick access will be only visible for appropriate editors.
Limitations
Here is the limitations of this first implementation:
- It will not be possible to enable/disable auto-save for each editor.
- It will not be possible to extends/overrides the auto-save mechanism.
- It will not take into account possible crash recoveries.
- The local history will be affected by the auto-save, likewise users doing frequent manual saves.
Mock-ups
A check-box allows to enable the auto-save. The preferences page is accessible from Window > Preferences > General > Editors > Auto-save. The default value of inactivity before a save is set by default to 60 seconds. This value is customizable.
If the check-box is unchecked, the panel is grayed.
In the main status bar of Eclipse, a quick access to enable/disable the auto-save is available. A double-click on the label allows to switch the state of the auto-save. This quick access is always visible.
The value of inactivity before a save is customizable. If the value set by a user is out of range, a message will be displayed.
Possible evolutions
- It will be possible to enable/disable auto-save for each editor.
- It will be possible to extends/overrides the auto-save mechanism, to allow users to enable/disable the auto-save for a specific type of file, or set a specific value for a specific type of file.