org.eclipse.team.core_3.6.0.I20110525-0800

final IChangeSetChangeListener val$listener;
  private final ChangeSet val$changeSet;
  private final IPath[] val$allAffectedResources;
  
  ChangeSetManager$5(ChangeSetManager paramChangeSetManager, IChangeSetChangeListener paramIChangeSetChangeListener, ChangeSet paramChangeSet, IPath[] paramArrayOfIPath)
  {
    this$0 = paramChangeSetManager;val$listener = paramIChangeSetChangeListener;val$changeSet = paramChangeSet;val$allAffectedResources = paramArrayOfIPath;
  }
  
  public void handleException(Throwable exception) {}
  
  public void run()
    throws Exception
  {
    val$listener.resourcesChanged(val$changeSet, val$allAffectedResources);
  }
}

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

import java.util.Set;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;

public abstract class ChangeSetManager
{
  private ListenerList listeners = new ListenerList(1);
  private Set sets;
  private boolean initializing;
  
  protected Object[] getListeners()
  {
    return listeners.getListeners();
  }
  
  protected void fireNameChangedEvent(ChangeSet set)
  {
    if (initializing) {
      return;
    }
    if (contains(set))
    {
      Object[] listeners = getListeners();
      for (int i = 0; i < listeners.length; i++)
      {
        IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
        SafeRunner.run(new ISafeRunnable()
        {
          private final IChangeSetChangeListener val$listener;
          private final ChangeSet val$set;
          
          public void handleException(Throwable exception) {}
          
          public void run()
            throws Exception
          {
            val$listener.nameChanged(val$set);
          }
        });
      }
    }
  }
  
  protected void fireDefaultChangedEvent(ChangeSet oldSet, ChangeSet defaultSet)
  {
    if (initializing) {
      return;
    }
    Object[] listeners = getListeners();
    for (int i = 0; i < listeners.length; i++)
    {
      IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
      SafeRunner.run(new ISafeRunnable()
      {
        private final IChangeSetChangeListener val$listener;
        private final ChangeSet val$oldSet;
        private final ChangeSet val$defaultSet;
        
        public void handleException(Throwable exception) {}
        
        public void run()
          throws Exception
        {
          val$listener.defaultSetChanged(val$oldSet, val$defaultSet);
        }
      });
    }
  }
  
  public void add(ChangeSet set)
  {
    if (!contains(set))
    {
      internalGetSets().add(set);
      handleSetAdded(set);
    }
  }
  
  protected void handleSetAdded(ChangeSet set)
  {
    if (initializing) {
      return;
    }
    Object[] listeners = getListeners();
    for (int i = 0; i < listeners.length; i++)
    {
      IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
      SafeRunner.run(new ISafeRunnable()
      {
        private final IChangeSetChangeListener val$listener;
        private final ChangeSet val$set;
        
        public void handleException(Throwable exception) {}
        
        public void run()
          throws Exception
        {
          val$listener.setAdded(val$set);
        }
      });
    }
  }
  
  public void remove(ChangeSet set)
  {
    if (contains(set))
    {
      internalGetSets().remove(set);
      handleSetRemoved(set);
    }
  }
  
  protected void handleSetRemoved(ChangeSet set)
  {
    if (initializing) {
      return;
    }
    Object[] listeners = getListeners();
    for (int i = 0; i < listeners.length; i++)
    {
      IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
      SafeRunner.run(new ISafeRunnable()
      {
        private final IChangeSetChangeListener val$listener;
        private final ChangeSet val$set;
        
        public void handleException(Throwable exception) {}
        
        public void run()
          throws Exception
        {
          val$listener.setRemoved(val$set);
        }
      });
    }
  }
  
  public boolean contains(ChangeSet set)
  {
    return internalGetSets().contains(set);
  }
  
  public void addListener(IChangeSetChangeListener listener)
  {
    listeners.add(listener);
  }
  
  public void removeListener(IChangeSetChangeListener listener)
  {
    listeners.remove(listener);
  }
  
  public ChangeSet[] getSets()
  {
    Set sets = internalGetSets();
    return (ChangeSet[])sets.toArray(new ChangeSet[sets.size()]);
  }
  
  public void dispose() {}
  
  protected void fireResourcesChangedEvent(ChangeSet changeSet, IPath[] allAffectedResources)
  {
    if (initializing) {
      return;
    }
    Object[] listeners = getListeners();
    for (int i = 0; i < listeners.length; i++)
    {
      IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
      SafeRunner.run(new ISafeRunnable()
      {
        private final IChangeSetChangeListener val$listener;
        private final ChangeSet val$changeSet;
        private final IPath[] val$allAffectedResources;
        
        public void handleException(Throwable exception) {}
        
        public void run()
          throws Exception
        {
          val$listener.resourcesChanged(val$changeSet, val$allAffectedResources);
        }
      });
    }
  }
  
  /* Error */
  private Set internalGetSets()
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 116	org/eclipse/team/internal/core/subscribers/ChangeSetManager:sets	Ljava/util/Set;
    //   4: ifnonnull +42 -> 46
    //   7: aload_0
    //   8: new 58	java/util/HashSet
    //   11: dup
    //   12: invokespecial 120	java/util/HashSet:<init>	()V
    //   15: invokestatic 119	java/util/Collections:synchronizedSet	(Ljava/util/Set;)Ljava/util/Set;
    //   18: putfield 116	org/eclipse/team/internal/core/subscribers/ChangeSetManager:sets	Ljava/util/Set;
    //   21: aload_0
    //   22: iconst_1
    //   23: putfield 115	org/eclipse/team/internal/core/subscribers/ChangeSetManager:initializing	Z
    //   26: aload_0
    //   27: invokevirtual 126	org/eclipse/team/internal/core/subscribers/ChangeSetManager:initializeSets	()V
    //   30: goto +11 -> 41
    //   33: astore_1
    //   34: aload_0
    //   35: iconst_0
    //   36: putfield 115	org/eclipse/team/internal/core/subscribers/ChangeSetManager:initializing	Z
    //   39: aload_1
    //   40: athrow
    //   41: aload_0
    //   42: iconst_0
    //   43: putfield 115	org/eclipse/team/internal/core/subscribers/ChangeSetManager:initializing	Z
    //   46: aload_0
    //   47: getfield 116	org/eclipse/team/internal/core/subscribers/ChangeSetManager:sets	Ljava/util/Set;
    //   50: areturn
    // Line number table:
    //   Java source line #209	-> byte code offset #0
    //   Java source line #210	-> byte code offset #7
    //   Java source line #212	-> byte code offset #21
    //   Java source line #213	-> byte code offset #26
    //   Java source line #214	-> byte code offset #33
    //   Java source line #215	-> byte code offset #34
    //   Java source line #216	-> byte code offset #39
    //   Java source line #215	-> byte code offset #41
    //   Java source line #218	-> byte code offset #46
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	51	0	this	ChangeSetManager
    //   33	7	1	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   21	33	33	finally
  }
  
  protected abstract void initializeSets();
  
  public boolean isInitialized()
  {
    return sets != null;
  }
}

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

import java.util.Date;
import org.eclipse.core.resources.IResource;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.SyncInfoTree;

public abstract class CheckedInChangeSet
  extends ChangeSet
{
  private final SyncInfoTree set = new SyncInfoTree();
  
  public abstract String getAuthor();
  
  public abstract Date getDate();
  
  public SyncInfoTree getSyncInfoSet()
  {
    return set;
  }
  
  public IResource[] getResources()
  {
    return set.getResources();
  }
  
  public boolean isEmpty()
  {
    return set.isEmpty();
  }
  
  public boolean contains(IResource local)
  {
    return set.getSyncInfo(local) != null;
  }
  
  public void add(SyncInfo info)
  {
    if (isValidChange(info)) {
      set.add(info);
    }
  }
  
  protected boolean isValidChange(SyncInfo info)
  {
    return info != null;
  }
  
  /* Error */
  public void add(SyncInfo[] infos)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 77	org/eclipse/team/internal/core/subscribers/CheckedInChangeSet:set	Lorg/eclipse/team/core/synchronize/SyncInfoTree;
    //   4: invokevirtual 80	org/eclipse/team/core/synchronize/SyncInfoTree:beginInput	()V
    //   7: iconst_0
    //   8: istore_2
    //   9: goto +15 -> 24
    //   12: aload_1
    //   13: iload_2
    //   14: aaload
    //   15: astore_3
    //   16: aload_0
    //   17: aload_3
    //   18: invokevirtual 92	org/eclipse/team/internal/core/subscribers/CheckedInChangeSet:add	(Lorg/eclipse/team/core/synchronize/SyncInfo;)V
    //   21: iinc 2 1
    //   24: iload_2
    //   25: aload_1
    //   26: arraylength
    //   27: if_icmplt -15 -> 12
    //   30: goto +16 -> 46
    //   33: astore 4
    //   35: aload_0
    //   36: getfield 77	org/eclipse/team/internal/core/subscribers/CheckedInChangeSet:set	Lorg/eclipse/team/core/synchronize/SyncInfoTree;
    //   39: aconst_null
    //   40: invokevirtual 85	org/eclipse/team/core/synchronize/SyncInfoTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   43: aload 4
    //   45: athrow
    //   46: aload_0
    //   47: getfield 77	org/eclipse/team/internal/core/subscribers/CheckedInChangeSet:set	Lorg/eclipse/team/core/synchronize/SyncInfoTree;
    //   50: aconst_null
    //   51: invokevirtual 85	org/eclipse/team/core/synchronize/SyncInfoTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   54: return
    // Line number table:
    //   Java source line #101	-> byte code offset #0
    //   Java source line #102	-> byte code offset #7
    //   Java source line #103	-> byte code offset #12
    //   Java source line #104	-> byte code offset #16
    //   Java source line #102	-> byte code offset #21
    //   Java source line #106	-> byte code offset #33
    //   Java source line #107	-> byte code offset #35
    //   Java source line #108	-> byte code offset #43
    //   Java source line #107	-> byte code offset #46
    //   Java source line #109	-> byte code offset #54
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	55	0	this	CheckedInChangeSet
    //   0	55	1	infos	SyncInfo[]
    //   8	17	2	i	int
    //   15	3	3	info	SyncInfo
    //   33	11	4	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	33	33	finally
  }
  
  public void remove(IResource resource)
  {
    if (contains(resource)) {
      set.remove(resource);
    }
  }
  
  public void remove(IResource[] resources)
  {
    for (int i = 0; i < resources.length; i++)
    {
      IResource resource = resources[i];
      remove(resource);
    }
  }
  
  public void rootRemoved(IResource resource, int depth)
  {
    SyncInfo[] infos = set.getSyncInfos(resource, depth);
    if (infos.length > 0)
    {
      IResource[] resources = new IResource[infos.length];
      for (int i = 0; i < resources.length; i++) {
        resources[i] = infos[i].getLocal();
      }
      set.removeAll(resources);
    }
  }
  
  public boolean containsChildren(IResource resource, int depth)
  {
    return set.getSyncInfos(resource, depth).length > 0;
  }
}

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

import java.io.BufferedInputStream;
import java.io.InputStream;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.variants.IResourceVariant;

public class ContentComparator
{
  private boolean ignoreWhitespace = false;
  
  public ContentComparator(boolean ignoreWhitespace)
  {
    this.ignoreWhitespace = ignoreWhitespace;
  }
  
  /* Error */
  public boolean compare(Object e1, Object e2, IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore 4
    //   3: aconst_null
    //   4: astore 5
    //   6: aload_3
    //   7: aconst_null
    //   8: bipush 100
    //   10: invokeinterface 119 3 0
    //   15: aload_0
    //   16: aload_1
    //   17: aload_3
    //   18: bipush 50
    //   20: invokestatic 110	org/eclipse/team/internal/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   23: invokespecial 115	org/eclipse/team/internal/core/subscribers/ContentComparator:getContents	(Ljava/lang/Object;Lorg/eclipse/core/runtime/IProgressMonitor;)Ljava/io/InputStream;
    //   26: astore 4
    //   28: aload_0
    //   29: aload_2
    //   30: aload_3
    //   31: bipush 50
    //   33: invokestatic 110	org/eclipse/team/internal/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   36: invokespecial 115	org/eclipse/team/internal/core/subscribers/ContentComparator:getContents	(Ljava/lang/Object;Lorg/eclipse/core/runtime/IProgressMonitor;)Ljava/io/InputStream;
    //   39: astore 5
    //   41: aload_0
    //   42: aload 4
    //   44: aload 5
    //   46: aload_0
    //   47: invokevirtual 112	org/eclipse/team/internal/core/subscribers/ContentComparator:shouldIgnoreWhitespace	()Z
    //   50: invokespecial 114	org/eclipse/team/internal/core/subscribers/ContentComparator:contentsEqual	(Ljava/io/InputStream;Ljava/io/InputStream;Z)Z
    //   53: istore 8
    //   55: aload 4
    //   57: ifnull +26 -> 83
    //   60: aload 4
    //   62: invokevirtual 106	java/io/InputStream:close	()V
    //   65: goto +18 -> 83
    //   68: astore 9
    //   70: aload 5
    //   72: ifnull +8 -> 80
    //   75: aload 5
    //   77: invokevirtual 106	java/io/InputStream:close	()V
    //   80: aload 9
    //   82: athrow
    //   83: aload 5
    //   85: ifnull +12 -> 97
    //   88: aload 5
    //   90: invokevirtual 106	java/io/InputStream:close	()V
    //   93: goto +4 -> 97
    //   96: pop
    //   97: aload_3
    //   98: invokeinterface 118 1 0
    //   103: iload 8
    //   105: ireturn
    //   106: astore 6
    //   108: aload 6
    //   110: invokestatic 111	org/eclipse/team/internal/core/TeamPlugin:log	(Lorg/eclipse/core/runtime/CoreException;)V
    //   113: aload 4
    //   115: ifnull +26 -> 141
    //   118: aload 4
    //   120: invokevirtual 106	java/io/InputStream:close	()V
    //   123: goto +18 -> 141
    //   126: astore 9
    //   128: aload 5
    //   130: ifnull +8 -> 138
    //   133: aload 5
    //   135: invokevirtual 106	java/io/InputStream:close	()V
    //   138: aload 9
    //   140: athrow
    //   141: aload 5
    //   143: ifnull +12 -> 155
    //   146: aload 5
    //   148: invokevirtual 106	java/io/InputStream:close	()V
    //   151: goto +4 -> 155
    //   154: pop
    //   155: aload_3
    //   156: invokeinterface 118 1 0
    //   161: iconst_0
    //   162: ireturn
    //   163: astore 7
    //   165: aload 4
    //   167: ifnull +26 -> 193
    //   170: aload 4
    //   172: invokevirtual 106	java/io/InputStream:close	()V
    //   175: goto +18 -> 193
    //   178: astore 9
    //   180: aload 5
    //   182: ifnull +8 -> 190
    //   185: aload 5
    //   187: invokevirtual 106	java/io/InputStream:close	()V
    //   190: aload 9
    //   192: athrow
    //   193: aload 5
    //   195: ifnull +12 -> 207
    //   198: aload 5
    //   200: invokevirtual 106	java/io/InputStream:close	()V
    //   203: goto +4 -> 207
    //   206: pop
    //   207: aload_3
    //   208: invokeinterface 118 1 0
    //   213: aload 7
    //   215: athrow
    // Line number table:
    //   Java source line #36	-> byte code offset #0
    //   Java source line #37	-> byte code offset #3
    //   Java source line #39	-> byte code offset #6
    //   Java source line #40	-> byte code offset #15
    //   Java source line #41	-> byte code offset #28
    //   Java source line #42	-> byte code offset #41
    //   Java source line #49	-> byte code offset #55
    //   Java source line #50	-> byte code offset #60
    //   Java source line #52	-> byte code offset #68
    //   Java source line #53	-> byte code offset #70
    //   Java source line #54	-> byte code offset #75
    //   Java source line #56	-> byte code offset #80
    //   Java source line #53	-> byte code offset #83
    //   Java source line #54	-> byte code offset #88
    //   Java source line #57	-> byte code offset #96
    //   Java source line #60	-> byte code offset #97
    //   Java source line #42	-> byte code offset #103
    //   Java source line #43	-> byte code offset #106
    //   Java source line #44	-> byte code offset #108
    //   Java source line #49	-> byte code offset #113
    //   Java source line #50	-> byte code offset #118
    //   Java source line #52	-> byte code offset #126
    //   Java source line #53	-> byte code offset #128
    //   Java source line #54	-> byte code offset #133
    //   Java source line #56	-> byte code offset #138
    //   Java source line #53	-> byte code offset #141
    //   Java source line #54	-> byte code offset #146
    //   Java source line #57	-> byte code offset #154
    //   Java source line #60	-> byte code offset #155
    //   Java source line #45	-> byte code offset #161
    //   Java source line #46	-> byte code offset #163
    //   Java source line #49	-> byte code offset #165
    //   Java source line #50	-> byte code offset #170
    //   Java source line #52	-> byte code offset #178
    //   Java source line #53	-> byte code offset #180
    //   Java source line #54	-> byte code offset #185
    //   Java source line #56	-> byte code offset #190
    //   Java source line #53	-> byte code offset #193
    //   Java source line #54	-> byte code offset #198
    //   Java source line #57	-> byte code offset #206
    //   Java source line #60	-> byte code offset #207
    //   Java source line #61	-> byte code offset #213
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	216	0	this	ContentComparator
    //   0	216	1	e1	Object
    //   0	216	2	e2	Object
    //   0	216	3	monitor	IProgressMonitor
    //   1	170	4	is1	InputStream
    //   4	195	5	is2	InputStream
    //   106	3	6	e	TeamException
    //   163	51	7	localObject1	Object
    //   53	51	8	bool	boolean
    //   68	13	9	localObject2	Object
    //   126	13	9	localObject3	Object
    //   178	13	9	localObject4	Object
    //   96	1	12	localIOException1	java.io.IOException
    //   154	1	13	localIOException2	java.io.IOException
    //   206	1	14	localIOException3	java.io.IOException
    // Exception table:
    //   from	to	target	type
    //   55	68	68	finally
    //   55	93	96	java/io/IOException
    //   6	55	106	org/eclipse/team/core/TeamException
    //   113	126	126	finally
    //   113	151	154	java/io/IOException
    //   6	55	163	finally
    //   106	113	163	finally
    //   165	178	178	finally
    //   165	203	206	java/io/IOException
  }
  
  protected boolean shouldIgnoreWhitespace()
  {
    return ignoreWhitespace;
  }
  
  /* Error */
  private boolean contentsEqual(InputStream is1, InputStream is2, boolean ignoreWhitespace)
  {
    // Byte code:
    //   0: aload_1
    //   1: aload_2
    //   2: if_acmpne +41 -> 43
    //   5: aload_1
    //   6: ifnull +23 -> 29
    //   9: aload_1
    //   10: invokevirtual 106	java/io/InputStream:close	()V
    //   13: goto +16 -> 29
    //   16: astore 7
    //   18: aload_2
    //   19: ifnull +7 -> 26
    //   22: aload_2
    //   23: invokevirtual 106	java/io/InputStream:close	()V
    //   26: aload 7
    //   28: athrow
    //   29: aload_2
    //   30: ifnull +11 -> 41
    //   33: aload_2
    //   34: invokevirtual 106	java/io/InputStream:close	()V
    //   37: goto +4 -> 41
    //   40: pop
    //   41: iconst_1
    //   42: ireturn
    //   43: aload_1
    //   44: ifnonnull +10 -> 54
    //   47: aload_2
    //   48: ifnonnull +6 -> 54
    //   51: goto -46 -> 5
    //   54: aload_1
    //   55: ifnull +7 -> 62
    //   58: aload_2
    //   59: ifnonnull +41 -> 100
    //   62: aload_1
    //   63: ifnull +23 -> 86
    //   66: aload_1
    //   67: invokevirtual 106	java/io/InputStream:close	()V
    //   70: goto +16 -> 86
    //   73: astore 7
    //   75: aload_2
    //   76: ifnull +7 -> 83
    //   79: aload_2
    //   80: invokevirtual 106	java/io/InputStream:close	()V
    //   83: aload 7
    //   85: athrow
    //   86: aload_2
    //   87: ifnull +11 -> 98
    //   90: aload_2
    //   91: invokevirtual 106	java/io/InputStream:close	()V
    //   94: goto +4 -> 98
    //   97: pop
    //   98: iconst_0
    //   99: ireturn
    //   100: aload_1
    //   101: invokevirtual 105	java/io/InputStream:read	()I
    //   104: istore 4
    //   106: goto +9 -> 115
    //   109: aload_1
    //   110: invokevirtual 105	java/io/InputStream:read	()I
    //   113: istore 4
    //   115: aload_0
    //   116: invokevirtual 112	org/eclipse/team/internal/core/subscribers/ContentComparator:shouldIgnoreWhitespace	()Z
    //   119: ifeq +12 -> 131
    //   122: aload_0
    //   123: iload 4
    //   125: invokespecial 113	org/eclipse/team/internal/core/subscribers/ContentComparator:isWhitespace	(I)Z
    //   128: ifne -19 -> 109
    //   131: aload_2
    //   132: invokevirtual 105	java/io/InputStream:read	()I
    //   135: istore 5
    //   137: goto +9 -> 146
    //   140: aload_2
    //   141: invokevirtual 105	java/io/InputStream:read	()I
    //   144: istore 5
    //   146: aload_0
    //   147: invokevirtual 112	org/eclipse/team/internal/core/subscribers/ContentComparator:shouldIgnoreWhitespace	()Z
    //   150: ifeq +12 -> 162
    //   153: aload_0
    //   154: iload 5
    //   156: invokespecial 113	org/eclipse/team/internal/core/subscribers/ContentComparator:isWhitespace	(I)Z
    //   159: ifne -19 -> 140
    //   162: iload 4
    //   164: iconst_m1
    //   165: if_icmpne +47 -> 212
    //   168: iload 5
    //   170: iconst_m1
    //   171: if_icmpne +41 -> 212
    //   174: aload_1
    //   175: ifnull +23 -> 198
    //   178: aload_1
    //   179: invokevirtual 106	java/io/InputStream:close	()V
    //   182: goto +16 -> 198
    //   185: astore 7
    //   187: aload_2
    //   188: ifnull +7 -> 195
    //   191: aload_2
    //   192: invokevirtual 106	java/io/InputStream:close	()V
    //   195: aload 7
    //   197: athrow
    //   198: aload_2
    //   199: ifnull +11 -> 210
    //   202: aload_2
    //   203: invokevirtual 106	java/io/InputStream:close	()V
    //   206: goto +4 -> 210
    //   209: pop
    //   210: iconst_1
    //   211: ireturn
    //   212: iload 4
    //   214: iload 5
    //   216: if_icmpeq -116 -> 100
    //   219: goto +84 -> 303
    //   222: pop
    //   223: aload_1
    //   224: ifnull +23 -> 247
    //   227: aload_1
    //   228: invokevirtual 106	java/io/InputStream:close	()V
    //   231: goto +16 -> 247
    //   234: astore 7
    //   236: aload_2
    //   237: ifnull +7 -> 244
    //   240: aload_2
    //   241: invokevirtual 106	java/io/InputStream:close	()V
    //   244: aload 7
    //   246: athrow
    //   247: aload_2
    //   248: ifnull +91 -> 339
    //   251: aload_2
    //   252: invokevirtual 106	java/io/InputStream:close	()V
    //   255: goto +84 -> 339
    //   258: pop
    //   259: goto +80 -> 339
    //   262: astore 6
    //   264: aload_1
    //   265: ifnull +23 -> 288
    //   268: aload_1
    //   269: invokevirtual 106	java/io/InputStream:close	()V
    //   272: goto +16 -> 288
    //   275: astore 7
    //   277: aload_2
    //   278: ifnull +7 -> 285
    //   281: aload_2
    //   282: invokevirtual 106	java/io/InputStream:close	()V
    //   285: aload 7
    //   287: athrow
    //   288: aload_2
    //   289: ifnull +11 -> 300
    //   292: aload_2
    //   293: invokevirtual 106	java/io/InputStream:close	()V
    //   296: goto +4 -> 300
    //   299: pop
    //   300: aload 6
    //   302: athrow
    //   303: aload_1
    //   304: ifnull +23 -> 327
    //   307: aload_1
    //   308: invokevirtual 106	java/io/InputStream:close	()V
    //   311: goto +16 -> 327
    //   314: astore 7
    //   316: aload_2
    //   317: ifnull +7 -> 324
    //   320: aload_2
    //   321: invokevirtual 106	java/io/InputStream:close	()V
    //   324: aload 7
    //   326: athrow
    //   327: aload_2
    //   328: ifnull +11 -> 339
    //   331: aload_2
    //   332: invokevirtual 106	java/io/InputStream:close	()V
    //   335: goto +4 -> 339
    //   338: pop
    //   339: iconst_0
    //   340: ireturn
    // Line number table:
    //   Java source line #80	-> byte code offset #0
    //   Java source line #107	-> byte code offset #5
    //   Java source line #108	-> byte code offset #9
    //   Java source line #110	-> byte code offset #16
    //   Java source line #111	-> byte code offset #18
    //   Java source line #112	-> byte code offset #22
    //   Java source line #114	-> byte code offset #26
    //   Java source line #111	-> byte code offset #29
    //   Java source line #112	-> byte code offset #33
    //   Java source line #115	-> byte code offset #40
    //   Java source line #81	-> byte code offset #41
    //   Java source line #83	-> byte code offset #43
    //   Java source line #84	-> byte code offset #51
    //   Java source line #86	-> byte code offset #54
    //   Java source line #107	-> byte code offset #62
    //   Java source line #108	-> byte code offset #66
    //   Java source line #110	-> byte code offset #73
    //   Java source line #111	-> byte code offset #75
    //   Java source line #112	-> byte code offset #79
    //   Java source line #114	-> byte code offset #83
    //   Java source line #111	-> byte code offset #86
    //   Java source line #112	-> byte code offset #90
    //   Java source line #115	-> byte code offset #97
    //   Java source line #88	-> byte code offset #98
    //   Java source line #91	-> byte code offset #100
    //   Java source line #92	-> byte code offset #106
    //   Java source line #93	-> byte code offset #109
    //   Java source line #92	-> byte code offset #115
    //   Java source line #94	-> byte code offset #131
    //   Java source line #95	-> byte code offset #137
    //   Java source line #96	-> byte code offset #140
    //   Java source line #95	-> byte code offset #146
    //   Java source line #97	-> byte code offset #162
    //   Java source line #107	-> byte code offset #174
    //   Java source line #108	-> byte code offset #178
    //   Java source line #110	-> byte code offset #185
    //   Java source line #111	-> byte code offset #187
    //   Java source line #112	-> byte code offset #191
    //   Java source line #114	-> byte code offset #195
    //   Java source line #111	-> byte code offset #198
    //   Java source line #112	-> byte code offset #202
    //   Java source line #115	-> byte code offset #209
    //   Java source line #98	-> byte code offset #210
    //   Java source line #99	-> byte code offset #212
    //   Java source line #100	-> byte code offset #219
    //   Java source line #103	-> byte code offset #222
    //   Java source line #107	-> byte code offset #223
    //   Java source line #108	-> byte code offset #227
    //   Java source line #110	-> byte code offset #234
    //   Java source line #111	-> byte code offset #236
    //   Java source line #112	-> byte code offset #240
    //   Java source line #114	-> byte code offset #244
    //   Java source line #111	-> byte code offset #247
    //   Java source line #112	-> byte code offset #251
    //   Java source line #115	-> byte code offset #258
    //   Java source line #104	-> byte code offset #262
    //   Java source line #107	-> byte code offset #264
    //   Java source line #108	-> byte code offset #268
    //   Java source line #110	-> byte code offset #275
    //   Java source line #111	-> byte code offset #277
    //   Java source line #112	-> byte code offset #281
    //   Java source line #114	-> byte code offset #285
    //   Java source line #111	-> byte code offset #288
    //   Java source line #112	-> byte code offset #292
    //   Java source line #115	-> byte code offset #299
    //   Java source line #118	-> byte code offset #300
    //   Java source line #107	-> byte code offset #303
    //   Java source line #108	-> byte code offset #307
    //   Java source line #110	-> byte code offset #314
    //   Java source line #111	-> byte code offset #316
    //   Java source line #112	-> byte code offset #320
    //   Java source line #114	-> byte code offset #324
    //   Java source line #111	-> byte code offset #327
    //   Java source line #112	-> byte code offset #331
    //   Java source line #115	-> byte code offset #338
    //   Java source line #119	-> byte code offset #339
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	341	0	this	ContentComparator
    //   0	341	1	is1	InputStream
    //   0	341	2	is2	InputStream
    //   0	341	3	ignoreWhitespace	boolean
    //   104	59	4	c1	int
    //   212	1	4	c1	int
    //   135	34	5	c2	int
    //   212	3	5	c2	int
    //   262	39	6	localObject1	Object
    //   16	11	7	localObject2	Object
    //   73	11	7	localObject3	Object
    //   185	11	7	localObject4	Object
    //   234	11	7	localObject5	Object
    //   275	11	7	localObject6	Object
    //   314	11	7	localObject7	Object
    //   40	1	15	localIOException1	java.io.IOException
    //   97	1	16	localIOException2	java.io.IOException
    //   209	1	17	localIOException3	java.io.IOException
    //   222	1	18	localIOException4	java.io.IOException
    //   258	1	19	localIOException5	java.io.IOException
    //   299	1	20	localIOException6	java.io.IOException
    //   338	1	21	localIOException7	java.io.IOException
    // Exception table:
    //   from	to	target	type
    //   5	16	16	finally
    //   5	37	40	java/io/IOException
    //   62	73	73	finally
    //   62	94	97	java/io/IOException
    //   174	185	185	finally
    //   174	206	209	java/io/IOException
    //   0	5	222	java/io/IOException
    //   43	62	222	java/io/IOException
    //   100	174	222	java/io/IOException
    //   212	219	222	java/io/IOException
    //   223	234	234	finally
    //   223	255	258	java/io/IOException
    //   0	5	262	finally
    //   43	62	262	finally
    //   100	174	262	finally
    //   212	223	262	finally
    //   264	275	275	finally
    //   264	296	299	java/io/IOException
    //   303	314	314	finally
    //   303	335	338	java/io/IOException
  }
  
  private boolean isWhitespace(int c)
  {
    if (c == -1) {
      return false;
    }
    return Character.isWhitespace((char)c);
  }
  
  private InputStream getContents(Object resource, IProgressMonitor monitor)
    throws TeamException
  {
    try
    {
      if ((resource instanceof IFile)) {
        return new BufferedInputStream(((IFile)resource).getContents());
      }
      if ((resource instanceof IResourceVariant))
      {
        IResourceVariant remote = (IResourceVariant)resource;
        if (!remote.isContainer()) {
          return new BufferedInputStream(remote.getStorage(monitor).getContents());
        }
      }
      else if ((resource instanceof IFileRevision))
      {
        IFileRevision remote = (IFileRevision)resource;
        return new BufferedInputStream(remote.getStorage(monitor).getContents());
      }
      return null;
    }
    catch (CoreException e)
    {
      throw TeamException.asTeamException(e);
    }
  }
}

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

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.diff.DiffFilter;
import org.eclipse.team.core.diff.IDiff;
import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;

public class ContentComparisonDiffFilter
  extends DiffFilter
{
  ContentComparator criteria = new ContentComparator(false);
  
  public ContentComparisonDiffFilter()
  {
    this(false);
  }
  
  public ContentComparisonDiffFilter(boolean ignoreWhitespace)
  {
    criteria = new ContentComparator(ignoreWhitespace);
  }
  
  public boolean compareContents(IFile local, IFileRevision remote, IProgressMonitor monitor)
  {
    Assert.isNotNull(local);
    Assert.isNotNull(remote);
    return criteria.compare(local, remote, monitor);
  }
  
  public boolean select(IDiff diff, IProgressMonitor monitor)
  {
    IFileRevision remote = SyncInfoToDiffConverter.getRemote(diff);
    IResource local = ResourceDiffTree.getResourceFor(diff);
    if ((local == null) || (local.getType() != 1)) {
      return true;
    }
    if (remote == null) {
      return !local.exists();
    }
    if (!local.exists()) {
      return false;
    }
    return compareContents((IFile)local, remote, monitor);
  }
}

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

import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.variants.ResourceVariantByteStore;

public abstract class DescendantResourceVariantByteStore
  extends ResourceVariantByteStore
{
  ResourceVariantByteStore baseStore;
  ResourceVariantByteStore remoteStore;
  
  public DescendantResourceVariantByteStore(ResourceVariantByteStore baseCache, ResourceVariantByteStore remoteCache)
  {
    baseStore = baseCache;
    remoteStore = remoteCache;
  }
  
  public void dispose()
  {
    remoteStore.dispose();
  }
  
  public byte[] getBytes(IResource resource)
    throws TeamException
  {
    byte[] remoteBytes = remoteStore.getBytes(resource);
    byte[] baseBytes = baseStore.getBytes(resource);
    if (baseBytes == null) {
      return remoteBytes;
    }
    if (remoteBytes == null)
    {
      if (isVariantKnown(resource)) {
        return remoteBytes;
      }
      return baseBytes;
    }
    if (isDescendant(resource, baseBytes, remoteBytes)) {
      return remoteBytes;
    }
    return baseBytes;
  }
  
  public boolean setBytes(IResource resource, byte[] bytes)
    throws TeamException
  {
    byte[] baseBytes = baseStore.getBytes(resource);
    if ((baseBytes != null) && (equals(baseBytes, bytes))) {
      return remoteStore.flushBytes(resource, 0);
    }
    return remoteStore.setBytes(resource, bytes);
  }
  
  public boolean flushBytes(IResource resource, int depth)
    throws TeamException
  {
    return remoteStore.flushBytes(resource, depth);
  }
  
  public abstract boolean isVariantKnown(IResource paramIResource)
    throws TeamException;
  
  protected abstract boolean isDescendant(IResource paramIResource, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2)
    throws TeamException;
  
  public boolean deleteBytes(IResource resource)
    throws TeamException
  {
    return remoteStore.deleteBytes(resource);
  }
  
  protected ResourceVariantByteStore getBaseStore()
  {
    return baseStore;
  }
  
  protected ResourceVariantByteStore getRemoteStore()
  {
    return remoteStore;
  }
  
  public IResource[] members(IResource resource)
    throws TeamException
  {
    IResource[] remoteMembers = getRemoteStore().members(resource);
    IResource[] baseMembers = getBaseStore().members(resource);
    Set members = new HashSet();
    for (int i = 0; i < remoteMembers.length; i++) {
      members.add(remoteMembers[i]);
    }
    for (int i = 0; i < baseMembers.length; i++)
    {
      IResource member = baseMembers[i];
      if (!isVariantKnown(member)) {
        members.add(member);
      }
    }
    return (IResource[])members.toArray(new IResource[members.size()]);
  }
  
  public void run(IResource root, IWorkspaceRunnable runnable, IProgressMonitor monitor)
    throws TeamException
  {
    remoteStore.run(root, runnable, monitor);
  }
}

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

import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.team.core.diff.IDiff;
import org.eclipse.team.core.mapping.IResourceDiffTree;
import org.eclipse.team.core.mapping.provider.ResourceDiffTree;

public class DiffChangeSet
  extends ChangeSet
{
  private final ResourceDiffTree tree = new ResourceDiffTree();
  
  public DiffChangeSet() {}
  
  public DiffChangeSet(String name)
  {
    super(name);
  }
  
  public IResourceDiffTree getDiffTree()
  {
    return tree;
  }
  
  protected ResourceDiffTree internalGetDiffTree()
  {
    return tree;
  }
  
  public IResource[] getResources()
  {
    return tree.getAffectedResources();
  }
  
  public boolean isEmpty()
  {
    return tree.isEmpty();
  }
  
  public boolean contains(IResource local)
  {
    return tree.getDiff(local) != null;
  }
  
  public void add(IDiff diff)
  {
    if (isValidChange(diff)) {
      tree.add(diff);
    }
  }
  
  protected boolean isValidChange(IDiff diff)
  {
    return diff != null;
  }
  
  /* Error */
  public void add(IDiff[] diffs)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 90	org/eclipse/team/internal/core/subscribers/DiffChangeSet:tree	Lorg/eclipse/team/core/mapping/provider/ResourceDiffTree;
    //   4: invokevirtual 92	org/eclipse/team/core/mapping/provider/ResourceDiffTree:beginInput	()V
    //   7: iconst_0
    //   8: istore_2
    //   9: goto +15 -> 24
    //   12: aload_1
    //   13: iload_2
    //   14: aaload
    //   15: astore_3
    //   16: aload_0
    //   17: aload_3
    //   18: invokevirtual 105	org/eclipse/team/internal/core/subscribers/DiffChangeSet:add	(Lorg/eclipse/team/core/diff/IDiff;)V
    //   21: iinc 2 1
    //   24: iload_2
    //   25: aload_1
    //   26: arraylength
    //   27: if_icmplt -15 -> 12
    //   30: goto +16 -> 46
    //   33: astore 4
    //   35: aload_0
    //   36: getfield 90	org/eclipse/team/internal/core/subscribers/DiffChangeSet:tree	Lorg/eclipse/team/core/mapping/provider/ResourceDiffTree;
    //   39: aconst_null
    //   40: invokevirtual 97	org/eclipse/team/core/mapping/provider/ResourceDiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   43: aload 4
    //   45: athrow
    //   46: aload_0
    //   47: getfield 90	org/eclipse/team/internal/core/subscribers
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

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-2017. Infinite Loop Ltd