Community
Participate
Working Groups
Latest nightly "Import Projects..." should appear in "Git Repositories" view's context menu if multiple projects are selected in the view (inside the "Working directory"). Both from the context menu and via File > Import, the initial selection should correspond to the projects selected in the view, if any.
Created attachment 266421 [details] Context menu empty I want to fix this. Does EGit want to accept this contribution?
Wim, your screenshot shows multiple folders from *same* repository, which is different case, but yes, this would be nice to have too, and please create a dedicated bug for that.
I don't see where it mentions multiple _repositories_ in this bug report so I think this one is fine Andrey. Do you agree?
Sure, I misread the title.
(In reply to Wim Jongman from comment #1) > Created attachment 266421 [details] > Context menu empty > > I want to fix this. Does EGit want to accept this contribution? +1
Mickael, it seems that the SmartImportWizard is now the way forward for EGit. However, I see that it only accepts a single file (directory) or an archive file. I think we need to fix the wizard so that it can accept a bunch of directories in one form or another. One option would be to supply a list in a text file and make a special archive case. What do you think?
(In reply to Wim Jongman from comment #6) > Mickael, it seems that the SmartImportWizard is now the way forward for > EGit. However, I see that it only accepts a single file (directory) or an > archive file. I think we need to fix the wizard so that it can accept a > bunch of directories in one form or another. > One option would be to supply a list in a text file and make a special > archive case. What do you think? Another solution, more consistent with the wizard IMO, would be to open the wizard on the Git repo root and pre-select in the directories section the directories that were selected by the user in the Git repo view.
(In reply to Mickael Istria from comment #7) > > Another solution, more consistent with the wizard IMO, would be to open the > wizard on the Git repo root and pre-select in the directories section the > directories that were selected by the user in the Git repo view. In theory they might not come from the same directory. I filed Bug 510932 for this.
(In reply to Mickael Istria from comment #7) > > Another solution, more consistent with the wizard IMO, would be to open the > wizard on the Git repo root and pre-select in the directories section the > directories that were selected by the user in the Git repo view. That turned out to be the best approach. I implemented it in the standard git wizard: /** * Add a list of regular expressions that may match projects that this * wizard can show. If no filter is set or if the filter is empty then * projects will not be hidden. If a non empty filter is set and no projects * match then the wizard will not show any projects. * * @param pFilter * a list of regular expressions (or plain path names) */ public void setFilter(List<String> pFilter) { fFilter = pFilter; } /** * Gets the list of projects that filter in a subset of all eligible * projects. * * @return an unmodifiable list of projects which could be empty but never * null. * @see #setFilter(List) */ public List<String> getFilter() { if (fFilter == null) { return Collections.emptyList(); } return Collections.unmodifiableList(fFilter); }
video to show implementation in EGit default wizard. https://www.youtube.com/watch?v=aorw7Xo4S0E
Fixed.
Gerrit change https://git.eclipse.org/r/#/c/89611/ was merged: Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=76acd28a6f4d0f38a8a6f5a8c3c347155917ff26
New Gerrit change created: https://git.eclipse.org/r/90888
(In reply to Eclipse Genie from comment #13) > New Gerrit change created: https://git.eclipse.org/r/90888 (In reply to Matthias Sohn from comment #12) > Gerrit change https://git.eclipse.org/r/#/c/89611/ was merged: Commit: > http://git.eclipse.org/c/egit/egit.git/commit/ > ?id=76acd28a6f4d0f38a8a6f5a8c3c347155917ff26 This broke default "Git import wizard", which now fails to find ANY project in the file system, due: java.lang.ClassCastException: org.eclipse.egit.ui.internal.clone.GitImportWizard cannot be cast to org.eclipse.egit.ui.internal.clone.GitCreateProjectViaWizardWizard at org.eclipse.egit.ui.internal.clone.GitProjectsImportPage$8.isSelected(GitProjectsImportPage.java:444) at org.eclipse.egit.ui.internal.clone.GitProjectsImportPage$8.run(GitProjectsImportPage.java:427) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119) I have a trivial patch.
Gerrit change https://git.eclipse.org/r/90888 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=6f9a419139f018f8b1d3b3970cd9608ed40c71db