1 /*******************************************************************************
2 * Copyright (c) 2010 SAP AG.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Mathias Kinzler (SAP AG) - initial implementation
10 *******************************************************************************/
11 package org
.eclipse
.egit
.ui
.internal
.clone
;
15 import org
.eclipse
.egit
.ui
.UIText
;
16 import org
.eclipse
.jface
.wizard
.Wizard
;
17 import org
.eclipse
.jgit
.lib
.Repository
;
20 * A wizard used to import existing projects from a {@link Repository}
22 public class GitImportProjectsWizard
extends Wizard
{
24 private final String myWorkingDir
;
26 private final File myGitDir
;
32 * a path, either the working directory of the repository or a
33 * sub-directory thereof
35 public GitImportProjectsWizard(Repository repository
, String path
) {
38 myGitDir
= repository
.getDirectory();
39 setWindowTitle(UIText
.GitImportProjectsWizard_ImportExistingProjects0
);
43 public void addPages() {
45 GitProjectsImportPage page
= new GitProjectsImportPage() {
48 public void setVisible(boolean visible
) {
50 setProjectsList(myWorkingDir
);
51 super.setVisible(visible
);
59 public boolean performFinish() {
60 GitProjectsImportPage page
= (GitProjectsImportPage
) getPages()[0];
61 return page
.createProjects();