diff options
author | Jean Michel-Lemieux | 2002-03-08 18:48:40 +0000 |
---|---|---|
committer | Jean Michel-Lemieux | 2002-03-08 18:48:40 +0000 |
commit | 0a2d2e2373991a2c34a29a7344ead310003cc27b (patch) | |
tree | 8c3fc85b92ae7b249cda6c98a778956ef2c76480 /bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java | |
parent | 90ff304233564a2cfe23766090ee1e3a5273c5c6 (diff) | |
download | eclipse.platform.team-0a2d2e2373991a2c34a29a7344ead310003cc27b.tar.gz eclipse.platform.team-0a2d2e2373991a2c34a29a7344ead310003cc27b.tar.xz eclipse.platform.team-0a2d2e2373991a2c34a29a7344ead310003cc27b.zip |
NLS fixes
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java index 9ee22d5fe..d0319548c 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java @@ -47,24 +47,17 @@ import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter; * A synchronizer is responsible for managing synchronization information for local * CVS resources. * - * [Notes: - * 1. how can we expire cache elements and purge to safe memory? - * 2. how can we safeguard against overwritting meta files changes made outside of Eclipse? I'm - * not sure we should force setting file contents in EclipseFile handles? - * 4. how do we reload - * ] - * * @see ResourceSyncInfo * @see FolderSyncInfo */ public class EclipseSynchronizer { // the resources plugin synchronizer is used to cache and possibly persist. These // are keys for storing the sync info. - private static final QualifiedName FOLDER_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-sync"); - private static final QualifiedName RESOURCE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "resource-sync"); - private static final QualifiedName IGNORE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-ignore"); + private static final QualifiedName FOLDER_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-sync"); //$NON-NLS-1$ + private static final QualifiedName RESOURCE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "resource-sync"); //$NON-NLS-1$ + private static final QualifiedName IGNORE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-ignore"); //$NON-NLS-1$ - private static final FolderSyncInfo EMPTY_FOLDER_SYNC_INFO = new FolderSyncInfo("", "", null, false); + private static final FolderSyncInfo EMPTY_FOLDER_SYNC_INFO = new FolderSyncInfo("", "", null, false); //$NON-NLS-1$ //$NON-NLS-2$ // the cvs eclipse synchronizer is a singleton private static EclipseSynchronizer instance; @@ -168,7 +161,12 @@ public class EclipseSynchronizer { public void setIgnored(IContainer resource, String pattern) throws CVSException { try { SyncFileWriter.addCVSIgnoreEntry(CVSWorkspaceRoot.getCVSFolderFor(resource), pattern); - // broadcast + String[] ignores = getIgnored(resource); + String[] newIgnores = new String[ignores.length+1]; + System.arraycopy(ignores, 0, newIgnores, 0, ignores.length); + newIgnores[ignores.length] = pattern; + setCachedFolderIgnores(resource, newIgnores); + // broadcast changes to unmanaged children - they are the only candidates for being ignored IResource[] children = resource.members(); List possibleIgnores = new ArrayList(); for (int i = 0; i < children.length; i++) { @@ -178,7 +176,7 @@ public class EclipseSynchronizer { } TeamPlugin.getManager().broadcastResourceStateChanges((IResource[])possibleIgnores.toArray(new IResource[possibleIgnores.size()])); } catch(CoreException e) { - throw CVSException.wrapException(resource, "Error setting an ignore pattern", e); + throw CVSException.wrapException(e); } } @@ -226,7 +224,7 @@ public class EclipseSynchronizer { int numDirty = dirtyParents.size(); int numResources = changedFolders.size() + numDirty; monitor.beginTask(null, numResources); - monitor.subTask("Updating CVS synchronization information..."); + monitor.subTask(Policy.bind("EclipseSynchronizer_updatingSyncEndOperation")); //$NON-NLS-1$ /*** write sync info to disk ***/ // folder sync info changes @@ -281,9 +279,6 @@ public class EclipseSynchronizer { Assert.isTrue(nestingCount>= 0); } - private static ISynchronizer getSynchronizer() { - return ResourcesPlugin.getWorkspace().getSynchronizer(); - } /* * Returns the cached resource sync info, or null if none found. @@ -423,7 +418,7 @@ public class EclipseSynchronizer { return children!=null; } catch(CoreException e) { throw CVSException.wrapException(e); - } + } } /** @@ -452,7 +447,7 @@ public class EclipseSynchronizer { } } } catch(CoreException e) { - throw CVSException.wrapException(root, "Problems occured deleting sync info", e); + throw CVSException.wrapException(e); } } @@ -476,7 +471,7 @@ public class EclipseSynchronizer { } } } catch(CoreException e) { - throw CVSException.wrapException(root, "Problems occured flushing sync info", e); + throw CVSException.wrapException(e); } } @@ -491,7 +486,7 @@ public class EclipseSynchronizer { container.setSessionProperty(FOLDER_SYNC_KEY, null); } } catch(CoreException e) { - throw CVSException.wrapException(container, "Problems occured flushing sync info for container", e); + throw CVSException.wrapException(e); } } }
\ No newline at end of file |