DESCRIPTION

Add missing window title in EditCommitMessageDialog

Change-Id: I5487c85195cf44082eac1335b61c5b8495bf0e14
Signed-off-by: Jack Yu xxx@xxx.xxx


COMMENTS

author: Jack Yu
date: 2014-04-23 06:24:08.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-04-23 06:24:14.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-04-23 06:39:00.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Carlie Harper
date: 2014-04-23 12:32:38.000000000

Patch Set 1: Code-Review-1

(2 comments)

Line:56, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> unrelated change

Besides that, the javadoc says:

The default value is SWT.CLOSE|SWT.MIN|SWT.MAX|SWT.RESIZE. Subclassers should call setShellStyle to change this value, rather than overriding this method.

Line:116, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> I think you should rather overwrite getTitle

-------------------------------------
author: Jack Yu
date: 2014-04-23 16:27:30.000000000

Patch Set 1:

(2 comments)

Line:56, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> I've been using the CommitDialog as my "template", which is why I've changed it this way. When looking at more classes, I see three versions: calling setStyle in the middle of some code, overriding setStyle or overriding getStyle.

To me, the overriding of getStyle looked more logical than overriding setStyle because getStyle will be called for sure during creation of the new shell.

I'm fine with changing this, but can someone give a good argument what it is really the preferred alternative of all the available ones?

Line:116, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> There is no getTitle() method in this class hierarchy.

I created both changes by looking at a similar class in the egit code. Generally speaking, the egit UI code is using many different alternatives to do the same things. For setting the windows title I've seen at least
* the convinience method in the AbstractBranchSelectionDialog hierarchy
* overriding configureShell
* calling getShell().setText() during createComponents

I have no clue if there is a recommended and preferred way. If so, the whole code should be reworked.

-------------------------------------
author: Carlie Harper
date: 2014-04-29 12:05:38.000000000

Patch Set 1:

(1 comment)

Line:56, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> But why do you want to change it at all?

Even if there is a good reason for changing it, it should be done in another commit.

-------------------------------------
author: Carlie Harper
date: 2014-04-29 12:06:49.000000000

Patch Set 1:

(1 comment)

Line:116, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> Sorry, my fault, I was completely on the wrong track. Actually the way you do it here is very common in the EGit code base.

-------------------------------------
author: Douglas Trujillo
date: 2015-01-03 00:40:56.000000000

Patch Set 1: Code-Review-1

(1 comment)

Line:115, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> "Edit Commit Message" is already displayed in the dialog so it's pretty pointless to repeat this in the window title, let's instead set the title to "Interactive Rebase - Reword Commit" to give some more context

-------------------------------------
author: Douglas Trujillo
date: 2015-01-03 00:41:45.000000000

Patch Set 1:

(2 comments)

Line:56, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> let's undo this change as it doesn't change behavior and isn't related to this change

Line:115, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/CommitMessageEditorDialog.java -> Done

-------------------------------------
author: Douglas Trujillo
date: 2015-01-03 00:43:55.000000000

Abandoned

moved to stable-3.6 as https://git.eclipse.org/r/#/c/38914/

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