Bug 513247 - a DropAdapter for GitHub URLs to clone GitHub repo
Summary: a DropAdapter for GitHub URLs to clone GitHub repo
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.8   Edit
Assignee: Ian Pun CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2017-03-07 10:01 EST by Mickael Istria CLA
Modified: 2017-05-05 17:55 EDT (History)
3 users (show)

See Also:


Attachments
snippet video of the functionality working (753.00 KB, video/webm)
2017-03-08 11:04 EST, Ian Pun CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2017-03-07 10:01:04 EST
Similarly to how Marketplace has implemented a custom DropAdapter to handle Marketplace URL by poping up the MPC wizard on the right solution, it would be very nice to have Eclipse GitHub integration showing the GitHub clone wizard when DNDing a github URL.
Comment 1 Thomas Wolf CLA 2017-03-08 04:56:37 EST
What had you in mind as the drop target? The repositories view?
Comment 2 Mickael Istria CLA 2017-03-08 05:02:34 EST
(In reply to Thomas Wolf from comment #1)
> What had you in mind as the drop target? The repositories view?

Like MPC, I'd imagine the whole workbench would be the most convenient. See MarketplaceDropAdapter as reference.
Comment 3 Thomas Wolf CLA 2017-03-08 05:15:34 EST
(In reply to Mickael Istria from comment #2)
> (In reply to Thomas Wolf from comment #1)
> > What had you in mind as the drop target? The repositories view?
> 
> Like MPC, I'd imagine the whole workbench would be the most convenient. See
> MarketplaceDropAdapter as reference.

Not sure about that. For MPC this kind of makes sense, since it's about installing something in Eclipse. But Eclipse is not primarily a git client... with Egit installed, it is _also_ a git client, but that's not its primary purpose.

Would we have to worry about conflicting with whatever other such global DND handlers might exist now or in the future?

If something like that were done, why limit it to GitHub URLs? How about Gerrit project pages, Gitlab, Bitbucket, or arbitrary clone URIs?
Comment 4 Mickael Istria CLA 2017-03-08 07:10:47 EST
(In reply to Thomas Wolf from comment #3)
> Not sure about that. For MPC this kind of makes sense, since it's about
> installing something in Eclipse. But Eclipse is not primarily a git
> client... with Egit installed, it is _also_ a git client, but that's not its
> primary purpose.

Ok for the theory. Now, in practice, if we want to make things simpler; requiring users to primarily open the Repositories view and drop there is really a strong requirement for this workflow to work.
From a README.md "Drag into Eclipse IDE to open" is much simpler than "In your Eclipse IDE, open the Git Repositories view and drag this into this view".
For MPC, then the same reasoning would make it only target the "Plugins" view

> Would we have to worry about conflicting with whatever other such global DND
> handlers might exist now or in the future?

I wouldn't say worry, but that'd be something to keep in mind, just in case.

> If something like that were done, why limit it to GitHub URLs?How about
> Gerrit project pages, Gitlab, Bitbucket, or arbitrary clone URIs?

GitHub and Gerrit have specific integrations in the IDE, so each integration could detect and handle their URLs (including URLs of web pages directly, not necessarily clone URIs).
GitLab and BitBucker could support a similar feature if they have some specific plugin for Eclipse IDE.
Arbitrary clone URIs (URIs suffixed by .git I guess?) would be great to support directly in EGit.
Comment 5 Eclipse Genie CLA 2017-03-08 11:01:02 EST
New Gerrit change created: https://git.eclipse.org/r/92625
Comment 6 Ian Pun CLA 2017-03-08 11:04:36 EST
Created attachment 267172 [details]
snippet video of the functionality working
Comment 7 Mickael Istria CLA 2017-03-08 11:43:41 EST
Thanks Ian, that looks very good!
@EGit committers: do you think there is a change to get such feature part of Oxygen? I think we need something simple in Eclipse IDE to counter IJ's https://chrome.google.com/webstore/detail/jetbrains-toolbox-extensi/offnedcbhjldheanlbojaefbfbllddna and it's "Open in IntelliJ" button on GitHub pages.
Comment 8 Ian Pun CLA 2017-03-27 14:51:19 EDT
I just uploaded some of the bigger changes that were recommended for my patch. I re-modified it so that theoretically any class could use the GitUrlChecker methods to make sure their URL strings are correct. I've left the earlyStartUp() method call alone until we can come to a conclusion on that. 

Let me know if there is any other things that should be changed.
Comment 9 Alexander Kurtakov CLA 2017-04-06 14:04:26 EDT
Any progress on this one? What is stopping it from further progress?
Comment 10 Ian Pun CLA 2017-05-01 11:43:01 EDT
Hi, Just folllowing up to see if there's any new update to the patch reviews?
Comment 11 Eclipse Genie CLA 2017-05-05 17:30:41 EDT
Gerrit change https://git.eclipse.org/r/92625 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=c8e178cc3eff1851ce223c8e3546bf0cdec23a69
Comment 12 Thomas Wolf CLA 2017-05-05 17:55:59 EDT
DropAdapter handles any URL that EGit thinks is a valid git URL, and then opens the clone wizard for it.

Available in http://download.eclipse.org/egit/updates-nightly as of EGit 4.8.0.201705052131.