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

rce resource)
    throws CVSException
  {
    BaserevInfo[] infos = SyncFileWriter.readAllBaserevInfo(resource.getParent());
    if (infos == null) {
      return;
    }
    Map infoMap = new HashMap();
    for (int i = 0; i < infos.length; i++) {
      infoMap.put(infos[i].getName(), infos[i]);
    }
    infoMap.remove(resource.getName());
    BaserevInfo[] newInfos = new BaserevInfo[infoMap.size()];
    int i = 0;
    for (Iterator iter = infoMap.values().iterator(); iter.hasNext();) {
      newInfos[(i++)] = ((BaserevInfo)iter.next());
    }
    SyncFileWriter.writeAllBaserevInfo(resource.getParent(), newInfos);
  }
  
  public void copyFileToBaseDirectory(IFile file, IProgressMonitor monitor)
    throws CVSException
  {
    monitor = Policy.monitorFor(monitor);
    monitor.beginTask(null, 100);
    ISchedulingRule rule = null;
    try
    {
      rule = beginBatching(file, Policy.subMonitorFor(monitor, 10));
      ResourceSyncInfo info = getResourceSync(file);
      if ((info == null) || (info.isAdded()) || (info.isDeleted())) {
        return;
      }
      ResourceSyncInfo info;
      SyncFileWriter.writeFileToBaseDirectory(file, Policy.subMonitorFor(monitor, 80));
      resourceChanged(file);
    }
    finally
    {
      if (rule != null) {
        endBatching(rule, Policy.subMonitorFor(monitor, 10));
      }
      monitor.done();
    }
    if (rule != null) {
      endBatching(rule, Policy.subMonitorFor(monitor, 10));
    }
    monitor.done();
  }
  
  public void restoreFileFromBaseDirectory(IFile file, IProgressMonitor monitor)
    throws CVSException
  {
    monitor = Policy.monitorFor(monitor);
    monitor.beginTask(null, 100);
    ISchedulingRule rule = null;
    try
    {
      rule = beginBatching(file, Policy.subMonitorFor(monitor, 10));
      ResourceSyncInfo info = getResourceSync(file);
      if ((info == null) || (info.isAdded())) {
        return;
      }
      ResourceSyncInfo info;
      SyncFileWriter.restoreFileFromBaseDirectory(file, Policy.subMonitorFor(monitor, 80));
      resourceChanged(file);
    }
    finally
    {
      if (rule != null) {
        endBatching(rule, Policy.subMonitorFor(monitor, 10));
      }
      monitor.done();
    }
    if (rule != null) {
      endBatching(rule, Policy.subMonitorFor(monitor, 10));
    }
    monitor.done();
  }
  
  public void deleteFileFromBaseDirectory(IFile file, IProgressMonitor monitor)
    throws CVSException
  {
    ResourceSyncInfo info = getResourceSync(file);
    if ((info == null) || (info.isAdded())) {
      return;
    }
    SyncFileWriter.deleteFileFromBaseDirectory(file, monitor);
  }
  
  public boolean isSyncInfoLoaded(IResource[] resources, int depth)
    throws CVSException
  {
    IContainer[] folders = getParentFolders(resources, depth);
    for (int i = 0; i < folders.length; i++)
    {
      IContainer parent = folders[i];
      if (!getSyncInfoCacheFor(parent).isSyncInfoLoaded(parent)) {
        return false;
      }
    }
    return true;
  }
  
  /* Error */
  public void ensureSyncInfoLoaded(IResource[] resources, int depth)
    throws CVSException
  {
    // Byte code:
    //   0: aload_0
    //   1: aload_1
    //   2: iload_2
    //   3: invokespecial 896	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getParentFolders	([Lorg/eclipse/core/resources/IResource;I)[Lorg/eclipse/core/resources/IContainer;
    //   6: astore_3
    //   7: iconst_0
    //   8: istore 4
    //   10: goto +96 -> 106
    //   13: aload_3
    //   14: iload 4
    //   16: aaload
    //   17: astore 5
    //   19: aconst_null
    //   20: astore 6
    //   22: aload_0
    //   23: aload 5
    //   25: aconst_null
    //   26: 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;
    //   29: astore 6
    //   31: aload_0
    //   32: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   35: aload_0
    //   36: aload 5
    //   38: iconst_1
    //   39: invokespecial 872	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:cacheResourceSyncForChildren	(Lorg/eclipse/core/resources/IContainer;Z)V
    //   42: aload_0
    //   43: aload 5
    //   45: invokespecial 870	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:cacheFolderSync	(Lorg/eclipse/core/resources/IContainer;)V
    //   48: aload_0
    //   49: aload 5
    //   51: invokespecial 907	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:cacheFolderIgnores	(Lorg/eclipse/core/resources/IContainer;)Lorg/eclipse/team/internal/ccvs/core/util/FileNameMatcher;
    //   54: pop
    //   55: goto +12 -> 67
    //   58: astore 7
    //   60: aload_0
    //   61: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   64: aload 7
    //   66: athrow
    //   67: aload_0
    //   68: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   71: goto +20 -> 91
    //   74: astore 8
    //   76: aload 6
    //   78: ifnull +10 -> 88
    //   81: aload_0
    //   82: aload 6
    //   84: aconst_null
    //   85: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   88: aload 8
    //   90: athrow
    //   91: aload 6
    //   93: ifnull +10 -> 103
    //   96: aload_0
    //   97: aload 6
    //   99: aconst_null
    //   100: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   103: iinc 4 1
    //   106: iload 4
    //   108: aload_3
    //   109: arraylength
    //   110: if_icmplt -97 -> 13
    //   113: return
    // Line number table:
    //   Java source line #1410	-> byte code offset #0
    //   Java source line #1412	-> byte code offset #7
    //   Java source line #1413	-> byte code offset #13
    //   Java source line #1414	-> byte code offset #19
    //   Java source line #1416	-> byte code offset #22
    //   Java source line #1418	-> byte code offset #31
    //   Java source line #1419	-> byte code offset #35
    //   Java source line #1420	-> byte code offset #42
    //   Java source line #1421	-> byte code offset #48
    //   Java source line #1422	-> byte code offset #58
    //   Java source line #1423	-> byte code offset #60
    //   Java source line #1424	-> byte code offset #64
    //   Java source line #1423	-> byte code offset #67
    //   Java source line #1425	-> byte code offset #74
    //   Java source line #1426	-> byte code offset #76
    //   Java source line #1427	-> byte code offset #88
    //   Java source line #1426	-> byte code offset #91
    //   Java source line #1412	-> byte code offset #103
    //   Java source line #1429	-> byte code offset #113
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	114	0	this	EclipseSynchronizer
    //   0	114	1	resources	IResource[]
    //   0	114	2	depth	int
    //   6	103	3	folders	IContainer[]
    //   8	99	4	i	int
    //   17	33	5	parent	IContainer
    //   20	78	6	rule	ISchedulingRule
    //   58	7	7	localObject1	Object
    //   74	15	8	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   31	58	58	finally
    //   22	74	74	finally
  }
  
  private IContainer[] getParentFolders(IResource[] resources, int depth)
    throws CVSException
  {
    Set folders = new HashSet();
    for (int i = 0; i < resources.length; i++)
    {
      IResource resource = resources[i];
      folders.add(resource.getProject());
      if (resource.getType() != 4) {
        folders.add(resource.getParent());
      }
      if (depth != 0) {
        try
        {
          resource.accept(new IResourceVisitor()
          {
            private final Set val$folders;
            
            public boolean visit(IResource innerResource)
              throws CoreException
            {
              if (innerResource.getType() == 2) {
                val$folders.add(innerResource);
              }
              return true;
            }
          }, depth, false);
        }
        catch (CoreException e)
        {
          throw CVSException.wrapException(e);
        }
      }
    }
    return (IContainer[])folders.toArray(new IContainer[folders.size()]);
  }
  
  /* Error */
  public void run(ISchedulingRule resourceRule, org.eclipse.team.internal.ccvs.core.ICVSRunnable runnable, IProgressMonitor monitor)
    throws CVSException
  {
    // Byte code:
    //   0: aload_3
    //   1: invokestatic 858	org/eclipse/team/internal/ccvs/core/Policy:monitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   4: astore_3
    //   5: aload_3
    //   6: aconst_null
    //   7: bipush 100
    //   9: invokeinterface 1040 3 0
    //   14: aload_0
    //   15: aload_1
    //   16: aload_3
    //   17: iconst_1
    //   18: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   21: 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;
    //   24: astore 4
    //   26: aload_2
    //   27: aload_3
    //   28: bipush 98
    //   30: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   33: invokeinterface 1048 2 0
    //   38: goto +30 -> 68
    //   41: astore 5
    //   43: aload 4
    //   45: ifnull +14 -> 59
    //   48: aload_0
    //   49: aload 4
    //   51: aload_3
    //   52: iconst_1
    //   53: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   56: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   59: aload_3
    //   60: invokeinterface 1036 1 0
    //   65: aload 5
    //   67: athrow
    //   68: aload 4
    //   70: ifnull +14 -> 84
    //   73: aload_0
    //   74: aload 4
    //   76: aload_3
    //   77: iconst_1
    //   78: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   81: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   84: aload_3
    //   85: invokeinterface 1036 1 0
    //   90: return
    // Line number table:
    //   Java source line #1470	-> byte code offset #0
    //   Java source line #1471	-> byte code offset #5
    //   Java source line #1472	-> byte code offset #14
    //   Java source line #1474	-> byte code offset #26
    //   Java source line #1475	-> byte code offset #41
    //   Java source line #1476	-> byte code offset #43
    //   Java source line #1477	-> byte code offset #59
    //   Java source line #1478	-> byte code offset #65
    //   Java source line #1476	-> byte code offset #68
    //   Java source line #1477	-> byte code offset #84
    //   Java source line #1479	-> byte code offset #90
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	91	0	this	EclipseSynchronizer
    //   0	91	1	resourceRule	ISchedulingRule
    //   0	91	2	runnable	org.eclipse.team.internal.ccvs.core.ICVSRunnable
    //   0	91	3	monitor	IProgressMonitor
    //   24	51	4	rule	ISchedulingRule
    //   41	25	5	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   26	41	41	finally
  }
  
  public boolean isEdited(IFile resource)
  {
    return SyncFileWriter.isEdited(resource);
  }
  
  void adjustDirtyStateRecursively(IResource resource, String indicator)
    throws CVSException
  {
    if (resource.getType() == 8) {
      return;
    }
    try
    {
      beginOperation();
      if (getSyncInfoCacheFor(resource).cachesDirtyState())
      {
        if (indicator == getDirtyIndicator(resource)) {
          return;
        }
        getSyncInfoCacheFor(resource).setDirtyIndicator(resource, indicator);
      }
      if (Policy.DEBUG_DIRTY_CACHING) {
        debug(resource, indicator, "adjusting dirty state");
      }
      IContainer parent = resource.getParent();
      if (indicator == "c") {
        adjustDirtyStateRecursively(parent, "r");
      }
      if (indicator == "r") {
        adjustDirtyStateRecursively(parent, "r");
      }
      if (indicator == "d") {
        adjustDirtyStateRecursively(parent, indicator);
      }
    }
    finally
    {
      endOperation();
    }
    endOperation();
  }
  
  protected String getDirtyIndicator(IResource resource)
    throws CVSException
  {
    String indicator = getSyncInfoCacheFor(resource).getDirtyIndicator(resource, false);
    if (indicator != null) {
      return indicator;
    }
    try
    {
      beginOperation();
      return getSyncInfoCacheFor(resource).getDirtyIndicator(resource, true);
    }
    finally
    {
      endOperation();
    }
  }
  
  protected void setDirtyIndicator(IResource resource, boolean modified)
    throws CVSException
  {
    String indicator = modified ? "d" : "c";
    
    adjustDirtyStateRecursively(resource, indicator);
  }
  
  private String getName(byte[] syncBytes)
    throws CVSException
  {
    return ResourceSyncInfo.getName(syncBytes);
  }
  
  private boolean isFolder(byte[] syncBytes)
  {
    return ResourceSyncInfo.isFolder(syncBytes);
  }
  
  private byte[] convertToDeletion(byte[] syncBytes)
    throws CVSException
  {
    return ResourceSyncInfo.convertToDeletion(syncBytes);
  }
  
  public static void debug(IResource resource, String indicator, String string)
  {
    String di = "d";
    if (indicator == "d") {
      di = "dirty";
    } else if (indicator == "c") {
      di = "clean";
    } else {
      di = "needs recomputing";
    }
    System.out.println("[" + string + ":" + di + "]  " + resource.getFullPath());
  }
  
  public int getModificationState(IResource resource)
    throws CVSException
  {
    String indicator = getDirtyIndicator(resource);
    if (Policy.DEBUG_DIRTY_CACHING) {
      debug(resource, indicator, "getModificationState");
    }
    if ((indicator == null) || (indicator == "r")) {
      return 0;
    }
    if (indicator == "d") {
      return 2;
    }
    if (indicator == "c") {
      return 1;
    }
    return 0;
  }
  
  public boolean isWithinActiveOperationScope(IResource resource)
  {
    return resourceLock.isWithinActiveOperationScope(resource);
  }
  
  /* Error */
  public void setTimeStamp(EclipseFile cvsFile, long time)
    throws CVSException
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore 4
    //   3: aload_1
    //   4: invokevirtual 863	org/eclipse/team/internal/ccvs/core/resources/EclipseFile:getIResource	()Lorg/eclipse/core/resources/IResource;
    //   7: checkcast 402	org/eclipse/core/resources/IFile
    //   10: astore 5
    //   12: aload_0
    //   13: aload 5
    //   15: aconst_null
    //   16: 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;
    //   19: astore 4
    //   21: aload_0
    //   22: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   25: aload 5
    //   27: lload_2
    //   28: invokeinterface 1019 3 0
    //   33: pop2
    //   34: aload_0
    //   35: aload_1
    //   36: iconst_1
    //   37: invokevirtual 891	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:setModified	(Lorg/eclipse/team/internal/ccvs/core/resources/EclipseFile;I)Z
    //   40: pop
    //   41: goto +11 -> 52
    //   44: astore 6
    //   46: aload 6
    //   48: invokestatic 855	org/eclipse/team/internal/ccvs/core/CVSException:wrapException	(Lorg/eclipse/core/runtime/CoreException;)Lorg/eclipse/team/internal/ccvs/core/CVSException;
    //   51: athrow
    //   52: aload_0
    //   53: aload 5
    //   55: invokespecial 877	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:resourceChanged	(Lorg/eclipse/core/resources/IResource;)V
    //   58: goto +12 -> 70
    //   61: astore 7
    //   63: aload_0
    //   64: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   67: aload 7
    //   69: athrow
    //   70: aload_0
    //   71: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   74: goto +20 -> 94
    //   77: astore 8
    //   79: aload 4
    //   81: ifnull +10 -> 91
    //   84: aload_0
    //   85: aload 4
    //   87: aconst_null
    //   88: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   91: aload 8
    //   93: athrow
    //   94: aload 4
    //   96: ifnull +10 -> 106
    //   99: aload_0
    //   100: aload 4
    //   102: aconst_null
    //   103: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   106: return
    // Line number table:
    //   Java source line #1625	-> byte code offset #0
    //   Java source line #1626	-> byte code offset #3
    //   Java source line #1628	-> byte code offset #12
    //   Java source line #1630	-> byte code offset #21
    //   Java source line #1632	-> byte code offset #25
    //   Java source line #1633	-> byte code offset #34
    //   Java source line #1634	-> byte code offset #44
    //   Java source line #1635	-> byte code offset #46
    //   Java source line #1637	-> byte code offset #52
    //   Java source line #1638	-> byte code offset #61
    //   Java source line #1639	-> byte code offset #63
    //   Java source line #1640	-> byte code offset #67
    //   Java source line #1639	-> byte code offset #70
    //   Java source line #1641	-> byte code offset #77
    //   Java source line #1642	-> byte code offset #79
    //   Java source line #1643	-> byte code offset #91
    //   Java source line #1642	-> byte code offset #94
    //   Java source line #1644	-> byte code offset #106
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	107	0	this	EclipseSynchronizer
    //   0	107	1	cvsFile	EclipseFile
    //   0	107	2	time	long
    //   1	100	4	rule	ISchedulingRule
    //   10	44	5	file	IFile
    //   44	3	6	e	CoreException
    //   61	7	7	localObject1	Object
    //   77	15	8	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   25	41	44	org/eclipse/core/runtime/CoreException
    //   21	61	61	finally
    //   12	77	77	finally
  }
  
  /* Error */
  public void postMove(IResource resource)
    throws CVSException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   4: aload_1
    //   5: invokeinterface 1024 1 0
    //   10: iconst_1
    //   11: if_icmpne +14 -> 25
    //   14: aload_0
    //   15: getfield 822	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:sessionPropertyCache	Lorg/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache;
    //   18: aload_1
    //   19: invokevirtual 916	org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache:purgeResourceSyncCache	(Lorg/eclipse/core/resources/IResource;)V
    //   22: goto +60 -> 82
    //   25: aload_1
    //   26: checkcast 401	org/eclipse/core/resources/IContainer
    //   29: astore_2
    //   30: aload_0
    //   31: getfield 822	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:sessionPropertyCache	Lorg/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache;
    //   34: aload_2
    //   35: iconst_1
    //   36: invokevirtual 919	org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache:purgeCache	(Lorg/eclipse/core/resources/IContainer;Z)[Lorg/eclipse/core/resources/IResource;
    //   39: pop
    //   40: aload_2
    //   41: new 437	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer$4
    //   44: dup
    //   45: aload_0
    //   46: invokespecial 913	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer$4:<init>	(Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;)V
    //   49: invokeinterface 1015 2 0
    //   54: goto +9 -> 63
    //   57: astore_3
    //   58: aload_3
    //   59: invokestatic 855	org/eclipse/team/internal/ccvs/core/CVSException:wrapException	(Lorg/eclipse/core/runtime/CoreException;)Lorg/eclipse/team/internal/ccvs/core/CVSException;
    //   62: athrow
    //   63: aload_0
    //   64: aload_2
    //   65: iconst_1
    //   66: aconst_null
    //   67: invokevirtual 898	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:flush	(Lorg/eclipse/core/resources/IContainer;ZLorg/eclipse/core/runtime/IProgressMonitor;)V
    //   70: goto +12 -> 82
    //   73: astore 4
    //   75: aload_0
    //   76: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   79: aload 4
    //   81: athrow
    //   82: aload_0
    //   83: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   86: return
    // Line number table:
    //   Java source line #1652	-> byte code offset #0
    //   Java source line #1653	-> byte code offset #4
    //   Java source line #1656	-> byte code offset #14
    //   Java source line #1658	-> byte code offset #25
    //   Java source line #1660	-> byte code offset #30
    //   Java source line #1663	-> byte code offset #40
    //   Java source line #1677	-> byte code offset #57
    //   Java source line #1678	-> byte code offset #58
    //   Java source line #1681	-> byte code offset #63
    //   Java source line #1683	-> byte code offset #73
    //   Java source line #1684	-> byte code offset #75
    //   Java source line #1685	-> byte code offset #79
    //   Java source line #1684	-> byte code offset #82
    //   Java source line #1686	-> byte code offset #86
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	87	0	this	EclipseSynchronizer
    //   0	87	1	resource	IResource
    //   29	36	2	container	IContainer
    //   57	2	3	e	CoreException
    //   73	7	4	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   40	54	57	org/eclipse/core/runtime/CoreException
    //   0	73	73	finally
  }
  
  /* Error */
  public void performMoveDelete(org.eclipse.team.internal.ccvs.core.ICVSRunnable runnable, IProgressMonitor monitor)
    throws CVSException
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_3
    //   2: aload_2
    //   3: aconst_null
    //   4: bipush 100
    //   6: invokeinterface 1040 3 0
    //   11: aload_0
    //   12: aconst_null
    //   13: aconst_null
    //   14: 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;
    //   17: astore_3
    //   18: aload_0
    //   19: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   22: aload_1
    //   23: aload_2
    //   24: bipush 95
    //   26: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   29: invokeinterface 1048 2 0
    //   34: goto +12 -> 46
    //   37: astore 4
    //   39: aload_0
    //   40: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   43: aload 4
    //   45: athrow
    //   46: aload_0
    //   47: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   50: goto +28 -> 78
    //   53: astore 5
    //   55: aload_3
    //   56: ifnull +13 -> 69
    //   59: aload_0
    //   60: aload_3
    //   61: aload_2
    //   62: iconst_5
    //   63: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   66: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   69: aload_2
    //   70: invokeinterface 1036 1 0
    //   75: aload 5
    //   77: athrow
    //   78: aload_3
    //   79: ifnull +13 -> 92
    //   82: aload_0
    //   83: aload_3
    //   84: aload_2
    //   85: iconst_5
    //   86: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   89: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   92: aload_2
    //   93: invokeinterface 1036 1 0
    //   98: return
    // Line number table:
    //   Java source line #1698	-> byte code offset #0
    //   Java source line #1700	-> byte code offset #2
    //   Java source line #1701	-> byte code offset #11
    //   Java source line #1703	-> byte code offset #18
    //   Java source line #1704	-> byte code offset #22
    //   Java source line #1705	-> byte code offset #37
    //   Java source line #1706	-> byte code offset #39
    //   Java source line #1707	-> byte code offset #43
    //   Java source line #1706	-> byte code offset #46
    //   Java source line #1708	-> byte code offset #53
    //   Java source line #1709	-> byte code offset #55
    //   Java source line #1710	-> byte code offset #69
    //   Java source line #1711	-> byte code offset #75
    //   Java source line #1709	-> byte code offset #78
    //   Java source line #1710	-> byte code offset #92
    //   Java source line #1712	-> byte code offset #98
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	99	0	this	EclipseSynchronizer
    //   0	99	1	runnable	org.eclipse.team.internal.ccvs.core.ICVSRunnable
    //   0	99	2	monitor	IProgressMonitor
    //   1	83	3	rule	ISchedulingRule
    //   37	7	4	localObject1	Object
    //   53	23	5	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   18	37	37	finally
    //   2	53	53	finally
  }
  
  public boolean setModified(EclipseFile cvsFile, int modificationState)
    throws CVSException
  {
    try
    {
      beginOperation();
      boolean dirty;
      boolean dirty;
      if (modificationState == 0) {
        dirty = cvsFile.isDirty();
      } else {
        dirty = modificationState == 2;
      }
      setDirtyIndicator(cvsFile.getIResource(), dirty);
      return dirty;
    }
    finally
    {
      endOperation();
    }
  }
  
  /* Error */
  public void setModified(org.eclipse.team.internal.ccvs.core.ICVSFolder cvsFolder, boolean modified)
    throws CVSException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   4: aload_1
    //   5: invokeinterface 1045 1 0
    //   10: checkcast 401	org/eclipse/core/resources/IContainer
    //   13: astore_3
    //   14: iload_2
    //   15: ifeq +7 -> 22
    //   18: iconst_0
    //   19: goto +4 -> 23
    //   22: iconst_1
    //   23: istore 4
    //   25: aload_1
    //   26: bipush 123
    //   28: invokeinterface 1046 2 0
    //   33: astore 5
    //   35: iconst_0
    //   36: istore 6
    //   38: goto +56 -> 94
    //   41: aload 5
    //   43: iload 6
    //   45: aaload
    //   46: invokeinterface 1047 1 0
    //   51: astore 7
    //   53: iload_2
    //   54: ifeq +20 -> 74
    //   57: aload_0
    //   58: aload 7
    //   60: invokevirtual 893	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getDirtyIndicator	(Lorg/eclipse/core/resources/IResource;)Ljava/lang/String;
    //   63: ldc 2
    //   65: if_acmpne +26 -> 91
    //   68: iconst_1
    //   69: istore 4
    //   71: goto +31 -> 102
    //   74: aload_0
    //   75: aload 7
    //   77: invokevirtual 893	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getDirtyIndicator	(Lorg/eclipse/core/resources/IResource;)Ljava/lang/String;
    //   80: ldc 1
    //   82: if_acmpeq +9 -> 91
    //   85: iconst_0
    //   86: istore 4
    //   88: goto +14 -> 102
    //   91: iinc 6 1
    //   94: iload 6
    //   96: aload 5
    //   98: arraylength
    //   99: if_icmplt -58 -> 41
    //   102: iload 4
    //   104: ifeq +21 -> 125
    //   107: aload_0
    //   108: aload_3
    //   109: iload_2
    //   110: invokevirtual 885	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:setDirtyIndicator	(Lorg/eclipse/core/resources/IResource;Z)V
    //   113: goto +12 -> 125
    //   116: astore 8
    //   118: aload_0
    //   119: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   122: aload 8
    //   124: athrow
    //   125: aload_0
    //   126: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   129: return
    // Line number table:
    //   Java source line #1749	-> byte code offset #0
    //   Java source line #1750	-> byte code offset #4
    //   Java source line #1754	-> byte code offset #14
    //   Java source line #1756	-> byte code offset #25
    //   Java source line #1757	-> byte code offset #35
    //   Java source line #1758	-> byte code offset #41
    //   Java source line #1759	-> byte code offset #53
    //   Java source line #1760	-> byte code offset #57
    //   Java source line #1761	-> byte code offset #68
    //   Java source line #1762	-> byte code offset #71
    //   Java source line #1765	-> byte code offset #74
    //   Java source line #1766	-> byte code offset #85
    //   Java source line #1767	-> byte code offset #88
    //   Java source line #1757	-> byte code offset #91
    //   Java source line #1771	-> byte code offset #102
    //   Java source line #1772	-> byte code offset #107
    //   Java source line #1774	-> byte code offset #116
    //   Java source line #1775	-> byte code offset #118
    //   Java source line #1776	-> byte code offset #122
    //   Java source line #1775	-> byte code offset #125
    //   Java source line #1777	-> byte code offset #129
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	130	0	this	EclipseSynchronizer
    //   0	130	1	cvsFolder	org.eclipse.team.internal.ccvs.core.ICVSFolder
    //   0	130	2	modified	boolean
    //   13	96	3	folder	IContainer
    //   23	80	4	okToSet	boolean
    //   33	64	5	children	org.eclipse.team.internal.ccvs.core.ICVSResource[]
    //   36	59	6	i	int
    //   51	25	7	resource	IResource
    //   116	7	8	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	116	116	finally
  }
  
  public boolean wasPhantom(IResource resource)
  {
    if (resource.exists()) {
      try
      {
        return (synchronizerCache.getCachedSyncBytes(resource, true) != null) || ((resource.getType() == 2) && (synchronizerCache.hasCachedFolderSync((IContainer)resource)));
      }
      catch (CVSException e)
      {
        CVSProviderPlugin.log(e);
      }
    }
    return false;
  }
  
  /* Error */
  public void resourcesRecreated(IResource[] resources, IProgressMonitor monitor)
    throws CVSException
  {
    // Byte code:
    //   0: aload_1
    //   1: arraylength
    //   2: ifne +4 -> 6
    //   5: return
    //   6: aconst_null
    //   7: astore_3
    //   8: aload_0
    //   9: aload_1
    //   10: invokespecial 901	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getProjectRule	([Lorg/eclipse/core/resources/IResource;)Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
    //   13: astore 4
    //   15: aload_2
    //   16: invokestatic 858	org/eclipse/team/internal/ccvs/core/Policy:monitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   19: astore_2
    //   20: aload_2
    //   21: aconst_null
    //   22: bipush 100
    //   24: invokeinterface 1040 3 0
    //   29: aload_0
    //   30: aload 4
    //   32: aload_2
    //   33: 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;
    //   36: astore_3
    //   37: iconst_0
    //   38: istore 5
    //   40: goto +28 -> 68
    //   43: aload_1
    //   44: iload 5
    //   46: aaload
    //   47: astore 6
    //   49: aload_0
    //   50: aload 6
    //   52: invokevirtual 875	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:created	(Lorg/eclipse/core/resources/IResource;)V
    //   55: goto +10 -> 65
    //   58: astore 7
    //   60: aload 7
    //   62: invokestatic 856	org/eclipse/team/internal/ccvs/core/CVSProviderPlugin:log	(Lorg/eclipse/core/runtime/CoreException;)V
    //   65: iinc 5 1
    //   68: iload 5
    //   70: aload_1
    //   71: arraylength
    //   72: if_icmplt -29 -> 43
    //   75: goto +28 -> 103
    //   78: astore 8
    //   80: aload_3
    //   81: ifnull +13 -> 94
    //   84: aload_0
    //   85: aload_3
    //   86: aload_2
    //   87: iconst_5
    //   88: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   91: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   94: aload_2
    //   95: invokeinterface 1036 1 0
    //   100: aload 8
    //   102: athrow
    //   103: aload_3
    //   104: ifnull +13 -> 117
    //   107: aload_0
    //   108: aload_3
    //   109: aload_2
    //   110: iconst_5
    //   111: invokestatic 859	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   114: invokevirtual 900	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endBatching	(Lorg/eclipse/core/runtime/jobs/ISchedulingRule;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   117: aload_2
    //   118: invokeinterface 1036 1 0
    //   123: return
    // Line number table:
    //   Java source line #1800	-> byte code offset #0
    //   Java source line #1801	-> byte code offset #6
    //   Java source line #1802	-> byte code offset #8
    //   Java source line #1804	-> byte code offset #15
    //   Java source line #1805	-> byte code offset #20
    //   Java source line #1806	-> byte code offset #29
    //   Java source line #1807	-> byte code offset #37
    //   Java source line #1808	-> byte code offset #43
    //   Java source line #1810	-> byte code offset #49
    //   Java source line #1811	-> byte code offset #58
    //   Java source line #1812	-> byte code offset #60
    //   Java source line #1807	-> byte code offset #65
    //   Java source line #1815	-> byte code offset #78
    //   Java source line #1816	-> byte code offset #80
    //   Java source line #1817	-> byte code offset #94
    //   Java source line #1818	-> byte code offset #100
    //   Java source line #1816	-> byte code offset #103
    //   Java source line #1817	-> byte code offset #117
    //   Java source line #1819	-> byte code offset #123
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	124	0	this	EclipseSynchronizer
    //   0	124	1	resources	IResource[]
    //   0	124	2	monitor	IProgressMonitor
    //   7	102	3	rule	ISchedulingRule
    //   13	18	4	projectsRule	ISchedulingRule
    //   38	31	5	i	int
    //   47	4	6	resource	IResource
    //   58	3	7	e	CVSException
    //   78	23	8	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   49	55	58	org/eclipse/team/internal/ccvs/core/CVSException
    //   15	78	78	finally
  }
  
  private ISchedulingRule getProjectRule(IResource[] resources)
  {
    HashSet set = new HashSet();
    for (int i = 0; i < resources.length; i++)
    {
      IResource resource = resources[i];
      set.add(resource.getProject());
    }
    IProject[] projects = (IProject[])set.toArray(new IProject[set.size()]);
    if (projects.length == 1) {
      return projects[0];
    }
    return new MultiRule(projects);
  }
  
  /* Error */
  protected void created(IResource resource)
    throws CVSException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 865	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:beginOperation	()V
    //   4: aload_1
    //   5: invokeinterface 1025 1 0
    //   10: ifeq +36 -> 46
    //   13: aload_0
    //   14: aload_1
    //   15: invokespecial 878	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:restoreResourceSync	(Lorg/eclipse/core/resources/IResource;)V
    //   18: aload_1
    //   19: invokeinterface 1024 1 0
    //   24: iconst_2
    //   25: if_icmpne +21 -> 46
    //   28: aload_0
    //   29: aload_1
    //   30: checkcast 403	org/eclipse/core/resources/IFolder
    //   33: invokespecial 873	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:restoreFolderSync	(Lorg/eclipse/core/resources/IFolder;)V
    //   36: goto +10 -> 46
    //   39: astore_2
    //   40: aload_0
    //   41: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   44: aload_2
    //   45: athrow
    //   46: aload_0
    //   47: invokespecial 866	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:endOperation	()V
    //   50: return
    // Line number table:
    //   Java source line #1836	-> byte code offset #0
    //   Java source line #1837	-> byte code offset #4
    //   Java source line #1838	-> byte code offset #13
    //   Java source line #1839	-> byte code offset #18
    //   Java source line #1840	-> byte code offset #28
    //   Java source line #1843	-> byte code offset #39
    //   Java source line #1844	-> byte code offset #40
    //   Java source line #1845	-> byte code offset #44
    //   Java source line #1844	-> byte code offset #46
    //   Java source line #1846	-> byte code offset #50
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	51	0	this	EclipseSynchronizer
    //   0	51	1	resource	IResource
    //   39	6	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	39	39	finally
  }
  
  /* Error */
  private void restoreFolderSync(org.eclipse.core.resources.IFolder folder)
    
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