org.eclipse.team.cvs.core_3.3.400.I20110510-0800

id run(IProgressMonitor monitor)
          throws CoreException
        {
          try
          {
            EclipseSynchronizer.getInstance().run(getIResource(), val$job, monitor);
          }
          catch (CVSException e)
          {
            val$error[0] = e;
          }
        }
      }, null, 0, monitor);
    }
    catch (CoreException e)
    {
      throw CVSException.wrapException(e);
    }
    if (error[0] != null) {
      throw error[0];
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ccvs.core.resources.EclipseResource
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.internal.ccvs.core.resources;

import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.core.subscribers.BatchingLock.ThreadInfo;

class EclipseSynchronizer$1
  implements IWorkspaceRunnable
{
  final EclipseSynchronizer this$0;
  private final BatchingLock.ThreadInfo val$info;
  
  EclipseSynchronizer$1(EclipseSynchronizer paramEclipseSynchronizer, BatchingLock.ThreadInfo paramThreadInfo)
  {
    this$0 = paramEclipseSynchronizer;val$info = paramThreadInfo;
  }
  
  public void run(IProgressMonitor pm)
    throws CoreException
  {
    IStatus status = this$0.commitCache(val$info, pm);
    if (!status.isOK()) {
      throw new CVSException(status);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.internal.ccvs.core.resources;

import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;

class EclipseSynchronizer$2
  implements IResourceVisitor
{
  final EclipseSynchronizer this$0;
  
  EclipseSynchronizer$2(EclipseSynchronizer paramEclipseSynchronizer)
  {
    this$0 = paramEclipseSynchronizer;
  }
  
  public boolean visit(IResource innerResource)
    throws CoreException
  {
    try
    {
      return this$0.prepareForDeletion(innerResource);
    }
    catch (CVSException e)
    {
      CVSProviderPlugin.log(e);
      throw new CoreException(e.getStatus());
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.internal.ccvs.core.resources;

import java.util.Set;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;

class EclipseSynchronizer$3
  implements IResourceVisitor
{
  final EclipseSynchronizer this$0;
  private final Set val$folders;
  
  EclipseSynchronizer$3(EclipseSynchronizer paramEclipseSynchronizer, Set paramSet)
  {
    this$0 = paramEclipseSynchronizer;val$folders = paramSet;
  }
  
  public boolean visit(IResource innerResource)
    throws CoreException
  {
    if (innerResource.getType() == 2) {
      val$folders.add(innerResource);
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.internal.ccvs.core.resources;

import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;

class EclipseSynchronizer$4
  implements IResourceVisitor
{
  final EclipseSynchronizer this$0;
  
  EclipseSynchronizer$4(EclipseSynchronizer paramEclipseSynchronizer)
  {
    this$0 = paramEclipseSynchronizer;
  }
  
  public boolean visit(IResource resource)
    throws CoreException
  {
    if (this$0.getSyncBytes(resource) != null) {
      EclipseSynchronizer.access$0(this$0, resource);
    }
    if ((resource.getType() != 1) && 
      (this$0.getFolderSync((IContainer)resource) != null))
    {
      EclipseSynchronizer.access$1(this$0, (IContainer)resource);
      return true;
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.4
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.internal.ccvs.core.resources;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
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.IResourceVisitor;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.ILock;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.MultiRule;
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSMessages;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSStatus;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.syncinfo.BaserevInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.NotifyInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.ReentrantLock;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
import org.eclipse.team.internal.ccvs.core.util.ResourceStateChangeListeners;
import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
import org.eclipse.team.internal.core.subscribers.BatchingLock.IFlushOperation;
import org.eclipse.team.internal.core.subscribers.BatchingLock.ThreadInfo;
import org.osgi.framework.Bundle;

public class EclipseSynchronizer
  implements BatchingLock.IFlushOperation
{
  private static final String IS_DIRTY_INDICATOR = "d";
  private static final String NOT_DIRTY_INDICATOR = "c";
  private static final String RECOMPUTE_INDICATOR = "r";
  private static EclipseSynchronizer instance;
  private ILock lock = Job.getJobManager().newLock();
  private ReentrantLock resourceLock = new ReentrantLock();
  private SynchronizerSyncInfoCache synchronizerCache = new SynchronizerSyncInfoCache();
  private SessionPropertySyncInfoCache sessionPropertyCache = new SessionPropertySyncInfoCache(synchronizerCache);
  
  public static EclipseSynchronizer getInstance()
  {
    if (instance == null) {
      instance = new EclipseSynchronizer();
    }
    return instance;
  }
  
  public SyncInfoCache getSyncInfoCacheFor(IResource resource)
  {
    if ((resource.exists()) && (resource.isLocal(0))) {
      return sessionPropertyCache;
    }
    return synchronizerCache;
  }
  
  private boolean isValid(IResource resource)
  {
    return (resource.exists()) || (synchronizerCache.isPhantom(resource));
  }
  
  /* Error */
  public void setFolderSync(IContainer folder, FolderSyncInfo info)
    throws CVSException
  {
    // Byte code:
    //   0: aload_2
    //   1: invokestatic 842	org/eclipse/core/runtime/Assert:isNotNull	(Ljava/lang/Object;)V
    //   4: aload_1
    //   5: invokeinterface 1010 1 0
    //   10: bipush 8
    //   12: if_icmpne +4 -> 16
    //   15: return
    //   16: aload_0
    //   17: aload_1
    //   18: invokespecial 880	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:isValid	(Lorg/eclipse/core/resources/IResource;)Z
    //   21: ifne +61 -> 82
    //   24: aload_0
    //   25: aload_1
    //   26: invokeinterface 1012 1 0
    //   31: invokevirtual 903	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getFolderSync	(Lorg/eclipse/core/resources/IContainer;)Lorg/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo;
    //   34: ifnonnull +48 -> 82
    //   37: new 426	org/eclipse/team/internal/ccvs/core/CVSStatus
    //   40: dup
    //   41: iconst_4
    //   42: bipush -6
    //   44: getstatic 812	org/eclipse/team/internal/ccvs/core/CVSMessages:EclipseSynchronizer_ErrorSettingFolderSync	Ljava/lang/String;
    //   47: iconst_1
    //   48: anewarray 389	java/lang/String
    //   51: dup
    //   52: iconst_0
    //   53: aload_1
    //   54: invokeinterface 1016 1 0
    //   59: invokeinterface 1035 1 0
    //   64: aastore
    //   65: invokestatic 852	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   68: aload_1
    //   69: invokespecial 857	org/eclipse/team/internal/ccvs/core/CVSStatus:<init>	(IILjava/lang/String;Lorg/eclipse/core/resources/IResource;)V
    //   72: astore_3
    //   73: new 423	org/eclipse/team/internal/ccvs/core/CVSException
    //   76: dup
    //   77: aload_3
    //   78: invokespecial 854	org/eclipse/team/internal/ccvs/core/CVSException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
    //   81: athrow
    //   82: aconst_null
    //   83: astore_3
    //   84: aload_0
    //   85: aload_1
    //   86: aconst_null
    //   87: invokevirtual 909	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
    //   90: astore_3
    //   91: aload_0
    //   92: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   95: aload_0
    //   96: aload_1
    //   97: invokevirtual 903	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getFolderSync	(Lorg/eclipse/core/resources/IContainer;)Lorg/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo;
    //   100: astore 4
    //   102: aload_0
    //   103: aload_1
    //   104: invokevirtual 902	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getSyncInfoCacheFor	(Lorg/eclipse/core/resources/IResource;)Lorg/eclipse/team/internal/ccvs/core/resources/SyncInfoCache;
    //   107: aload_1
    //   108: aload_2
    //   109: iconst_1
    //   110: invokevirtual 932	org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache:setCachedFolderSync	(Lorg/eclipse/core/resources/IContainer;Lorg/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo;Z)V
    //   113: aload 4
    //   115: ifnonnull +10 -> 125
    //   118: aload_0
    //   119: aload_1
    //   120: ldc 3
    //   122: invokevirtual 894	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:adjustDirtyStateRecursively	(Lorg/eclipse/core/resources/IResource;Ljava/lang/String;)V
    //   125: aload_0
    //   126: aload_1
    //   127: invokespecial 871	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:folderChanged	(Lorg/eclipse/core/resources/IContainer;)V
    //   130: goto +12 -> 142
    //   133: astore 5
    //   135: aload_0
    //   136: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   139: aload 5
    //   141: athrow
    //   142: aload_0
    //   143: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   146: goto +18 -> 164
    //   149: astore 6
    //   151: aload_3
    //   152: ifnull +9 -> 161
    //   155: aload_0
    //   156: aload_3
    //   157: aconst_null
    //   158: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   161: aload 6
    //   163: athrow
    //   164: aload_3
    //   165: ifnull +9 -> 174
    //   168: aload_0
    //   169: aload_3
    //   170: aconst_null
    //   171: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   174: return
    // Line number table:
    //   Java source line #104	-> byte code offset #0
    //   Java source line #106	-> byte code offset #4
    //   Java source line #107	-> byte code offset #16
    //   Java source line #111	-> byte code offset #24
    //   Java source line #112	-> byte code offset #37
    //   Java source line #113	-> byte code offset #44
    //   Java source line #112	-> byte code offset #69
    //   Java source line #114	-> byte code offset #73
    //   Java source line #117	-> byte code offset #82
    //   Java source line #119	-> byte code offset #84
    //   Java source line #121	-> byte code offset #91
    //   Java source line #123	-> byte code offset #95
    //   Java source line #125	-> byte code offset #102
    //   Java source line #127	-> byte code offset #113
    //   Java source line #128	-> byte code offset #118
    //   Java source line #130	-> byte code offset #125
    //   Java source line #131	-> byte code offset #133
    //   Java source line #132	-> byte code offset #135
    //   Java source line #133	-> byte code offset #139
    //   Java source line #132	-> byte code offset #142
    //   Java source line #134	-> byte code offset #149
    //   Java source line #135	-> byte code offset #151
    //   Java source line #136	-> byte code offset #161
    //   Java source line #135	-> byte code offset #164
    //   Java source line #137	-> byte code offset #174
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	175	0	this	EclipseSynchronizer
    //   0	175	1	folder	IContainer
    //   0	175	2	info	FolderSyncInfo
    //   72	6	3	status	IStatus
    //   83	87	3	rule	ISchedulingRule
    //   100	14	4	oldInfo	FolderSyncInfo
    //   133	7	5	localObject1	Object
    //   149	13	6	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   91	133	133	finally
    //   84	149	149	finally
  }
  
  public FolderSyncInfo getFolderSync(IContainer folder)
    throws CVSException
  {
    if ((folder.getType() == 8) || (!isValid(folder))) {
      return null;
    }
    FolderSyncInfo info = getSyncInfoCacheFor(folder).getCachedFolderSync(folder, false);
    if (info != null) {
      return info;
    }
    try
    {
      beginOperation();
      cacheFolderSync(folder);
      return getSyncInfoCacheFor(folder).getCachedFolderSync(folder, true);
    }
    finally
    {
      endOperation();
    }
  }
  
  /* Error */
  public void deleteFolderSync(IContainer folder)
    throws CVSException
  {
    // Byte code:
    //   0: aload_1
    //   1: invokeinterface 1010 1 0
    //   6: bipush 8
    //   8: if_icmpeq +11 -> 19
    //   11: aload_0
    //   12: aload_1
    //   13: invokespecial 880	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:isValid	(Lorg/eclipse/core/resources/IResource;)Z
    //   16: ifne +4 -> 20
    //   19: return
    //   20: aconst_null
    //   21: astore_2
    //   22: aload_0
    //   23: aload_1
    //   24: aconst_null
    //   25: invokevirtual 909	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
    //   28: astore_2
    //   29: aload_0
    //   30: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   33: aload_0
    //   34: aload_1
    //   35: iconst_1
    //   36: invokespecial 872	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:cacheResourceSyncForChildren	(Lorg/eclipse/core/resources/IContainer;Z)V
    //   39: aload_1
    //   40: iconst_1
    //   41: invokeinterface 1014 2 0
    //   46: astore_3
    //   47: iconst_0
    //   48: istore 4
    //   50: goto +31 -> 81
    //   53: aload_3
    //   54: iload 4
    //   56: aaload
    //   57: astore 5
    //   59: aload_0
    //   60: aload 5
    //   62: invokespecial 877	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:resourceChanged	(Lorg/eclipse/core/resources/IResource;)V
    //   65: aload_0
    //   66: aload 5
    //   68: invokevirtual 902	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getSyncInfoCacheFor	(Lorg/eclipse/core/resources/IResource;)Lorg/eclipse/team/internal/ccvs/core/resources/SyncInfoCache;
    //   71: aload 5
    //   73: aconst_null
    //   74: iconst_1
    //   75: invokevirtual 929	org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache:setCachedSyncBytes	(Lorg/eclipse/core/resources/IResource;[BZ)V
    //   78: iinc 4 1
    //   81: iload 4
    //   83: aload_3
    //   84: arraylength
    //   85: if_icmplt -32 -> 53
    //   88: aload_0
    //   89: aload_1
    //   90: invokevirtual 902	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getSyncInfoCacheFor	(Lorg/eclipse/core/resources/IResource;)Lorg/eclipse/team/internal/ccvs/core/resources/SyncInfoCache;
    //   93: aload_1
    //   94: aconst_null
    //   95: iconst_1
    //   96: invokevirtual 932	org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache:setCachedFolderSync	(Lorg/eclipse/core/resources/IContainer;Lorg/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo;Z)V
    //   99: aload_0
    //   100: aload_1
    //   101: invokespecial 871	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:folderChanged	(Lorg/eclipse/core/resources/IContainer;)V
    //   104: goto +18 -> 122
    //   107: astore_3
    //   108: aload_3
    //   109: invokestatic 855	org/eclipse/team/internal/ccvs/core/CVSException:wrapException	(Lorg/eclipse/core/runtime/CoreException;)Lorg/eclipse/team/internal/ccvs/core/CVSException;
    //   112: athrow
    //   113: astore 6
    //   115: aload_0
    //   116: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   119: aload 6
    //   121: athrow
    //   122: aload_0
    //   123: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   126: goto +18 -> 144
    //   129: astore 7
    //   131: aload_2
    //   132: ifnull +9 -> 141
    //   135: aload_0
    //   136: aload_2
    //   137: aconst_null
    //   138: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   141: aload 7
    //   143: athrow
    //   144: aload_2
    //   145: ifnull +9 -> 154
    //   148: aload_0
    //   149: aload_2
    //   150: aconst_null
    //   151: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   154: return
    // Line number table:
    //   Java source line #169	-> byte code offset #0
    //   Java source line #170	-> byte code offset #20
    //   Java source line #172	-> byte code offset #22
    //   Java source line #174	-> byte code offset #29
    //   Java source line #177	-> byte code offset #33
    //   Java source line #178	-> byte code offset #39
    //   Java source line #179	-> byte code offset #47
    //   Java source line #180	-> byte code offset #53
    //   Java source line #181	-> byte code offset #59
    //   Java source line #183	-> byte code offset #65
    //   Java source line #179	-> byte code offset #78
    //   Java source line #186	-> byte code offset #88
    //   Java source line #187	-> byte code offset #99
    //   Java source line #188	-> byte code offset #107
    //   Java source line #189	-> byte code offset #108
    //   Java source line #190	-> byte code offset #113
    //   Java source line #191	-> byte code offset #115
    //   Java source line #192	-> byte code offset #119
    //   Java source line #191	-> byte code offset #122
    //   Java source line #192	-> byte code offset #126
    //   Java source line #193	-> byte code offset #129
    //   Java source line #194	-> byte code offset #131
    //   Java source line #195	-> byte code offset #141
    //   Java source line #194	-> byte code offset #144
    //   Java source line #196	-> byte code offset #154
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	155	0	this	EclipseSynchronizer
    //   0	155	1	folder	IContainer
    //   21	129	2	rule	ISchedulingRule
    //   46	38	3	children	IResource[]
    //   107	2	3	e	CoreException
    //   48	34	4	i	int
    //   57	15	5	resource	IResource
    //   113	7	6	localObject1	Object
    //   129	13	7	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   29	104	107	org/eclipse/core/runtime/CoreException
    //   29	113	113	finally
    //   22	129	129	finally
  }
  
  private void folderChanged(IContainer folder)
  {
    resourceLock.folderChanged(folder);
  }
  
  private void resourceChanged(IResource resource)
  {
    resourceLock.resourceChanged(resource);
  }
  
  /* Error */
  public void setResourceSync(IResource resource, ResourceSyncInfo info)
    throws CVSException
  {
    // Byte code:
    //   0: aload_2
    //   1: invokestatic 842	org/eclipse/core/runtime/Assert:isNotNull	(Ljava/lang/Object;)V
    //   4: aload_1
    //   5: invokeinterface 1028 1 0
    //   10: astore_3
    //   11: aload_3
    //   12: ifnull +22 -> 34
    //   15: aload_3
    //   16: invokeinterface 1010 1 0
    //   21: bipush 8
    //   23: if_icmpeq +11 -> 34
    //   26: aload_0
    //   27: aload_3
    //   28: invokespecial 880	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:isValid	(Lorg/eclipse/core/resources/IResource;)Z
    //   31: ifne +50 -> 81
    //   34: new 426	org/eclipse/team/internal/ccvs/core/CVSStatus
    //   37: dup
    //   38: iconst_4
    //   39: bipush -6
    //   41: getstatic 814	org/eclipse/team/internal/ccvs/core/CVSMessages:EclipseSynchronizer_ErrorSettingResourceSync	Ljava/lang/String;
    //   44: iconst_1
    //   45: anewarray 389	java/lang/String
    //   48: dup
    //   49: iconst_0
    //   50: aload_1
    //   51: invokeinterface 1032 1 0
    //   56: invokeinterface 1035 1 0
    //   61: aastore
    //   62: invokestatic 852	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   65: aload_1
    //   66: invokespecial 857	org/eclipse/team/internal/ccvs/core/CVSStatus:<init>	(IILjava/lang/String;Lorg/eclipse/core/resources/IResource;)V
    //   69: astore 4
    //   71: new 423	org/eclipse/team/internal/ccvs/core/CVSException
    //   74: dup
    //   75: aload 4
    //   77: invokespecial 854	org/eclipse/team/internal/ccvs/core/CVSException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
    //   80: athrow
    //   81: aconst_null
    //   82: astore 4
    //   84: aload_0
    //   85: aload_1
    //   86: aconst_null
    //   87: invokevirtual 909	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
    //   90: astore 4
    //   92: aload_0
    //   93: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   96: aload_0
    //   97: aload_3
    //   98: iconst_1
    //   99: invokespecial 872	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:cacheResourceSyncForChildren	(Lorg/eclipse/core/resources/IContainer;Z)V
    //   102: aload_0
    //   103: aload_1
    //   104: aload_2
    //   105: invokespecial 906	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:setCachedResourceSync	(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo;)V
    //   108: aload_0
    //   109: aload_1
    //   110: invokespecial 877	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:resourceChanged	(Lorg/eclipse/core/resources/IResource;)V
    //   113: goto +12 -> 125
    //   116: astore 5
    //   118: aload_0
    //   119: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   122: aload 5
    //   124: athrow
    //   125: aload_0
    //   126: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   129: goto +20 -> 149
    //   132: astore 6
    //   134: aload 4
    //   136: ifnull +10 -> 146
    //   139: aload_0
    //   140: aload 4
    //   142: aconst_null
    //   143: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   146: aload 6
    //   148: athrow
    //   149: aload 4
    //   151: ifnull +10 -> 161
    //   154: aload_0
    //   155: aload 4
    //   157: aconst_null
    //   158: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   161: return
    // Line number table:
    //   Java source line #215	-> byte code offset #0
    //   Java source line #216	-> byte code offset #4
    //   Java source line #217	-> byte code offset #11
    //   Java source line #218	-> byte code offset #34
    //   Java source line #219	-> byte code offset #41
    //   Java source line #218	-> byte code offset #66
    //   Java source line #220	-> byte code offset #71
    //   Java source line #222	-> byte code offset #81
    //   Java source line #224	-> byte code offset #84
    //   Java source line #226	-> byte code offset #92
    //   Java source line #228	-> byte code offset #96
    //   Java source line #229	-> byte code offset #102
    //   Java source line #230	-> byte code offset #108
    //   Java source line #231	-> byte code offset #116
    //   Java source line #232	-> byte code offset #118
    //   Java source line #233	-> byte code offset #122
    //   Java source line #232	-> byte code offset #125
    //   Java source line #234	-> byte code offset #132
    //   Java source line #235	-> byte code offset #134
    //   Java source line #236	-> byte code offset #146
    //   Java source line #235	-> byte code offset #149
    //   Java source line #237	-> byte code offset #161
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	162	0	this	EclipseSynchronizer
    //   0	162	1	resource	IResource
    //   0	162	2	info	ResourceSyncInfo
    //   10	88	3	parent	IContainer
    //   69	7	4	status	IStatus
    //   82	74	4	rule	ISchedulingRule
    //   116	7	5	localObject1	Object
    //   132	15	6	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   92	116	116	finally
    //   84	132	132	finally
  }
  
  public ResourceSyncInfo getResourceSync(IResource resource)
    throws CVSException
  {
    byte[] info = getSyncBytes(resource);
    if (info == null) {
      return null;
    }
    return new ResourceSyncInfo(info);
  }
  
  public byte[] getSyncBytes(IResource resource)
    throws CVSException
  {
    IContainer parent = resource.getParent();
    if ((parent == null) || (parent.getType() == 8) || (!isValid(parent))) {
      return null;
    }
    byte[] info = getSyncInfoCacheFor(resource).getCachedSyncBytes(resource, false);
    if (info != null) {
      return info;
    }
    try
    {
      beginOperation();
      byte[] arrayOfByte1;
      try
      {
        cacheResourceSyncForChildren(parent, false);
      }
      catch (CVSException e)
      {
        if ((isCannotModifySynchronizer(e)) || (isResourceNotFound(e)))
        {
          byte[] bytes = getSyncBytesFromDisk(resource);
          if ((!resource.exists()) && (bytes != null) && (!ResourceSyncInfo.isDeletion(bytes))) {
            bytes = ResourceSyncInfo.convertToDeletion(bytes);
          }
          return bytes;
        }
        throw e;
      }
      return getCachedSyncBytes(resource);
    }
    finally
    {
      endOperation();
    }
  }
  
  /* Error */
  public void setSyncBytes(IResource resource, byte[] syncBytes)
    throws CVSException
  {
    // Byte code:
    //   0: aload_2
    //   1: invokestatic 842	org/eclipse/core/runtime/Assert:isNotNull	(Ljava/lang/Object;)V
    //   4: aload_1
    //   5: invokeinterface 1028 1 0
    //   10: astore_3
    //   11: aload_3
    //   12: ifnull +22 -> 34
    //   15: aload_3
    //   16: invokeinterface 1010 1 0
    //   21: bipush 8
    //   23: if_icmpeq +11 -> 34
    //   26: aload_0
    //   27: aload_3
    //   28: invokespecial 880	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:isValid	(Lorg/eclipse/core/resources/IResource;)Z
    //   31: ifne +50 -> 81
    //   34: new 426	org/eclipse/team/internal/ccvs/core/CVSStatus
    //   37: dup
    //   38: iconst_4
    //   39: bipush -6
    //   41: getstatic 814	org/eclipse/team/internal/ccvs/core/CVSMessages:EclipseSynchronizer_ErrorSettingResourceSync	Ljava/lang/String;
    //   44: iconst_1
    //   45: anewarray 389	java/lang/String
    //   48: dup
    //   49: iconst_0
    //   50: aload_1
    //   51: invokeinterface 1032 1 0
    //   56: invokeinterface 1035 1 0
    //   61: aastore
    //   62: invokestatic 852	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   65: aload_1
    //   66: invokespecial 857	org/eclipse/team/internal/ccvs/core/CVSStatus:<init>	(IILjava/lang/String;Lorg/eclipse/core/resources/IResource;)V
    //   69: astore 4
    //   71: new 423	org/eclipse/team/internal/ccvs/core/CVSException
    //   74: dup
    //   75: aload 4
    //   77: invokespecial 854	org/eclipse/team/internal/ccvs/core/CVSException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
    //   80: athrow
    //   81: aconst_null
    //   82: astore 4
    //   84: aload_0
    //   85: aload_1
    //   86: aconst_null
    //   87: invokevirtual 909	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
    //   90: astore 4
    //   92: aload_0
    //   93: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   96: aload_0
    //   97: aload_3
    //   98: iconst_1
    //   99: invokespecial 872	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:cacheResourceSyncForChildren	(Lorg/eclipse/core/resources/IContainer;Z)V
    //   102: aload_0
    //   103: aload_1
    //   104: aload_2
    //   105: invokespecial 886	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:setCachedSyncBytes	(Lorg/eclipse/core/resources/IResource;[B)V
    //   108: aload_0
    //   109: aload_1
    //   110: invokespecial 877	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:resourceChanged	(Lorg/eclipse/core/resources/IResource;)V
    //   113: goto +12 -> 125
    //   116: astore 5
    //   118: aload_0
    //   119: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   122: aload 5
    //   124: athrow
    //   125: aload_0
    //   126: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   129: goto +20 -> 149
    //   132: astore 6
    //   134: aload 4
    //   136: ifnull +10 -> 146
    //   139: aload_0
    //   140: aload 4
    //   142: aconst_null
    //   143: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   146: aload 6
    //   148: athrow
    //   149: aload 4
    //   151: ifnull +10 -> 161
    //   154: aload_0
    //   155: aload 4
    //   157: aconst_null
    //   158: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   161: return
    // Line number table:
    //   Java source line #298	-> byte code offset #0
    //   Java source line #299	-> byte code offset #4
    //   Java source line #300	-> byte code offset #11
    //   Java source line #301	-> byte code offset #34
    //   Java source line #302	-> byte code offset #41
    //   Java source line #301	-> byte code offset #66
    //   Java source line #303	-> byte code offset #71
    //   Java source line #305	-> byte code offset #81
    //   Java source line #307	-> byte code offset #84
    //   Java source line #309	-> byte code offset #92
    //   Java source line #311	-> byte code offset #96
    //   Java source line #312	-> byte code offset #102
    //   Java source line #313	-> byte code offset #108
    //   Java source line #314	-> byte code offset #116
    //   Java source line #315	-> byte code offset #118
    //   Java source line #316	-> byte code offset #122
    //   Java source line #315	-> byte code offset #125
    //   Java source line #317	-> byte code offset #132
    //   Java source line #318	-> byte code offset #134
    //   Java source line #319	-> byte code offset #146
    //   Java source line #318	-> byte code offset #149
    //   Java source line #320	-> byte code offset #161
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	162	0	this	EclipseSynchronizer
    //   0	162	1	resource	IResource
    //   0	162	2	syncBytes	byte[]
    //   10	88	3	parent	IContainer
    //   69	7	4	status	IStatus
    //   82	74	4	rule	ISchedulingRule
    //   116	7	5	localObject1	Object
    //   132	15	6	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   92	116	116	finally
    //   84	132	132	finally
  }
  
  /* Error */
  public void deleteResourceSync(IResource resource)
    throws CVSException
  {
    // Byte code:
    //   0: aload_1
    //   1: invokeinterface 1028 1 0
    //   6: astore_2
    //   7: aload_2
    //   8: ifnull +22 -> 30
    //   11: aload_2
    //   12: invokeinterface 1010 1 0
    //   17: bipush 8
    //   19: if_icmpeq +11 -> 30
    //   22: aload_0
    //   23: aload_2
    //   24: invokespecial 880	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:isValid	(Lorg/eclipse/core/resources/IResource;)Z
    //   27: ifne +4 -> 31
    //   30: return
    //   31: aconst_null
    //   32: astore_3
    //   33: aload_0
    //   34: aload_1
    //   35: aconst_null
    //   36: invokevirtual 909	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
    //   39: astore_3
    //   40: aload_0
    //   41: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   44: aload_0
    //   45: aload_2
    //   46: iconst_1
    //   47: invokespecial 872	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:cacheResourceSyncForChildren	(Lorg/eclipse/core/resources/IContainer;Z)V
    //   50: aload_0
    //   51: aload_1
    //   52: invokespecial 882	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getCachedSyncBytes	(Lorg/eclipse/core/resources/IResource;)[B
    //   55: ifnull +31 -> 86
    //   58: aload_0
    //   59: aload_1
    //   60: aconst_null
    //   61: invokespecial 886	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:setCachedSyncBytes	(Lorg/eclipse/core/resources/IResource;[B)V
    //   64: aload_0
    //   65: aload_1
    //   66: invokespecial 874	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:clearDirtyIndicator	(Lorg/eclipse/core/resources/IResource;)V
    //   69: aload_0
    //   70: aload_1
    //   71: invokespecial 877	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:resourceChanged	(Lorg/eclipse/core/resources/IResource;)V
    //   74: goto +12 -> 86
    //   77: astore 4
    //   79: aload_0
    //   80: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   83: aload 4
    //   85: athrow
    //   86: aload_0
    //   87: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   90: goto +18 -> 108
    //   93: astore 5
    //   95: aload_3
    //   96: ifnull +9 -> 105
    //   99: aload_0
    //   100: aload_3
    //   101: aconst_null
    //   102: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   105: aload 5
    //   107: athrow
    //   108: aload_3
    //   109: ifnull +9 -> 118
    //   112: aload_0
    //   113: aload_3
    //   114: aconst_null
    //   115: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   118: return
    // Line number table:
    //   Java source line #329	-> byte code offset #0
    //   Java source line #330	-> byte code offset #7
    //   Java source line #331	-> byte code offset #31
    //   Java source line #333	-> byte code offset #33
    //   Java source line #335	-> byte code offset #40
    //   Java source line #337	-> byte code offset #44
    //   Java source line #338	-> byte code offset #50
    //   Java source line #339	-> byte code offset #58
    //   Java source line #340	-> byte code offset #64
    //   Java source line #341	-> byte code offset #69
    //   Java source line #343	-> byte code offset #77
    //   Java source line #344	-> byte code offset #79
    //   Java source line #345	-> byte code offset #83
    //   Java source line #344	-> byte code offset #86
    //   Java source line #346	-> byte code offset #93
    //   Java source line #347	-> byte code offset #95
    //   Java source line #348	-> byte code offset #105
    //   Java source line #347	-> byte code offset #108
    //   Java source line #349	-> byte code offset #118
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	119	0	this	EclipseSynchronizer
    //   0	119	1	resource	IResource
    //   6	40	2	parent	IContainer
    //   32	82	3	rule	ISchedulingRule
    //   77	7	4	localObject1	Object
    //   93	13	5	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   40	77	77	finally
    //   33	93	93	finally
  }
  
  private void clearDirtyIndicator(IResource resource)
    throws CVSException
  {
    getSyncInfoCacheFor(resource).flushDirtyCache(resource);
    adjustDirtyStateRecursively(resource.getParent(), "r");
  }
  
  /* Error */
  publ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd