diff options
| author | Remy Suen | 2010-04-29 00:00:35 +0000 |
|---|---|---|
| committer | Remy Suen | 2010-04-29 00:00:35 +0000 |
| commit | e0a3a9f3405712a68b2cbd35edc2edce27df7070 (patch) | |
| tree | 418f292080c32b9eddf68125f87806fd025c7ed9 | |
| parent | aab83866fee0b24946e74197b5aa02f55aa28c9a (diff) | |
| download | egit-e0a3a9f3405712a68b2cbd35edc2edce27df7070.tar.gz egit-e0a3a9f3405712a68b2cbd35edc2edce27df7070.tar.xz egit-e0a3a9f3405712a68b2cbd35edc2edce27df7070.zip | |
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.java | 28 |
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; } |
