DESCRIPTION

Make Staging view saveable

- Changed commit message text makes the view dirty
- Save button and Ctrl-S are enabled for an unsaved message
- Save leads to a normal commit as if Commit button had been pressed

Bug: 424923
Change-Id: I6e4a7c6a9f5219d4d62286c756d9dd93a168db32
Signed-off-by: Braedon Velazquez xxx@xxx.xxx

COMMENTS

author: Braedon Velazquez
date: 2014-01-06 12:24:32.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2014-01-06 12:24:38.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5461/

-------------------------------------
author: Brenden Conley
date: 2014-01-06 12:38:57.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/5461/ : update site https://hudson.eclipse.org/egit/job/egit.gerrit/${BUILD_NUMBER}/artifact/org.eclipse.egit.repository/target/repository/

-------------------------------------
author: Douglas Trujillo
date: 2014-01-08 00:49:01.000000000

Patch Set 4: Code-Review-1

(4 comments)

nice improvement :-)

I think I would prefer to auto-save the staging view state to lower the risk to loose any changes to the commit message e.g. if the workbench crashes. We could auto-save e.g. when the commit message pane looses focus. When staging/unstaging files the index update is also persisted immediately hence implementing the same behavior for commit message edits seems to be a good idea.

What would be a good reason to discard unsaved staging view state ?

In addition we could consider to provide undo/redo support for commit message edits.

Line:2412, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> I think this behavior is surprising, I would expect Ctrl-S / Cmd-S to just persist the state of the staging view but not create a commit. Committing in staging view is already mapped to Ctrl-Enter/Cmd-Enter (see line 856)

Line:741, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> style nit: we don't use braces around single line blocks

Line:750, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> this unrelated change providing better javadoc for this method should come in another commit

Line:11, /COMMIT_MSG -> I would expect Ctrl-S / Cmd-S to just persist the state of the staging view but not create a commit.

-------------------------------------
author: Douglas Trujillo
date: 2014-01-08 08:25:02.000000000

Patch Set 4:

Also the UI guidelines dictate "Modifications made within a view must be saved immediately." see guideline 7.2 in http://wiki.eclipse.org/User_Interface_Guidelines#Views

-------------------------------------
author: Kaden Henson
date: 2014-04-26 20:25:57.000000000

Patch Set 4:

Suggested an alternate approach (automatic save-on-close) at https://git.eclipse.org/r/25614

-------------------------------------
author: Danika Greer
date: 2014-05-01 14:54:03.000000000

Patch Set 4: Code-Review-1

(1 comment)

I don't think we should make it saveable, it should just stay auto-saved as it is now.

> In addition we could consider to provide undo/redo support for commit message edits.

This is already possible using Ctrl+Z, no?

Line:11, /COMMIT_MSG -> Agreed. Committing using the keyboard can already be done using Ctrl+Enter.

-------------------------------------
author: Juliet Cantu
date: 2014-05-01 15:51:01.000000000

Patch Set 4:

I also think auto-save is the solution here.

-------------------------------------
author: Braedon Velazquez
date: 2014-05-01 16:10:17.000000000

Abandoned

https://git.eclipse.org/r/#/c/25614/ seems to be the better approach.

-------------------------------------
