Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-06-16 16:22:21 +0000
committerMichael Valenta2004-06-16 16:22:21 +0000
commitba6cc57db8e7fc5d2a15979524cc3326794fa7fe (patch)
tree19c9b622edbd958478a3b19f1179a397b5f63e7b
parent82ad6dd43ce5b12d9608ea0394db3ccb193ed352 (diff)
downloadeclipse.platform.team-ba6cc57db8e7fc5d2a15979524cc3326794fa7fe.tar.gz
eclipse.platform.team-ba6cc57db8e7fc5d2a15979524cc3326794fa7fe.tar.xz
eclipse.platform.team-ba6cc57db8e7fc5d2a15979524cc3326794fa7fe.zip
Updating examples
-rw-r--r--examples/org.eclipse.team.examples.filesystem/plugin.properties4
-rw-r--r--examples/org.eclipse.team.examples.filesystem/plugin.xml16
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java6
3 files changed, 14 insertions, 12 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/plugin.properties b/examples/org.eclipse.team.examples.filesystem/plugin.properties
index 246f0c863..dda9b9c00 100644
--- a/examples/org.eclipse.team.examples.filesystem/plugin.properties
+++ b/examples/org.eclipse.team.examples.filesystem/plugin.properties
@@ -17,8 +17,8 @@ Put.name=Put
Put.tooltip=Copy resources to the shared file system location
Get.name=Get
Get.tooltip=Copy resources from the shared file system location to the workbench
-Unmanage.name=Unmanage
-Unmanage.tooltip=Mark resources as not-shared
+Unmanage.name=Disconnect
+Unmanage.tooltip=Disconnect the project from the shared file system locaton
Replace.name=File System Contents
Replace.tooltip=Overwrites the local copy of this resource with the one in the repository
diff --git a/examples/org.eclipse.team.examples.filesystem/plugin.xml b/examples/org.eclipse.team.examples.filesystem/plugin.xml
index fbbe41d5c..39007b74a 100644
--- a/examples/org.eclipse.team.examples.filesystem/plugin.xml
+++ b/examples/org.eclipse.team.examples.filesystem/plugin.xml
@@ -96,11 +96,11 @@
value="org.eclipse.team.core.repository=org.eclipse.team.examples.filesystem.FileSystemProvider">
</filter>
<action
- label="%Synchronize.name"
- tooltip="%Synchronize.tooltip"
- class="org.eclipse.team.examples.filesystem.ui.SynchronizeAction"
+ label="%Put.name"
+ tooltip="%Put.tooltip"
+ class="org.eclipse.team.examples.filesystem.ui.PutAction"
menubarPath="team.main/group1"
- id="org.eclipse.team.examples.filesystem.synchronize">
+ id="org.eclipse.team.examples.filesystem.put">
</action>
<action
label="%Get.name"
@@ -110,11 +110,11 @@
id="org.eclipse.team.examples.filesystem.get">
</action>
<action
- label="%Put.name"
- tooltip="%Put.tooltip"
- class="org.eclipse.team.examples.filesystem.ui.PutAction"
+ label="%Synchronize.name"
+ tooltip="%Synchronize.tooltip"
+ class="org.eclipse.team.examples.filesystem.ui.SynchronizeAction"
menubarPath="team.main/group1"
- id="org.eclipse.team.examples.filesystem.put">
+ id="org.eclipse.team.examples.filesystem.synchronize">
</action>
<action
label="%Replace.name"
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java
index f87f98f1f..4d2d38c28 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java
@@ -205,8 +205,8 @@ public class FileSystemOperations {
FileSystemResourceVariant remote = getResourceVariant(localFile);
byte[] baseBytes = synchronizer.getBaseBytes(localFile);
IResourceVariant base = provider.getResourceVariant(localFile, baseBytes);
- if (!synchronizer.hasSyncBytes(localFile) || (
- synchronizer.isLocallyModified(localFile) && !overrideOutgoing)) {
+ if (!synchronizer.hasSyncBytes(localFile)
+ || (synchronizer.isLocallyModified(localFile) && !overrideOutgoing)) {
// Do not overwrite the local modification
return;
}
@@ -214,6 +214,7 @@ public class FileSystemOperations {
// The remote no longer exists so remove the local
try {
localFile.delete(false, true, progress);
+ synchronizer.flush(localFile, IResource.DEPTH_ZERO);
} catch (CoreException e) {
throw TeamException.asTeamException(e);
}
@@ -239,6 +240,7 @@ public class FileSystemOperations {
}
// Mark as read-only to force a checkout before editing
localFile.setReadOnly(true);
+ synchronizer.setBaseBytes(localFile, remote.asBytes());
} catch (IOException e) {
throw FileSystemPlugin.wrapException(e);
} catch (CoreException e) {

Back to the top