Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Platform UI/AutoSave"

(Limitations)
(Behavior)
Line 27: Line 27:
 
*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 textual editors at once.
+
*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 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 auto-save will save the file(s) associated with the editor(s).

Revision as of 11:16, 8 February 2016

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

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 textual 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

Platform UI AutoSave Enable.png

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.

Platform UI AutoSave Disable.png

If the check-box is unchecked, the panel is grayed.

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 only visible for textual editors.

Platform UI AutoSave WrongValue.png

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

  • The auto-save will save all editors, not only textual editors (e.g. graphical editors...).
  • 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.

Back to the top