Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Macguire2002-05-10 03:58:47 +0000
committerKevin Macguire2002-05-10 03:58:47 +0000
commite74914be10ce2b43990ea4468449717ac73315b8 (patch)
tree4a7c044cc60945287baf8cc19f066813fe216a47
parent807886d433ba7eaa680b44a7f7a75c71e252f8db (diff)
downloadeclipse.platform.team-e74914be10ce2b43990ea4468449717ac73315b8.tar.gz
eclipse.platform.team-e74914be10ce2b43990ea4468449717ac73315b8.tar.xz
eclipse.platform.team-e74914be10ce2b43990ea4468449717ac73315b8.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
index 87f00898e..1c13ccc27 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
@@ -9,6 +9,7 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceStatus;
import org.eclipse.core.resources.ISynchronizer;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -55,6 +56,10 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
/*************** State Factory ***************/
+ public void registerWithSynchronizer() {
+ getSynchronizer().add(getIdentifier());
+ }
+
/**
* Answers the synchronizer.
*/
@@ -319,14 +324,14 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
*/
public void setProject(IProject project) {
super.setProject(project);
- try {
- restoreConfiguration();
+/* try {
+ restoreConfiguration(); This will fail because root is null first time
} catch (CoreException e) {
TeamPlugin.log(IStatus.ERROR, "Error configuring project", e);
} catch (IOException e) {
TeamPlugin.log(IStatus.ERROR, "Error configuring project", e);
}
- }
+*/ }
@@ -369,6 +374,8 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
configure(configuration);
// Store the new configuration for future.
+ registerWithSynchronizer();
+
storeConfiguration(configuration);
}
@@ -380,13 +387,13 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
/**
* Associates the given configuration with the given project.
- * Stores the configuration under the <code>getType()</code> key.
+ * Stores the configuration under the <code>getIdentifier()</code> key.
*/
private void storeConfiguration(Properties configuration) throws IOException, CoreException {
// Remove any old configuration first.
QualifiedName configKey = getIdentifier();
getSynchronizer().flushSyncInfo(configKey, getProject(), IResource.DEPTH_INFINITE);
-
+
// Flatten the configuration to bytes.
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
byteStream.write(CONFIG_FORMAT_VERSION);

Back to the top