aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Suen2010-04-28 20:00:35 -0400
committerRemy Suen2010-04-28 20:00:35 -0400
commite0a3a9f3405712a68b2cbd35edc2edce27df7070 (patch)
tree418f292080c32b9eddf68125f87806fd025c7ed9
parentaab83866fee0b24946e74197b5aa02f55aa28c9a (diff)
downloadegit-e0a3a9f3405712a68b2cbd35edc2edce27df7070.zip
egit-e0a3a9f3405712a68b2cbd35edc2edce27df7070.tar.gz
egit-e0a3a9f3405712a68b2cbd35edc2edce27df7070.tar.xz
Remove references to internal classes in GitProjectsImportPage
Where possible, internal classes should not be referenced as they are not API and may be moved, renamed, or deleted at any time. Bug: 310933 Change-Id: I6d2d8c0ada7a334544f60319f57afbbf00caa509
-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 43ec84c..043e7c1 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;
}