DESCRIPTION

[egit-ui] Added warning dialog if files that are going to be committed
contains warnings/errors

Bug: 475559
Change-Id: I352c33d0fed1b610babda2992c6b1b211952dfb2
Signed-off-by: Reilly Hart xxx@xxx.xxx

COMMENTS

author: Reilly Hart
date: 2015-08-27 10:53:19.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-08-27 10:53:25.000000000

Patch Set 1:

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

-------------------------------------
author: Reilly Hart
date: 2015-08-27 10:56:46.000000000

Patch Set 1: Code-Review+1

I'm aware that there should be a check for preference if user want this check enabled, however I'm wondering if that's enough - since most of users has got Problems View somewhere and it may contain a lot of errors/warnings from multiple projects it might be boring to look for the files that user is trying to commit, so maybe there should be a list of files that contains errors/warnings?

-------------------------------------
author: Jayvion Booth
date: 2015-08-27 11:15:05.000000000

Patch Set 1: Code-Review-1

(8 comments)

Thanks, looks good, but see few comments int he code.

Please also add a preference (checkbox) to the Git->Commit page to enable/diable this check, and please use this preference in the code.

File Comment: org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitUI.java -> Please do not reformat code if there are no other changes. I can't see the actual change behind this formatting changes.

Line:34, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitWarningDialog.java -> There is a constant for this: IPageLayout.ID_PROBLEM_VIEW

Line:102, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitWarningDialog.java -> Please properly log error

Line:115, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitWarningDialog.java -> Why is this overridden?

Line:2352, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java -> Following to the style in this class, the field should be named CommitWarningDialog_Title.

Also all other new fields below.

Line:1333, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> Please check here if the settings require a dialog to be shhown.

Line:1370, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> why do you need "serial" here? Because of the anonymous ArrayList below?

Line:1377, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java -> I would not create anonymous class here to only add the item. It can be done with less and more "standard" code.

-------------------------------------
author: Brenden Conley
date: 2015-08-27 11:17:00.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7469/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2015-08-27 13:38:01.000000000

Patch Set 1:

BTW comitting from staging view must produce same warning (if preference is enabled).

-------------------------------------
author: Douglas Trujillo
date: 2015-08-27 15:47:58.000000000

Patch Set 1: Code-Review-1

(7 comments)

I miss a preference which allows to supress this warning dialog, it should go under "Preferences > Team > Git > Confirmations and Warnings"

Line:29, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitWarningDialog.java -> * who is that ? 
* we don't use author tags, instead we prefer real javadoc for public classes

Line:817, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties -> this looks strange and isn't consistent with how you spell this in the strings below, I'd avoid abbreviating this

Line:818, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties -> * I feel it would be more interesting to get the number of warnings instead of the number of files being affected
* "file(s)"is distracting from what is important in this message

I would phrase it like this:

There are {0} warnings in the files to be committed

Line:820, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties -> There are {0} warnings and {1] errors in the files to be committed. ...

Line:4082, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java -> revert this unrelated formatting change

Line:4193, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java -> revert this unrelated formatting change

Line:7, /COMMIT_MSG -> * style nit: this commit message header is too wide, see https://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines
* remove prefix [egit-ui] since it doesn't really add value

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-09-11 23:59:01.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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