Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitProjectsImportPage.java28
1 files changed, 7 insertions, 21 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitProjectsImportPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitProjectsImportPage.java
index 43ec84c6d7..043e7c1934 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitProjectsImportPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitProjectsImportPage.java
@@ -41,7 +41,6 @@ import org.eclipse.egit.core.op.ConnectProviderOperation;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIText;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
@@ -67,16 +66,13 @@ import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.ui.internal.ide.StatusUtil;
-import org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage;
import org.eclipse.ui.statushandlers.StatusManager;
import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
/**
* The GitWizardProjectsImportPage is the page that allows the user to import
- * projects from a particular location. This is a modified copy of
- * {@link WizardProjectsImportPage}
+ * projects from a particular location. This is a modified copy of the
+ * WizardProjectsImportPage class from the org.eclipse.ui.ide bundle.
*/
public class GitProjectsImportPage extends WizardPage {
@@ -532,7 +528,7 @@ public class GitProjectsImportPage extends WizardPage {
});
} catch (InvocationTargetException e) {
- IDEWorkbenchPlugin.log(e.getMessage(), e);
+ Activator.logError(e.getMessage(), e);
} catch (InterruptedException e) {
// Nothing to do if the user interrupts.
}
@@ -590,7 +586,7 @@ public class GitProjectsImportPage extends WizardPage {
directoriesVisited.add(directory.getCanonicalPath());
} catch (IOException exception) {
StatusManager.getManager().handle(
- StatusUtil.newStatus(IStatus.ERROR, exception
+ new Status(IStatus.ERROR, Activator.getPluginId(), exception
.getLocalizedMessage(), exception));
}
}
@@ -618,7 +614,7 @@ public class GitProjectsImportPage extends WizardPage {
}
} catch (IOException exception) {
StatusManager.getManager().handle(
- StatusUtil.newStatus(IStatus.ERROR, exception
+ new Status(IStatus.ERROR, Activator.getPluginId(), exception
.getLocalizedMessage(), exception));
}
@@ -663,16 +659,7 @@ public class GitProjectsImportPage extends WizardPage {
} catch (InvocationTargetException e) {
// one of the steps resulted in a core exception
Throwable t = e.getTargetException();
- String message = UIText.WizardProjectImportPage_errorMessage;
- IStatus status;
- if (t instanceof CoreException) {
- status = ((CoreException) t).getStatus();
- } else {
- status = new Status(IStatus.ERROR,
- IDEWorkbenchPlugin.IDE_WORKBENCH, 1, message, t);
- }
- Activator.logError(message, t);
- ErrorDialog.openError(getShell(), message, null, status);
+ Activator.handleError(UIText.WizardProjectImportPage_errorMessage, t, true);
return false;
}
return true;
@@ -748,8 +735,7 @@ public class GitProjectsImportPage extends WizardPage {
*/
private IProject[] getProjectsInWorkspace() {
if (wsProjects == null) {
- wsProjects = IDEWorkbenchPlugin.getPluginWorkspace().getRoot()
- .getProjects();
+ wsProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
}
return wsProjects;
}

Back to the top