DESCRIPTION

Bug 513247 - a DropAdapter for GitHub URLs to clone GitHub repo

- Created new GitUrlChecker class that allows for checking strings to
see if it is a proper eGit URL. 
- You are now able to drag and drop a Git URL into a running worksapce
to spawn a Clone Git wizard (implemented by GitCloneDropAdapter).

Change-Id: I609d9847eff4de70f198c8d6ce1289e1a2155e98
Signed-off-by: Lorelei Hammond xxx@xxx.xxx


COMMENTS

author: Lorelei Hammond
date: 2017-03-27 18:36:01.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2017-03-27 18:36:08.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2017-03-27 18:59:09.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2017-05-04 14:40:43.000000000

Patch Set 3:

(9 comments)

Finally found some time to get back at this. Much better, just some minor points plus one bug relating to multi-line input in the clipboard when the RepositorySelectionPage is opened normally. DND functionality works. 

(I realize the RepositorySelectionPage has more problems with multi-line input actively being pasted -- we can deal with that in a follow-up commit. But existing functionality should stay the same, and having some arbitrary possibly multi-line text in the clipboard when this is invoked (other than via DND) is a real possibility.)

I'm a little a bit surprised that all this recursive drop target registration is apparently fast enough :-)

Line:331, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java -> If the clipboard contains multi-line text that just per chance starts with a recognized URL on the first line, we end up with the full multi-line text in the field. Previous code took only the first line in that case.

Line:10, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitUrlChecker.java -> Perhaps "factored out of RepositorySelectionPage"?

Line:45, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitUrlChecker.java -> Now that we're on Java 8, this could be shortened to \\h|\\v.

Line:59, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitUrlChecker.java -> Not true.

Line:65, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitUrlChecker.java -> This function and the GIT_CLONE_COMMAND_PREFIX are now duplicated here and in RepositorySelectionPage. Make public here, perhaps rename to sanitizeAsGitURL, make it return only the first line in case we have multi-line input, and use here and in RepositorySelectionPage.

Line:76, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitUrlChecker.java -> Please add the missing braces for the loop and the if statement.

Line:99, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneDropAdapter.java -> Hmmm... why is this public?

Line:178, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneDropAdapter.java -> This should be replaced with something more meaningful. Activator.logError(e.getLocalizedMessage(), e); might be a possibility.

Line:7, /COMMIT_MSG -> Please follow the EGit guidelines on commit messages. Basically remove the bug number from the title line and add it to the footer as

  Bug: 513247

See https://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines.

-------------------------------------
author: Lorelei Hammond
date: 2017-05-05 14:01:39.000000000

Patch Set 4: Patch Set 3 was rebased

-------------------------------------
author: Lorelei Hammond
date: 2017-05-05 21:30:45.000000000

MISMATCHED INLINE COMMENT
Line:331, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java -> Done

-------------------------------------
author: Lorelei Hammond
date: 2017-05-05 21:30:45.000000000

MISMATCHED INLINE COMMENT
Line:99, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneDropAdapter.java -> Done

-------------------------------------
author: Lorelei Hammond
date: 2017-05-05 21:30:45.000000000

MISMATCHED INLINE COMMENT
Line:178, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneDropAdapter.java -> Done

-------------------------------------
author: Lorelei Hammond
date: 2017-05-05 21:30:45.000000000

MISMATCHED INLINE COMMENT
Line:7, /COMMIT_MSG -> Done

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