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

purgeCVSFolders(val$destination, Policy.subMonitorFor(monitor, 20));
    EclipseSynchronizer.getInstance().postMove(val$destination);
  }
  
  private void purgeCVSFolders(IFolder destination, IProgressMonitor monitor)
    throws CVSException
  {
    try
    {
      destination.accept(new MoveDeleteHook.5(this, val$tree, val$updateFlags, monitor), 
      
        2, 2);
    }
    catch (CoreException e)
    {
      throw CVSException.wrapException(e);
    }
  }
}

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

import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.resources.team.IResourceTree;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;

class MoveDeleteHook$5
  implements IResourceVisitor
{
  final MoveDeleteHook.4 this$1;
  private final IResourceTree val$tree;
  private final int val$updateFlags;
  private final IProgressMonitor val$monitor;
  
  MoveDeleteHook$5(MoveDeleteHook.4 param4, IResourceTree paramIResourceTree, int paramInt, IProgressMonitor paramIProgressMonitor)
  {
    this$1 = param4;val$tree = paramIResourceTree;val$updateFlags = paramInt;val$monitor = paramIProgressMonitor;
  }
  
  public boolean visit(IResource resource)
    throws CoreException
  {
    if ((resource.getType() == 2) && (resource.getName().equals("CVS")))
    {
      val$tree.standardDeleteFolder((IFolder)resource, val$updateFlags, val$monitor);
      return false;
    }
    return true;
  }
}

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

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

class MoveDeleteHook$6
  implements IResourceVisitor
{
  final MoveDeleteHook this$0;
  private final List val$readOnlyFiles;
  
  MoveDeleteHook$6(MoveDeleteHook paramMoveDeleteHook, List paramList)
  {
    this$0 = paramMoveDeleteHook;val$readOnlyFiles = paramList;
  }
  
  public boolean visit(IResource resource)
    throws CoreException
  {
    if (resource.getType() == 1)
    {
      IFile file = (IFile)resource;
      if (file.isReadOnly()) {
        val$readOnlyFiles.add(file);
      }
    }
    return true;
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFileModificationValidator;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.resources.team.FileModificationValidator;
import org.eclipse.core.resources.team.IMoveDeleteHook;
import org.eclipse.core.resources.team.IResourceTree;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
import org.eclipse.team.internal.ccvs.core.ICVSFileModificationValidator;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;

public class MoveDeleteHook
  implements IMoveDeleteHook
{
  /* Error */
  public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload 4
    //   2: aconst_null
    //   3: bipush 100
    //   5: invokeinterface 237 3 0
    //   10: aload_2
    //   11: invokeinterface 230 1 0
    //   16: ifeq +12 -> 28
    //   19: aload 4
    //   21: invokeinterface 236 1 0
    //   26: iconst_0
    //   27: ireturn
    //   28: aload_2
    //   29: invokestatic 212	org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot:getCVSFileFor	(Lorg/eclipse/core/resources/IFile;)Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   32: astore 5
    //   34: aload 5
    //   36: invokeinterface 239 1 0
    //   41: ifeq +12 -> 53
    //   44: aload 4
    //   46: invokeinterface 236 1 0
    //   51: iconst_0
    //   52: ireturn
    //   53: aload_0
    //   54: aload_1
    //   55: iconst_1
    //   56: anewarray 94	org/eclipse/core/resources/IFile
    //   59: dup
    //   60: iconst_0
    //   61: aload_2
    //   62: aastore
    //   63: aload 4
    //   65: bipush 30
    //   67: invokestatic 211	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   70: invokevirtual 219	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook:checkOutFiles	(Lorg/eclipse/core/resources/team/IResourceTree;[Lorg/eclipse/core/resources/IFile;Lorg/eclipse/core/runtime/IProgressMonitor;)Z
    //   73: ifne +12 -> 85
    //   76: aload 4
    //   78: invokeinterface 236 1 0
    //   83: iconst_1
    //   84: ireturn
    //   85: invokestatic 214	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   88: new 112	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$1
    //   91: dup
    //   92: aload_0
    //   93: aload_2
    //   94: aload_1
    //   95: iload_3
    //   96: invokespecial 221	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$1:<init>	(Lorg/eclipse/team/internal/ccvs/core/util/MoveDeleteHook;Lorg/eclipse/core/resources/IFile;Lorg/eclipse/core/resources/team/IResourceTree;I)V
    //   99: aload 4
    //   101: bipush 70
    //   103: invokestatic 211	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   106: invokevirtual 216	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:performMoveDelete	(Lorg/eclipse/team/internal/ccvs/core/ICVSRunnable;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   109: goto +38 -> 147
    //   112: astore 5
    //   114: aload_1
    //   115: aload 5
    //   117: invokevirtual 207	org/eclipse/team/internal/ccvs/core/CVSException:getStatus	()Lorg/eclipse/core/runtime/IStatus;
    //   120: invokeinterface 235 2 0
    //   125: aload 4
    //   127: invokeinterface 236 1 0
    //   132: goto +22 -> 154
    //   135: astore 6
    //   137: aload 4
    //   139: invokeinterface 236 1 0
    //   144: aload 6
    //   146: athrow
    //   147: aload 4
    //   149: invokeinterface 236 1 0
    //   154: iconst_1
    //   155: ireturn
    // Line number table:
    //   Java source line #40	-> byte code offset #0
    //   Java source line #43	-> byte code offset #10
    //   Java source line #71	-> byte code offset #19
    //   Java source line #43	-> byte code offset #26
    //   Java source line #46	-> byte code offset #28
    //   Java source line #47	-> byte code offset #34
    //   Java source line #71	-> byte code offset #44
    //   Java source line #47	-> byte code offset #51
    //   Java source line #50	-> byte code offset #53
    //   Java source line #71	-> byte code offset #76
    //   Java source line #53	-> byte code offset #83
    //   Java source line #57	-> byte code offset #85
    //   Java source line #67	-> byte code offset #99
    //   Java source line #57	-> byte code offset #106
    //   Java source line #68	-> byte code offset #112
    //   Java source line #69	-> byte code offset #114
    //   Java source line #71	-> byte code offset #125
    //   Java source line #70	-> byte code offset #135
    //   Java source line #71	-> byte code offset #137
    //   Java source line #72	-> byte code offset #144
    //   Java source line #71	-> byte code offset #147
    //   Java source line #73	-> byte code offset #154
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	156	0	this	MoveDeleteHook
    //   0	156	1	tree	IResourceTree
    //   0	156	2	file	IFile
    //   0	156	3	updateFlags	int
    //   0	156	4	monitor	IProgressMonitor
    //   32	3	5	cvsFile	org.eclipse.team.internal.ccvs.core.ICVSFile
    //   53	1	5	cvsFile	org.eclipse.team.internal.ccvs.core.ICVSFile
    //   85	1	5	cvsFile	org.eclipse.team.internal.ccvs.core.ICVSFile
    //   112	4	5	e	CVSException
    //   135	10	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	19	112	org/eclipse/team/internal/ccvs/core/CVSException
    //   28	44	112	org/eclipse/team/internal/ccvs/core/CVSException
    //   53	76	112	org/eclipse/team/internal/ccvs/core/CVSException
    //   85	109	112	org/eclipse/team/internal/ccvs/core/CVSException
    //   0	19	135	finally
    //   28	44	135	finally
    //   53	76	135	finally
    //   85	125	135	finally
  }
  
  /* Error */
  public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_2
    //   1: invokeinterface 233 1 0
    //   6: ifeq +5 -> 11
    //   9: iconst_0
    //   10: ireturn
    //   11: aload 4
    //   13: aconst_null
    //   14: bipush 100
    //   16: invokeinterface 237 3 0
    //   21: aload_2
    //   22: invokestatic 213	org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot:getCVSFolderFor	(Lorg/eclipse/core/resources/IContainer;)Lorg/eclipse/team/internal/ccvs/core/ICVSFolder;
    //   25: astore 5
    //   27: aload 5
    //   29: invokeinterface 241 1 0
    //   34: ifeq +59 -> 93
    //   37: aload_0
    //   38: iconst_1
    //   39: anewarray 95	org/eclipse/core/resources/IFolder
    //   42: dup
    //   43: iconst_0
    //   44: aload_2
    //   45: aastore
    //   46: aload_1
    //   47: aload 4
    //   49: bipush 30
    //   51: invokestatic 211	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   54: invokespecial 220	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook:ensureCheckedOut	([Lorg/eclipse/core/resources/IFolder;Lorg/eclipse/core/resources/team/IResourceTree;Lorg/eclipse/core/runtime/IProgressMonitor;)Z
    //   57: ifeq +36 -> 93
    //   60: invokestatic 214	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   63: new 113	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$2
    //   66: dup
    //   67: aload_0
    //   68: aload_2
    //   69: aload_1
    //   70: iload_3
    //   71: invokespecial 222	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$2:<init>	(Lorg/eclipse/team/internal/ccvs/core/util/MoveDeleteHook;Lorg/eclipse/core/resources/IFolder;Lorg/eclipse/core/resources/team/IResourceTree;I)V
    //   74: aload 4
    //   76: bipush 70
    //   78: invokestatic 211	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   81: invokevirtual 216	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:performMoveDelete	(Lorg/eclipse/team/internal/ccvs/core/ICVSRunnable;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   84: aload 4
    //   86: invokeinterface 236 1 0
    //   91: iconst_1
    //   92: ireturn
    //   93: aload 5
    //   95: invokeinterface 242 1 0
    //   100: ifne +61 -> 161
    //   103: invokestatic 214	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   106: aload 5
    //   108: invokeinterface 244 1 0
    //   113: aload 4
    //   115: bipush 70
    //   117: invokestatic 211	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   120: invokevirtual 215	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:prepareForDeletion	(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   123: goto +38 -> 161
    //   126: astore 5
    //   128: aload_1
    //   129: aload 5
    //   131: invokevirtual 207	org/eclipse/team/internal/ccvs/core/CVSException:getStatus	()Lorg/eclipse/core/runtime/IStatus;
    //   134: invokeinterface 235 2 0
    //   139: aload 4
    //   141: invokeinterface 236 1 0
    //   146: goto +22 -> 168
    //   149: astore 6
    //   151: aload 4
    //   153: invokeinterface 236 1 0
    //   158: aload 6
    //   160: athrow
    //   161: aload 4
    //   163: invokeinterface 236 1 0
    //   168: iconst_0
    //   169: ireturn
    // Line number table:
    //   Java source line #86	-> byte code offset #0
    //   Java source line #87	-> byte code offset #11
    //   Java source line #89	-> byte code offset #21
    //   Java source line #90	-> byte code offset #27
    //   Java source line #91	-> byte code offset #60
    //   Java source line #101	-> byte code offset #74
    //   Java source line #91	-> byte code offset #81
    //   Java source line #109	-> byte code offset #84
    //   Java source line #102	-> byte code offset #91
    //   Java source line #103	-> byte code offset #93
    //   Java source line #104	-> byte code offset #103
    //   Java source line #106	-> byte code offset #126
    //   Java source line #107	-> byte code offset #128
    //   Java source line #109	-> byte code offset #139
    //   Java source line #108	-> byte code offset #149
    //   Java source line #109	-> byte code offset #151
    //   Java source line #110	-> byte code offset #158
    //   Java source line #109	-> byte code offset #161
    //   Java source line #111	-> byte code offset #168
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	170	0	this	MoveDeleteHook
    //   0	170	1	tree	IResourceTree
    //   0	170	2	folder	IFolder
    //   0	170	3	updateFlags	int
    //   0	170	4	monitor	IProgressMonitor
    //   25	3	5	cvsFolder	ICVSFolder
    //   93	14	5	cvsFolder	ICVSFolder
    //   126	4	5	e	CVSException
    //   149	10	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   21	84	126	org/eclipse/team/internal/ccvs/core/CVSException
    //   93	123	126	org/eclipse/team/internal/ccvs/core/CVSException
    //   21	84	149	finally
    //   93	139	149	finally
  }
  
  public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor)
  {
    try
    {
      EclipseSynchronizer.getInstance().prepareForDeletion(project, monitor);
    }
    catch (CVSException e)
    {
      CVSProviderPlugin.log(e);
    }
    return false;
  }
  
  /* Error */
  public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload 5
    //   2: aconst_null
    //   3: bipush 100
    //   5: invokeinterface 237 3 0
    //   10: aload_3
    //   11: invokeinterface 229 1 0
    //   16: ifeq +20 -> 36
    //   19: iconst_2
    //   20: anewarray 94	org/eclipse/core/resources/IFile
    //   23: dup
    //   24: iconst_0
    //   25: aload_2
    //   26: aastore
    //   27: dup
    //   28: iconst_1
    //   29: aload_3
    //   30: aastore
    //   31: astore 6
    //   33: goto +13 -> 46
    //   36: iconst_1
    //   37: anewarray 94	org/eclipse/core/resources/IFile
    //   40: dup
    //   41: iconst_0
    //   42: aload_2
    //   43: aastore
    //   44: astore 6
    //   46: aload_0
    //   47: aload_1
    //   48: aload 6
    //   50: aload 5
    //   52: bipush 30
    //   54: invokestatic 211	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   57: invokevirtual 219	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook:checkOutFiles	(Lorg/eclipse/core/resources/team/IResourceTree;[Lorg/eclipse/core/resources/IFile;Lorg/eclipse/core/runtime/IProgressMonitor;)Z
    //   60: ifne +12 -> 72
    //   63: aload 5
    //   65: invokeinterface 236 1 0
    //   70: iconst_1
    //   71: ireturn
    //   72: invokestatic 214	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   75: new 114	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3
    //   78: dup
    //   79: aload_0
    //   80: aload_2
    //   81: aload_3
    //   82: aload_1
    //   83: iload 4
    //   85: invokespecial 223	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:<init>	(Lorg/eclipse/team/internal/ccvs/core/util/MoveDeleteHook;Lorg/eclipse/core/resources/IFile;Lorg/eclipse/core/resources/IFile;Lorg/eclipse/core/resources/team/IResourceTree;I)V
    //   88: aload 5
    //   90: bipush 70
    //   92: invokestatic 211	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   95: invokevirtual 216	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:performMoveDelete	(Lorg/eclipse/team/internal/ccvs/core/ICVSRunnable;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   98: goto +38 -> 136
    //   101: astore 6
    //   103: aload_1
    //   104: aload 6
    //   106: invokevirtual 207	org/eclipse/team/internal/ccvs/core/CVSException:getStatus	()Lorg/eclipse/core/runtime/IStatus;
    //   109: invokeinterface 235 2 0
    //   114: aload 5
    //   116: invokeinterface 236 1 0
    //   121: goto +22 -> 143
    //   124: astore 7
    //   126: aload 5
    //   128: invokeinterface 236 1 0
    //   133: aload 7
    //   135: athrow
    //   136: aload 5
    //   138: invokeinterface 236 1 0
    //   143: iconst_1
    //   144: ireturn
    // Line number table:
    //   Java source line #146	-> byte code offset #0
    //   Java source line #150	-> byte code offset #10
    //   Java source line #151	-> byte code offset #19
    //   Java source line #153	-> byte code offset #36
    //   Java source line #155	-> byte code offset #46
    //   Java source line #180	-> byte code offset #63
    //   Java source line #158	-> byte code offset #70
    //   Java source line #162	-> byte code offset #72
    //   Java source line #176	-> byte code offset #88
    //   Java source line #162	-> byte code offset #95
    //   Java source line #177	-> byte code offset #101
    //   Java source line #178	-> byte code offset #103
    //   Java source line #180	-> byte code offset #114
    //   Java source line #179	-> byte code offset #124
    //   Java source line #180	-> byte code offset #126
    //   Java source line #181	-> byte code offset #133
    //   Java source line #180	-> byte code offset #136
    //   Java source line #182	-> byte code offset #143
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	145	0	this	MoveDeleteHook
    //   0	145	1	tree	IResourceTree
    //   0	145	2	source	IFile
    //   0	145	3	destination	IFile
    //   0	145	4	updateFlags	int
    //   0	145	5	monitor	IProgressMonitor
    //   31	3	6	filesToCheckOut	IFile[]
    //   44	5	6	filesToCheckOut	IFile[]
    //   72	1	6	filesToCheckOut	IFile[]
    //   101	4	6	e	CVSException
    //   124	10	7	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	63	101	org/eclipse/team/internal/ccvs/core/CVSException
    //   72	98	101	org/eclipse/team/internal/ccvs/core/CVSException
    //   0	63	124	finally
    //   72	114	124	finally
  }
  
  public boolean moveFolder(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor)
  {
    monitor.beginTask(null, 100);
    try
    {
      ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(source);
      if (cvsFolder.isManaged())
      {
        if (!ensureCheckedOut(new IFolder[] { source, destination }, tree, Policy.subMonitorFor(monitor, 20))) {}
        for (;;)
        {
          return true;
          EclipseSynchronizer.getInstance().performMoveDelete(new ICVSRunnable()
          {
            private final IFolder val$source;
            private final IFolder val$destination;
            private final IResourceTree val$tree;
            private final int val$updateFlags;
            
            public void run(IProgressMonitor monitor)
              throws CVSException
            {
              EclipseSynchronizer.getInstance().prepareForDeletion(val$source, Policy.subMonitorFor(monitor, 20));
              if (val$destination.exists()) {
                EclipseSynchronizer.getInstance().prepareForDeletion(val$destination, Policy.subMonitorFor(monitor, 20));
              }
              val$tree.standardMoveFolder(val$source, val$destination, val$updateFlags, Policy.subMonitorFor(monitor, 30));
              purgeCVSFolders(val$destination, Policy.subMonitorFor(monitor, 20));
              EclipseSynchronizer.getInstance().postMove(val$destination);
            }
            
            private void purgeCVSFolders(IFolder destination, IProgressMonitor monitor)
              throws CVSException
            {
              try
              {
                destination.accept(new MoveDeleteHook.5(this, val$tree, val$updateFlags, monitor), 
                
                  2, 2);
              }
              catch (CoreException e)
              {
                throw CVSException.wrapException(e);
              }
            }
          }, Policy.subMonitorFor(monitor, 60));
        }
      }
      if (!cvsFolder.isIgnored()) {
        EclipseSynchronizer.getInstance().prepareForDeletion(cvsFolder.getIResource(), Policy.subMonitorFor(monitor, 60));
      }
    }
    catch (CVSException e)
    {
      tree.failed(e.getStatus());
      return true;
    }
    finally
    {
      monitor.done();
    }
    monitor.done();
    
    return false;
  }
  
  public boolean moveProject(IResourceTree tree, IProject source, IProjectDescription description, int updateFlags, IProgressMonitor monitor)
  {
    try
    {
      EclipseSynchronizer.getInstance().prepareForDeletion(source, monitor);
    }
    catch (CVSException e)
    {
      CVSProviderPlugin.log(e);
    }
    return false;
  }
  
  boolean checkOutFiles(IResourceTree tree, IFile[] files, IProgressMonitor monitor)
  {
    IFileModificationValidator validator = getFileModificationValidator(files);
    if ((validator instanceof ICVSFileModificationValidator))
    {
      IStatus status = ((ICVSFileModificationValidator)validator).validateMoveDelete(files, monitor);
      if (status.isOK()) {
        return true;
      }
      tree.failed(status);
      return false;
    }
    return true;
  }
  
  private boolean ensureCheckedOut(IFolder[] folders, IResourceTree tree, IProgressMonitor monitor)
  {
    List readOnlyFiles = new ArrayList();
    try
    {
      for (int i = 0; i < folders.length; i++)
      {
        IFolder folder = folders[i];
        if (folder.exists()) {
          folder.accept(new IResourceVisitor()
          {
            private final List val$readOnlyFiles;
            
            public boolean visit(IResource resource)
              throws CoreException
            {
              if (resource.getType() == 1)
              {
                IFile file = (IFile)resource;
                if (file.isReadOnly()) {
                  val$readOnlyFiles.add(file);
                }
              }
              return true;
            }
          });
        }
      }
      if (readOnlyFiles.isEmpty()) {
        return true;
      }
      return checkOutFiles(tree, (IFile[])readOnlyFiles.toArray(new IFile[readOnlyFiles.size()]), monitor);
    }
    catch (CoreException e)
    {
      tree.failed(e.getStatus());
    }
    return false;
  }
  
  private FileModificationValidator getFileModificationValidator(IFile[] files)
  {
    return getProvider(files).getFileModificationValidator2();
  }
  
  private CVSTeamProvider getProvider(IFile[] files)
  {
    CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(files[0].getProject(), CVSProviderPlugin.getTypeId());
    return provider;
  }
}

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

import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSResource;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.Policy;

class PrepareForReplaceVisitor$1
  implements ICVSRunnable
{
  final PrepareForReplaceVisitor this$0;
  private final ICVSResource[] val$resources;
  private final String val$oneArgMessage;
  
  PrepareForReplaceVisitor$1(PrepareForReplaceVisitor paramPrepareForReplaceVisitor, ICVSResource[] paramArrayOfICVSResource, String paramString)
  {
    this$0 = paramPrepareForReplaceVisitor;val$resources = paramArrayOfICVSResource;val$oneArgMessage = paramString;
  }
  
  public void run(IProgressMonitor pm)
    throws CVSException
  {
    PrepareForReplaceVisitor.access$0(this$0, Policy.infiniteSubMonitorFor(pm, 100));
    PrepareForReplaceVisitor.access$1(this$0).beginTask(null, 512);
    for (int i = 0; i < val$resources.length; i++)
    {
      if (val$oneArgMessage != null) {
        PrepareForReplaceVisitor.access$1(this$0).subTask(NLS.bind(val$oneArgMessage, new String[] { val$resources[i].getIResource().getFullPath().toString() }));
      }
      val$resources[i].accept(this$0);
    }
    PrepareForReplaceVisitor.access$1(this$0).done();
  }
}

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

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFileState;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
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.Status;
import org.eclipse.osgi.util.NLS;
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.CVSTag;
import org.eclipse.team.internal.ccvs.core.ICVSFile;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
import org.eclipse.team.internal.ccvs.core.ICVSResource;
import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.client.ConsoleListeners;
import org.eclipse.team.internal.ccvs.core.client.Session;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;

public class PrepareForReplaceVisitor
  implements ICVSResourceVisitor
{
  private IProgressMonitor monitor;
  private int depth;
  private CVSTag tag;
  private Set deletedFiles;
  private Session session;
  
  public PrepareForReplaceVisitor(Session session, CVSTag tag)
  {
    this.tag = tag;
    this.session = session;
  }
  
  public void visitFile(ICVSFile file)
    throws CVSException
  {
    byte[] syncBytes = file.getSyncBytes();
    if (syncBytes == null)
    {
      if (CVSProviderPlugin.getPlugin().isReplaceUnmanaged())
      {
        file.delete();
        deletedFiles.add(file);
      }
    }
    else if (ResourceSyncInfo.isAddition(syncBytes))
    {
      file.delete();
      deletedFiles.add(file);
      file.unmanage(null);
    }
    else if (ResourceSyncInfo.isDeletion(syncBytes))
    {
      if (!shouldDeleteModifications(file))
      {
        IFile res = (IFile)file.getIResource();
        try
        {
          IFileState[] states = res.getHistory(null);
          if (states.length > 0)
          {
            restoreParentDirectory(file);
            
            res.create(states[0].getContents(), true, null);
          }
          else
          {
            IStatus status = new Status(4, "org.eclipse.team.cvs.core", 
              CVSMessages.PrepareForReplaceVisitor_DeletedFileWithoutHistoryCannotBeRestoredWhileRevertToBase);
            CVSProviderPlugin.log(status);
            ConsoleListeners.getInstance().errorLineReceived(session, 
              NLS.bind(CVSMessages.PrepareForReplaceVisitor_FileCannotBeReplacedWithBase, 
              res.getName()), 
              status);
          }
        }
        catch (CoreException e)
        {
          CVSProviderPlugin.log(e);
        }
      }
      else
      {
        file.unmanage(null);
      }
    }
    else if ((file.isModified(null)) && (shouldDeleteModifications(file)))
    {
      file.delete();
      deletedFiles.add(file);
      
      file.unmanage(null);
    }
    monitor.worked(1);
  }
  
  private void restoreParentDirectory(ICVSFile file)
    throws CVSException
  {
    List parents = new ArrayList();
    ICVSFolder parent = file.getParent();
    while (!parent.getIResource().exists())
    {
      parents.add(parent);
      parent = parent.getParent();
    }
    for (int i = parents.size() - 1; i > -1; i--) {
      ((ICVSFolder)parents.get(i)).mkdir();
    }
  }
  
  private boolean shouldDeleteModifications(ICVSFile file)
  {
    return ((tag == null) && (!isStickyRevision(file))) || ((tag != null) && (!tag.getName().equals("BASE")));
  }
  
  private boolean isStickyRevision(ICVSFile file)
  {
    try
    {
      ResourceSyncInfo info = file.getSyncInfo();
      if (info != null)
      {
        CVSTag tag = info.getTag();
        if (tag != null) {
          return tag.getName().equals(info.getRevision());
        }
      }
    }
    catch (CVSException e)
    {
      CVSProviderPlugin.log(e);
    }
    return false;
  }
  
  public void visitFolder(ICVSFolder folder)
    throws CVSException
  {
    if (!folder.isCVSFolder())
    {
      if (CVSProviderPlugin.getPlugin().isReplaceUnmanaged())
      {
        folder.acceptChildren(this);
        folder.delete();
      }
    }
    else
    {
      if (depth == 2)
      {
        folder.acceptChildren(this);
      }
      else if (depth == 1)
      {
        ICVSResource[] files = folder.members(1);
        for (int i = 0; i < files.length; i++) {
          files[i].accept(this);
        }
      }
      ICVSResource[] ignoredFiles = folder.members(5);
      for (int i = 0; i < ignoredFiles.length; i++)
      {
        ICVSResource cvsResource = ignoredFiles[i];
        if (cvsResource.getName().startsWith(".#")) {
          cvsResource.delete();
        }
      }
    }
    monitor.worked(1);
  }
  
  public void visitResources(IProject project, ICVSResource[] resources, String oneArgMessage, int depth, IProgressMonitor pm)
    throws CVSException
  {
    this.depth = depth;
    deletedFiles = new HashSet();
    CVSWorkspaceRoot.getCVSFolderFor(project).run(new ICVSRunnable()
    {
      private final ICVSResource[] val$resources;
      private final String val$oneArgMessage;
      
      public void run(IProgressMonitor pm)
        throws CVSException
      {
        monitor = Policy.infiniteSubMonitorFor(pm, 100);
        monitor.beginTask(null, 512);
        for (int i = 0; i < val$resources.length; i++)
        {
          if (val$oneArgMessage != null) {
            monitor.subTask(NLS.bind(val$oneArgMessage, new String[] { val$resources[i].getIResource().getFullPath().toString() }));
          }
          val$resources[i].accept(PrepareForReplaceVisitor.this);
        }
        monitor.done();
      }
    }, pm);
  }
  
  public Set getDeletedFiles()
  {
    return Collections.unmodifiableSet(deletedFiles);
  }
}

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

import org.eclipse.core.resources.IResource;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;

class ResourceStateChangeListeners$1
  extends ResourceStateChangeListeners.Notification
{
  final ResourceStateChangeListeners this$0;
  private final IResource[] val$resources;
  
  ResourceStateChangeListeners$1(ResourceStateChangeListeners paramResourceStateChangeListeners, IResource[] paramArrayOfIResource)
  {
    super(paramResourceStateChangeListeners, null);this$0 = paramResourceStateChangeListeners;val$resources = paramArrayOfIResource;
  }
  
  public void notify(IResourceStateChangeListener listener)
  {
    listener.resourceSyncInfoChanged(val$resources);
  }
}

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

import org.eclipse.core.resources.IResource;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;

class ResourceStateChangeListeners$2
  extends ResourceStateChangeListeners.Notification
{
  final ResourceStateChangeListeners this$0;
  private final IResource[] val$resources;
  
  ResourceStateChangeListeners$2(ResourceStateChangeListeners paramResourceStateChangeListeners, IResource[] paramArrayOfIResource)
  {
    super(paramResourceStateChangeListeners, null);this$0 = paramResourceStateChangeListeners;val$resources = paramArrayOfIResource;
  }
  
  public void notify(IResourceStateChangeListener listener)
  {
    listener.externalSyncInfoChange(val$resources);
  }
}

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

import org.eclipse.core.resources.IResource;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;

class ResourceStateChangeListeners$3
  extends ResourceStateChangeListeners.Notification
{
  final ResourceStateChangeListeners this$0;
  private final IResource[] val$resources;
  
  ResourceStateChangeListeners$3(ResourceStateChangeListeners paramResourceStateChangeListeners, IResource[] paramArrayOfIResource)
  {
    super(paramResourceStateChangeListeners, null);this$0 = paramResourceStateChangeListeners;val$resources = paramArrayOfIResource;
  }
  
  public void notify(IResourceStateChangeListener listener)
  {
    listener.resourceModified(val$resources);
  }
}

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

import org.eclipse.core.resources.IProject;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;

class ResourceStateChangeListeners$4
  extends ResourceStateChangeListeners.Notification
{
  final ResourceStateChangeListeners this$0;
  private final IProject val$project;
  
  ResourceStateChangeListeners$4(ResourceStateChangeListeners paramResourceStateChangeListeners, IProject paramIProject)
  {
    super(paramResourceStateChangeListeners, null);this$0 = paramResourceStateChangeListeners;val$project = paramIProject;
  }
  
  public void notify(IResourceStateChangeListener listener)
  {
    listener.projectConfigured(val$project);
  }
}

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

import org.eclipse.core.resources.IProject;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;

class ResourceStateChangeListeners$5
  extends ResourceStateChangeListeners.Notification
{
  final ResourceStateChangeListeners this$0;
  private final IProject val$project;
  
  ResourceStateChangeListeners$5(ResourceStateChangeListeners paramResourceStateChangeListeners, IProject paramIProject)
  {
    super(paramResourceStateChangeListeners, null);this$0 = paramResourceStateChangeListeners;val$project = paramIProject;
  }
  
  public void notify(IResourceStateChangeListener listener)
  {
    listener.projectDeconfigured(val$project);
  }
}

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

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.Platform;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;

abstract class ResourceStateChangeListeners$Notification
  implements ISafeRunnable
{
  private IResourceStateChangeListener listener;
  final ResourceStateChangeListeners this$0;
  
  private ResourceStateChangeListeners$Notification(ResourceStateChangeListeners paramResourceStateChangeListeners)
  {
    this$0 = paramResourceStateChangeListeners;
  }
  
  ResourceStateChangeListeners$Notification(ResourceStateChangeListeners paramResourceStateChangeListeners, Notification paramNotification)
  {
    this(paramResourceStateChangeListeners);
  }
  
  public void run(IResourceStateChangeListener listener)
  {
    this.listener = listener;
    Platform.run(this);
  }
  
  public void run()
    throws Exception
  {
    notify(listener);
  }
  
  public void handleException(Throwable exception) {}
  
  protected abstract void notify(IResourceStateChangeListener paramIResourceStateChangeListener);
}

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

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

class ResponsiveSocketFactory$1
  implements Runnable
{
  final ResponsiveSocketFactory this$0;
  private final String val$host;
  private final int val$port;
  private final Socket[] val$socket;
  private final Exception[] val$exception;
  
  ResponsiveSocketFactory$1(ResponsiveSocketFactory paramResponsiveSocketFactory, String paramString, int paramInt, Socket[] paramArrayOfSocket, Exception[] paramArrayOfException)
  {
    this$0 = paramResponsiveSocketFactory;val$host = paramString;val$port = paramInt;val$socket = paramArrayOfSocket;val$exception = paramArra
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