DESCRIPTION

Add tagging UI support

Implements UI for unsigned and annotated tags. This implementation
allows user to select with commit object should be associated with
created tag. List of all commits is available in 'Advanced' section of
dialog. There is a special combo widget that can suggest commits based
on typed in commit SHA-1 or part from first line of commit message. User
can also edit/overwrite message or associated commit of existing tag by
selecting it from existing tag list (this list can be found in 'Details'
section) and marking 'Overwrite existing tag' check box.

By default tag is created for current HEAD, this can be changed in
'Advanced' section.

Tag dialog is available in project's context menu ('Team->Tag...').

Bug: 311262

Signed-off-by: Leslie Stephenson xxx@xxx.xxx
Change-Id: Icb30655845d1e1198e59992a10148421ab9f9bd5


COMMENTS

author: Leslie Stephenson
date: 2010-05-06 21:09:30.000000000

Uploaded patch set 5.

-------------------------------------
author: Douglas Trujillo
date: 2010-05-06 23:45:26.000000000

Patch Set 5: I would prefer that you didn't submit this; Unclean IP, do not check in

- we need a CQ for this change

we are getting closer :-) 

but there are still some issues to sort out:
- I feel the feature that editing the tag name edit field
  filters the list of existing tags is not obvious. 
  I first had the impression that something is weird here, 
  after playing around I discovered that this is filtering 
  and not a bug. IMHO it's a good idea but somehow this 
  needs to be made more obvious.
- I think the dialog title should be just 
      Create tag on branch "xyz"
- when trying to replace an existing tag I would expect that
  the fields switch to read-only automatically when the tag
  name field is equal to an existing tag name, having to
  select the existing tag for that requires too many clicks
  and doesn't feel intuitive
- I was not able to actually replace an existing tag since
  there seems to be no way to enable the OK button when the
  force checkbox is checked
- the following sequence leads to a stack overflow :
  - Team > Create Tag ...
  - enter a tag name
  - press tab to jump to the next input field
  -> this throws
java.lang.StackOverflowError
at org.eclipse.swt.widgets.Control.isEnabled(Control.java:1660)
at org.eclipse.egit.ui.internal.dialogs.CommitCombo.isEnabled(CommitCombo.java:207)
at org.eclipse.swt.widgets.Control.isEnabled(Control.java:1661)
at org.eclipse.egit.ui.internal.dialogs.CommitCombo.isEnabled(CommitCombo.java:207)
...

-------------------------------------
author: Malia Sampson
date: 2010-05-07 01:56:22.000000000

Patch Set 5: No score; No score

I created a CQ once we are ready to attach the patch.

https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4073

-------------------------------------
author: Leslie Stephenson
date: 2010-05-07 06:06:24.000000000

Patch Set 5: No score

This StackOverflowError is unclear for me. It apperar when I've added enabling/disabling CommitCombo. To achieve that I've I overwrite methods isEnabled(), getEnabled() and setEnabled() i CommitCombo class. Maybe I'm doing something not exactly in SWT way ... I don't have any idea why we had here StacOcerflowError :|

-------------------------------------
author: Leslie Stephenson
date: 2010-05-07 07:48:46.000000000

Patch Set 5:

> - I feel the feature that editing the tag name edit field
> filters the list of existing tags is not obvious.
> I first had the impression that something is weird here,
> after playing around I discovered that this is filtering
> and not a bug. IMHO it's a good idea but somehow this
> needs to be made more obvious.

Maybe we should change filter here (now it checks that existing tag name starts with value in 'tag name' input) and maybe add light bulb same as to commit combo to indicate that this field has realtime influence on dialog's content.

> - I think the dialog title should be just
> Create tag on branch "xyz"

DONE.

> - when trying to replace an existing tag I would expect that
> the fields switch to read-only automatically when the tag
> name field is equal to an existing tag name, having to
> select the existing tag for that requires too many clicks
> and doesn't feel intuitive

Lets consider situation when this feature is implemented and user want to create tag 'v1.0.1' when he had already existing tag 'v1.0'.
In this case he will type 'v1.0' in tag name field, then all fields goes read-only and he must check 'Force replace existing tag' to be able to continue typing. This behavior would be very confusing and counterproductive.
I have negative filings about this feature.

> - I was not able to actually replace an existing tag since
> there seems to be no way to enable the OK button when the
> force checkbox is checked

I'll check that.

-------------------------------------
author: Juliet Cantu
date: 2010-05-07 11:36:09.000000000

Patch Set 5: I would prefer that you didn't submit this; No score



Line:584, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/SWTUtils.java -> This methods is not SWT-related and thus does not belong in a class called SWTUtils

Line:147, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java -> double javadoc

Line:156, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java -> double...

Line:166, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java -> ....

Line:106, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitCombo.java -> SWT style bits?

Line:176, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitCombo.java -> xxx@xxx.xxx needed

Line:185, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitCombo.java -> ?

Line:41, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/TagAction.java -> We should avoid internal classes from other modules

-------------------------------------
author: Leslie Stephenson
date: 2010-05-07 11:54:52.000000000

Patch Set 5:

I've answered for some of comments, rest of them I'll handle on the evening.

Line:147, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java -> Done

Line:156, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java -> Done

Line:166, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java -> Done

Line:106, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitCombo.java -> Yes

Line:176, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitCombo.java -> Done

Line:185, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitCombo.java -> Done

-------------------------------------
author: Douglas Trujillo
date: 2010-05-07 20:23:58.000000000

Patch Set 5:

please add the footer
CQ: 4073
to the commit message of your next patchset in order to point out the link to the IP review we'll send to Eclipse IP team as soon as code review is accepted.

For an example see http://egit.eclipse.org/w/?p=egit.git;a=commit;h=4f6371397f0880f6ce4c011eb1c8461fe44f9c53

-------------------------------------
author: Gerrit Johnathan Pham
date: 2010-05-12 22:06:46.000000000

Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

-------------------------------------
author: Leslie Stephenson
date: 2010-05-07 15:21:05.000000000

MISMATCHED INLINE COMMENT
Line:584, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/SWTUtils.java -> It isn't also related with UI so that it can be moved into UIUtils. Maybe in this case we should create new utility class called ValidationUtils ? What do you think ?

-------------------------------------
author: Leslie Stephenson
date: 2010-05-07 15:21:05.000000000

MISMATCHED INLINE COMMENT
Line:41, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/TagAction.java -> I've replace it with org.eclipse.jface.dialogs.MessageDialog

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