Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-03-01 16:33:47 -0500
committerjames2002-03-01 16:33:47 -0500
commit7d517e6ffe0c8e3e1ce863c114e98f195153350d (patch)
tree1a6bfb46c07bb1bd5382f73c1ab2754b7d959f6c
parentdb38885c44979afcd250d24cb2751bae045159f2 (diff)
downloadeclipse.platform.team-7d517e6ffe0c8e3e1ce863c114e98f195153350d.tar.gz
eclipse.platform.team-7d517e6ffe0c8e3e1ce863c114e98f195153350d.tar.xz
eclipse.platform.team-7d517e6ffe0c8e3e1ce863c114e98f195153350d.zip
10519: Assertion Exception opening merge dialog
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/VersionsElement.java9
6 files changed, 19 insertions, 8 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
index 89c32c255..2fd1e5905 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
@@ -401,7 +401,7 @@ public class HistoryView extends ViewPart implements ISelectionListener {
// Set a default title
setTitle(Policy.bind("HistoryView.title"));
}
- return null;
+ return new Object[0];
}
public void dispose() {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
index 95a226363..87220b8d9 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
@@ -208,7 +208,7 @@ public class TagSelectionDialog extends Dialog {
// initialize the table contents
try {
CVSTeamProvider provider = (CVSTeamProvider)TeamPlugin.getManager().getProvider(resource);
- tagTree.setInput(new ProjectElement((ICVSRemoteFolder)provider.getRemoteResource(resource)));
+ tagTree.setInput(new ProjectElement((ICVSRemoteFolder)provider.getRemoteResource(resource), getShell()));
} catch (TeamException e) {
// To do: error dialog
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
index cd00add5f..6beb89808 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
@@ -85,7 +85,7 @@ public class MergeWizardEndPage extends CVSWizardPage {
}
});
setControl(composite);
- tree.setInput(new ProjectElement(remote));
+ tree.setInput(new ProjectElement(remote, getShell()));
setPageComplete(false);
}
protected TreeViewer createTree(Composite parent) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
index 1063f9ed2..0cdb0a3f7 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
@@ -114,9 +114,9 @@ public class MergeWizardStartPage extends CVSWizardPage {
if (!(provider instanceof CVSTeamProvider)) return;
try {
ICVSRemoteFolder remoteResource = (ICVSRemoteFolder)((CVSTeamProvider)provider).getRemoteResource(project);
- table.setInput(new VersionsElement(remoteResource));
+ table.setInput(new VersionsElement(remoteResource, getShell()));
} catch (TeamException e) {
- // To do
+ // To do. This could only happen if the resource was not a child of the provider.
}
}
public void setProject(IProject project) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java
index 8773572ee..c7dd77dd0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java
@@ -7,20 +7,24 @@ package org.eclipse.team.internal.ccvs.ui.merge;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
import org.eclipse.ui.model.IWorkbenchAdapter;
public class ProjectElement implements IAdaptable, IWorkbenchAdapter {
ICVSRemoteFolder remote;
- public ProjectElement(ICVSRemoteFolder remote) {
+ Shell shell;
+
+ public ProjectElement(ICVSRemoteFolder remote, Shell shell) {
this.remote = remote;
+ this.shell = shell;
}
public Object[] getChildren(Object o) {
return new Object[] {
new BranchesElement(remote),
new TagElement(CVSTag.DEFAULT),
- new VersionsElement(remote)
+ new VersionsElement(remote, shell)
};
}
public Object getAdapter(Class adapter) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/VersionsElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/VersionsElement.java
index 480fffa79..c460fbe5e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/VersionsElement.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/VersionsElement.java
@@ -7,9 +7,11 @@ package org.eclipse.team.internal.ccvs.ui.merge;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.core.TeamException;
@@ -20,8 +22,11 @@ import org.eclipse.ui.model.IWorkbenchAdapter;
public class VersionsElement implements IWorkbenchAdapter, IAdaptable {
ICVSRemoteFolder remote;
- public VersionsElement(ICVSRemoteFolder remote) {
+ Shell shell;
+
+ public VersionsElement(ICVSRemoteFolder remote, Shell shell) {
this.remote = remote;
+ this.shell = shell;
}
public Object[] getChildren(Object o) {
final Object[][] result = new Object[1][];
@@ -37,9 +42,11 @@ public class VersionsElement implements IWorkbenchAdapter, IAdaptable {
result[0] = elements;
} catch (TeamException e) {
// To do
+ ErrorDialog.openError(shell, null, null, e.getStatus());
}
}
});
+ if (result[0] == null) return new Object[0];
return result[0];
}
public Object getAdapter(Class adapter) {

Back to the top