Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-12-18 15:07:37 +0000
committerJean Michel-Lemieux2003-12-18 15:07:37 +0000
commit41ca3c7ffa0274a7907423728462f21894d5157a (patch)
treebe691fab6a3935558e33dc481076b8f039e85ffc /bundles/org.eclipse.team.ui/src
parent953c056937de269709a161c6dbb2f14454ee0377 (diff)
downloadeclipse.platform.team-41ca3c7ffa0274a7907423728462f21894d5157a.tar.gz
eclipse.platform.team-41ca3c7ffa0274a7907423728462f21894d5157a.tar.xz
eclipse.platform.team-41ca3c7ffa0274a7907423728462f21894d5157a.zip
Bug 47433 saveState illegalWorkbenchState (really fixed this time!)
Diffstat (limited to 'bundles/org.eclipse.team.ui/src')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
index bd73fdb45..f658937b8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
@@ -140,6 +140,10 @@ public class SynchronizeManager implements ISynchronizeManager {
return participant != null;
}
+ public IMemento getSavedState() {
+ return savedState;
+ }
+
public boolean equals(Object other) {
try {
if(other == this) return true;
@@ -412,8 +416,12 @@ public class SynchronizeManager implements ISynchronizeManager {
List participants = (List) synchronizeParticipants.get(id);
for (Iterator it2 = participants.iterator(); it2.hasNext(); ) {
ParticipantInstance instance = (ParticipantInstance) it2.next();
- // An un-instantiated participant can't have any state to save, also
- // we don't want to trigger class creation when saving state.
+
+ // create the state placeholder for a participant
+ IMemento participantNode = xmlMemento.createChild(CTX_PARTICIPANT);
+ participantNode.putString(CTX_ID, instance.getId());
+ IMemento participantData = participantNode.createChild(CTX_PARTICIPANT_DATA);
+
if(instance.isParticipantInitialized()) {
ISynchronizeParticipant participant;
try {
@@ -422,9 +430,12 @@ public class SynchronizeManager implements ISynchronizeManager {
// Continue with the next participant instance.
continue;
}
- IMemento participantNode = xmlMemento.createChild(CTX_PARTICIPANT);
- participantNode.putString(CTX_ID, participant.getId());
- participant.saveState(participantNode.createChild(CTX_PARTICIPANT_DATA));
+ participant.saveState(participantData);
+ } else {
+ IMemento savedState = instance.getSavedState();
+ if(savedState != null) {
+ participantData.putMemento(savedState);
+ }
}
}
}

Back to the top