Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-03-10 15:37:13 +0000
committerJean Michel-Lemieux2004-03-10 15:37:13 +0000
commit8296588a95cbe5f38d9788dacafd27f9cf9d621b (patch)
tree747106887e7480dd8a81b156d043d8b5497b96be
parent25715522fcf5c8dabfc16b3b7874d546c8ee6512 (diff)
downloadeclipse.platform.team-8296588a95cbe5f38d9788dacafd27f9cf9d621b.tar.gz
eclipse.platform.team-8296588a95cbe5f38d9788dacafd27f9cf9d621b.tar.xz
eclipse.platform.team-8296588a95cbe5f38d9788dacafd27f9cf9d621b.zip
fixed assertion failuer on sync info update
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java34
1 files changed, 25 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java
index 3189f9f6b..fd3c93b44 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/viewers/SyncInfoModelElement.java
@@ -61,29 +61,45 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
fireChange();
}
+ /**
+ * Update this element with a changed sync info. The remote and base handles have to be updated
+ * with the new handles in the sync info.
+ *
+ * @param info the new sync info
+ */
public void update(SyncInfo info) {
this.info = info;
// update state
setKind(info.getKind());
// never have to update the local, it's always the workspace resource
- // remote
+ // Remote
RemoteResourceTypedElement rightEl = (RemoteResourceTypedElement)getRight();
- if(rightEl == null && info.getRemote() != null) {
+ IResourceVariant remote = info.getRemote();
+ if(rightEl == null && remote != null) {
setRight(createRemoteTypeElement(info));
- } else if(rightEl != null){
- rightEl.update(info.getRemote());
+ } else if(rightEl != null) {
+ if(remote == null) {
+ setRight(null);
+ } else {
+ rightEl.update(remote);
+ }
}
- // base
+ // Base
RemoteResourceTypedElement ancestorEl = (RemoteResourceTypedElement)getRight();
- if(ancestorEl == null && info.getBase() != null) {
+ IResourceVariant base = info.getBase();
+ if(ancestorEl == null && base != null) {
setAncestor(createBaseTypeElement(info));
- } else if(ancestorEl != null){
- ancestorEl.update(info.getBase());
+ } else if(ancestorEl != null) {
+ if(base == null) {
+ setAncestor(null);
+ } else {
+ ancestorEl.update(base);
+ }
}
fireChange();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffElement#getKind()
*/

Back to the top