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

e(listener);
  }
  
  public void accept(IPath path, IDiffVisitor visitor, int depth)
  {
    IDiff delta = getDiff(path);
    if ((delta == null) || (visitor.visit(delta)))
    {
      if (depth == 0) {
        return;
      }
      IPath[] children = getChildren(path);
      for (int i = 0; i < children.length; i++)
      {
        IPath child = children[i];
        accept(child, visitor, depth == 1 ? 0 : 2);
      }
    }
  }
  
  public IDiff getDiff(IPath path)
  {
    return (IDiff)pathTree.get(path);
  }
  
  public IPath[] getChildren(IPath path)
  {
    return pathTree.getChildren(path);
  }
  
  public boolean isEmpty()
  {
    return pathTree.isEmpty();
  }
  
  /* Error */
  public void add(IDiff delta)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 303	org/eclipse/team/core/diff/provider/DiffTree:beginInput	()V
    //   4: aload_0
    //   5: aload_1
    //   6: invokeinterface 358 1 0
    //   11: invokevirtual 317	org/eclipse/team/core/diff/provider/DiffTree:getDiff	(Lorg/eclipse/core/runtime/IPath;)Lorg/eclipse/team/core/diff/IDiff;
    //   14: astore_2
    //   15: aload_0
    //   16: aload_1
    //   17: invokespecial 309	org/eclipse/team/core/diff/provider/DiffTree:internalAdd	(Lorg/eclipse/team/core/diff/IDiff;)V
    //   20: aload_2
    //   21: ifnull +11 -> 32
    //   24: aload_0
    //   25: aload_1
    //   26: invokespecial 311	org/eclipse/team/core/diff/provider/DiffTree:internalChanged	(Lorg/eclipse/team/core/diff/IDiff;)V
    //   29: goto +19 -> 48
    //   32: aload_0
    //   33: aload_1
    //   34: invokespecial 310	org/eclipse/team/core/diff/provider/DiffTree:internalAdded	(Lorg/eclipse/team/core/diff/IDiff;)V
    //   37: goto +11 -> 48
    //   40: astore_3
    //   41: aload_0
    //   42: aconst_null
    //   43: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   46: aload_3
    //   47: athrow
    //   48: aload_0
    //   49: aconst_null
    //   50: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   53: return
    // Line number table:
    //   Java source line #129	-> byte code offset #0
    //   Java source line #130	-> byte code offset #4
    //   Java source line #131	-> byte code offset #15
    //   Java source line #132	-> byte code offset #20
    //   Java source line #133	-> byte code offset #24
    //   Java source line #135	-> byte code offset #32
    //   Java source line #137	-> byte code offset #40
    //   Java source line #138	-> byte code offset #41
    //   Java source line #139	-> byte code offset #46
    //   Java source line #138	-> byte code offset #48
    //   Java source line #140	-> byte code offset #53
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	54	0	this	DiffTree
    //   0	54	1	delta	IDiff
    //   14	7	2	oldDiff	IDiff
    //   40	7	3	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	40	40	finally
  }
  
  /* Error */
  public void remove(IPath path)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 303	org/eclipse/team/core/diff/provider/DiffTree:beginInput	()V
    //   4: aload_0
    //   5: aload_1
    //   6: invokevirtual 317	org/eclipse/team/core/diff/provider/DiffTree:getDiff	(Lorg/eclipse/core/runtime/IPath;)Lorg/eclipse/team/core/diff/IDiff;
    //   9: astore_2
    //   10: aload_2
    //   11: ifnull +25 -> 36
    //   14: aload_0
    //   15: aload_2
    //   16: invokespecial 312	org/eclipse/team/core/diff/provider/DiffTree:internalRemove	(Lorg/eclipse/team/core/diff/IDiff;)V
    //   19: aload_0
    //   20: aload_1
    //   21: aload_2
    //   22: invokespecial 318	org/eclipse/team/core/diff/provider/DiffTree:internalRemoved	(Lorg/eclipse/core/runtime/IPath;Lorg/eclipse/team/core/diff/IDiff;)V
    //   25: goto +11 -> 36
    //   28: astore_3
    //   29: aload_0
    //   30: aconst_null
    //   31: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   34: aload_3
    //   35: athrow
    //   36: aload_0
    //   37: aconst_null
    //   38: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   41: return
    // Line number table:
    //   Java source line #160	-> byte code offset #0
    //   Java source line #161	-> byte code offset #4
    //   Java source line #162	-> byte code offset #10
    //   Java source line #163	-> byte code offset #14
    //   Java source line #164	-> byte code offset #19
    //   Java source line #166	-> byte code offset #28
    //   Java source line #167	-> byte code offset #29
    //   Java source line #168	-> byte code offset #34
    //   Java source line #167	-> byte code offset #36
    //   Java source line #169	-> byte code offset #41
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	42	0	this	DiffTree
    //   0	42	1	path	IPath
    //   9	13	2	delta	IDiff
    //   28	7	3	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	28	28	finally
  }
  
  /* Error */
  public void clear()
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 303	org/eclipse/team/core/diff/provider/DiffTree:beginInput	()V
    //   4: aload_0
    //   5: getfield 288	org/eclipse/team/core/diff/provider/DiffTree:pathTree	Lorg/eclipse/team/internal/core/mapping/PathTree;
    //   8: invokevirtual 333	org/eclipse/team/internal/core/mapping/PathTree:clear	()V
    //   11: aload_0
    //   12: getfield 289	org/eclipse/team/core/diff/provider/DiffTree:statistics	Lorg/eclipse/team/internal/core/subscribers/DiffTreeStatistics;
    //   15: invokevirtual 344	org/eclipse/team/internal/core/subscribers/DiffTreeStatistics:clear	()V
    //   18: aload_0
    //   19: invokespecial 304	org/eclipse/team/core/diff/provider/DiffTree:internalReset	()V
    //   22: goto +11 -> 33
    //   25: astore_1
    //   26: aload_0
    //   27: aconst_null
    //   28: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   31: aload_1
    //   32: athrow
    //   33: aload_0
    //   34: aconst_null
    //   35: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   38: return
    // Line number table:
    //   Java source line #176	-> byte code offset #0
    //   Java source line #177	-> byte code offset #4
    //   Java source line #178	-> byte code offset #11
    //   Java source line #179	-> byte code offset #18
    //   Java source line #180	-> byte code offset #25
    //   Java source line #181	-> byte code offset #26
    //   Java source line #182	-> byte code offset #31
    //   Java source line #181	-> byte code offset #33
    //   Java source line #183	-> byte code offset #38
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	39	0	this	DiffTree
    //   25	7	1	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	25	25	finally
  }
  
  public void beginInput()
  {
    lock.acquire();
  }
  
  /* Error */
  public void endInput(IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 286	org/eclipse/team/core/diff/provider/DiffTree:lock	Lorg/eclipse/core/runtime/jobs/ILock;
    //   4: invokeinterface 355 1 0
    //   9: iconst_1
    //   10: if_icmpne +26 -> 36
    //   13: aload_0
    //   14: aload_1
    //   15: invokestatic 322	org/eclipse/team/internal/core/Policy:monitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   18: invokespecial 308	org/eclipse/team/core/diff/provider/DiffTree:fireChanges	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   21: goto +15 -> 36
    //   24: astore_2
    //   25: aload_0
    //   26: getfield 286	org/eclipse/team/core/diff/provider/DiffTree:lock	Lorg/eclipse/core/runtime/jobs/ILock;
    //   29: invokeinterface 357 1 0
    //   34: aload_2
    //   35: athrow
    //   36: aload_0
    //   37: getfield 286	org/eclipse/team/core/diff/provider/DiffTree:lock	Lorg/eclipse/core/runtime/jobs/ILock;
    //   40: invokeinterface 357 1 0
    //   45: return
    // Line number table:
    //   Java source line #218	-> byte code offset #0
    //   Java source line #221	-> byte code offset #13
    //   Java source line #223	-> byte code offset #24
    //   Java source line #224	-> byte code offset #25
    //   Java source line #225	-> byte code offset #34
    //   Java source line #224	-> byte code offset #36
    //   Java source line #226	-> byte code offset #45
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	46	0	this	DiffTree
    //   0	46	1	monitor	IProgressMonitor
    //   24	11	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	24	24	finally
  }
  
  private void fireChanges(IProgressMonitor monitor)
  {
    DiffChangeEvent event = getChangeEvent();
    resetChanges();
    Map propertyChanges = this.propertyChanges;
    this.propertyChanges = new HashMap();
    if ((event.isEmpty()) && (!event.isReset()) && (propertyChanges.isEmpty())) {
      return;
    }
    Object[] listeners = this.listeners.getListeners();
    for (int i = 0; i < listeners.length; i++)
    {
      IDiffChangeListener listener = (IDiffChangeListener)listeners[i];
      SafeRunner.run(new ISafeRunnable()
      {
        private final DiffChangeEvent val$event;
        private final IDiffChangeListener val$listener;
        private final IProgressMonitor val$monitor;
        private final Map val$propertyChanges;
        
        public void handleException(Throwable exception) {}
        
        /* Error */
        public void run()
          throws java.lang.Exception
        {
          // Byte code:
          //   0: aload_0
          //   1: getfield 104	org/eclipse/team/core/diff/provider/DiffTree$1:this$0	Lorg/eclipse/team/core/diff/provider/DiffTree;
          //   4: iconst_1
          //   5: invokestatic 108	org/eclipse/team/core/diff/provider/DiffTree:access$0	(Lorg/eclipse/team/core/diff/provider/DiffTree;Z)V
          //   8: aload_0
          //   9: getfield 105	org/eclipse/team/core/diff/provider/DiffTree$1:val$event	Lorg/eclipse/team/internal/core/mapping/DiffChangeEvent;
          //   12: invokevirtual 110	org/eclipse/team/internal/core/mapping/DiffChangeEvent:isEmpty	()Z
          //   15: ifeq +13 -> 28
          //   18: aload_0
          //   19: getfield 105	org/eclipse/team/core/diff/provider/DiffTree$1:val$event	Lorg/eclipse/team/internal/core/mapping/DiffChangeEvent;
          //   22: invokevirtual 111	org/eclipse/team/internal/core/mapping/DiffChangeEvent:isReset	()Z
          //   25: ifeq +25 -> 50
          //   28: aload_0
          //   29: getfield 103	org/eclipse/team/core/diff/provider/DiffTree$1:val$listener	Lorg/eclipse/team/core/diff/IDiffChangeListener;
          //   32: aload_0
          //   33: getfield 105	org/eclipse/team/core/diff/provider/DiffTree$1:val$event	Lorg/eclipse/team/internal/core/mapping/DiffChangeEvent;
          //   36: aload_0
          //   37: getfield 102	org/eclipse/team/core/diff/provider/DiffTree$1:val$monitor	Lorg/eclipse/core/runtime/IProgressMonitor;
          //   40: bipush 100
          //   42: invokestatic 109	org/eclipse/team/internal/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
          //   45: invokeinterface 120 3 0
          //   50: aload_0
          //   51: getfield 101	org/eclipse/team/core/diff/provider/DiffTree$1:val$propertyChanges	Ljava/util/Map;
          //   54: invokeinterface 114 1 0
          //   59: invokeinterface 117 1 0
          //   64: astore_1
          //   65: goto +62 -> 127
          //   68: aload_1
          //   69: invokeinterface 113 1 0
          //   74: checkcast 48	java/lang/Integer
          //   77: astore_2
          //   78: aload_0
          //   79: getfield 101	org/eclipse/team/core/diff/provider/DiffTree$1:val$propertyChanges	Ljava/util/Map;
          //   82: aload_2
          //   83: invokeinterface 115 2 0
          //   88: checkcast 52	java/util/Set
          //   91: astore_3
          //   92: aload_0
          //   93: getfield 103	org/eclipse/team/core/diff/provider/DiffTree$1:val$listener	Lorg/eclipse/team/core/diff/IDiffChangeListener;
          //   96: aload_0
          //   97: getfield 104	org/eclipse/team/core/diff/provider/DiffTree$1:this$0	Lorg/eclipse/team/core/diff/provider/DiffTree;
          //   100: aload_2
          //   101: invokevirtual 106	java/lang/Integer:intValue	()I
          //   104: aload_3
          //   105: aload_3
          //   106: invokeinterface 116 1 0
          //   111: anewarray 53	org/eclipse/core/runtime/IPath
          //   114: invokeinterface 118 2 0
          //   119: checkcast 46	[Lorg/eclipse/core/runtime/IPath;
          //   122: invokeinterface 119 4 0
          //   127: aload_1
          //   128: invokeinterface 112 1 0
          //   133: ifne -65 -> 68
          //   136: goto +16 -> 152
          //   139: astore 4
          //   141: aload_0
          //   142: getfield 104	org/eclipse/team/core/diff/provider/DiffTree$1:this$0	Lorg/eclipse/team/core/diff/provider/DiffTree;
          //   145: iconst_0
          //   146: invokestatic 108	org/eclipse/team/core/diff/provider/DiffTree:access$0	(Lorg/eclipse/team/core/diff/provider/DiffTree;Z)V
          //   149: aload 4
          //   151: athrow
          //   152: aload_0
          //   153: getfield 104	org/eclipse/team/core/diff/provider/DiffTree$1:this$0	Lorg/eclipse/team/core/diff/provider/DiffTree;
          //   156: iconst_0
          //   157: invokestatic 108	org/eclipse/team/core/diff/provider/DiffTree:access$0	(Lorg/eclipse/team/core/diff/provider/DiffTree;Z)V
          //   160: return
          // Line number table:
          //   Java source line #245	-> byte code offset #0
          //   Java source line #246	-> byte code offset #8
          //   Java source line #247	-> byte code offset #28
          //   Java source line #248	-> byte code offset #50
          //   Java source line #249	-> byte code offset #68
          //   Java source line #250	-> byte code offset #78
          //   Java source line #251	-> byte code offset #92
          //   Java source line #252	-> byte code offset #106
          //   Java source line #251	-> byte code offset #114
          //   Java source line #248	-> byte code offset #127
          //   Java source line #255	-> byte code offset #139
          //   Java source line #256	-> byte code offset #141
          //   Java source line #257	-> byte code offset #149
          //   Java source line #256	-> byte code offset #152
          //   Java source line #258	-> byte code offset #160
          // Local variable table:
          //   start	length	slot	name	signature
          //   0	161	0	this	1
          //   64	64	1	iter	java.util.Iterator
          //   77	24	2	key	Integer
          //   91	15	3	paths	Set
          //   139	11	4	localObject	Object
          // Exception table:
          //   from	to	target	type
          //   0	139	139	finally
        }
      });
    }
    monitor.done();
  }
  
  private DiffChangeEvent getChangeEvent()
  {
    return changes;
  }
  
  private void resetChanges()
  {
    changes = createEmptyChangeEvent();
  }
  
  private DiffChangeEvent createEmptyChangeEvent()
  {
    return new DiffChangeEvent(this);
  }
  
  private void internalAdd(IDiff delta)
  {
    Assert.isTrue(!lockedForModification);
    IDiff oldDiff = (IDiff)pathTree.get(delta.getPath());
    pathTree.put(delta.getPath(), delta);
    if (oldDiff == null)
    {
      statistics.add(delta);
    }
    else
    {
      statistics.remove(oldDiff);
      statistics.add(delta);
    }
    boolean isConflict = false;
    if ((delta instanceof IThreeWayDiff))
    {
      IThreeWayDiff twd = (IThreeWayDiff)delta;
      isConflict = twd.getDirection() == 768;
    }
    setPropertyToRoot(delta, 2, isConflict);
  }
  
  private void internalRemove(IDiff delta)
  {
    Assert.isTrue(!lockedForModification);
    statistics.remove(delta);
    setPropertyToRoot(delta, 2, false);
    setPropertyToRoot(delta, 1, false);
    pathTree.remove(delta.getPath());
  }
  
  private void internalAdded(IDiff delta)
  {
    changes.added(delta);
  }
  
  private void internalChanged(IDiff delta)
  {
    changes.changed(delta);
  }
  
  private void internalRemoved(IPath path, IDiff delta)
  {
    changes.removed(path, delta);
  }
  
  private void internalReset()
  {
    changes.reset();
  }
  
  public IPath[] getPaths()
  {
    return pathTree.getPaths();
  }
  
  public IDiff[] getDiffs()
  {
    return (IDiff[])pathTree.values().toArray(new IDiff[pathTree.size()]);
  }
  
  public long countFor(int state, int mask)
  {
    if (state == 0) {
      return size();
    }
    return statistics.countFor(state, mask);
  }
  
  public int size()
  {
    return pathTree.size();
  }
  
  /* Error */
  public void setPropertyToRoot(IDiff node, int property, boolean value)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 303	org/eclipse/team/core/diff/provider/DiffTree:beginInput	()V
    //   4: aload_0
    //   5: getfield 288	org/eclipse/team/core/diff/provider/DiffTree:pathTree	Lorg/eclipse/team/internal/core/mapping/PathTree;
    //   8: aload_1
    //   9: invokeinterface 358 1 0
    //   14: iload_2
    //   15: iload_3
    //   16: invokevirtual 341	org/eclipse/team/internal/core/mapping/PathTree:setPropogatedProperty	(Lorg/eclipse/core/runtime/IPath;IZ)[Lorg/eclipse/core/runtime/IPath;
    //   19: astore 4
    //   21: aload_0
    //   22: iload_2
    //   23: aload 4
    //   25: invokespecial 306	org/eclipse/team/core/diff/provider/DiffTree:accumulatePropertyChanges	(I[Lorg/eclipse/core/runtime/IPath;)V
    //   28: goto +13 -> 41
    //   31: astore 5
    //   33: aload_0
    //   34: aconst_null
    //   35: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   38: aload 5
    //   40: athrow
    //   41: aload_0
    //   42: aconst_null
    //   43: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   46: return
    // Line number table:
    //   Java source line #354	-> byte code offset #0
    //   Java source line #355	-> byte code offset #4
    //   Java source line #356	-> byte code offset #21
    //   Java source line #357	-> byte code offset #31
    //   Java source line #358	-> byte code offset #33
    //   Java source line #359	-> byte code offset #38
    //   Java source line #358	-> byte code offset #41
    //   Java source line #360	-> byte code offset #46
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	47	0	this	DiffTree
    //   0	47	1	node	IDiff
    //   0	47	2	property	int
    //   0	47	3	value	boolean
    //   19	5	4	paths	IPath[]
    //   31	8	5	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	31	31	finally
  }
  
  private void accumulatePropertyChanges(int property, IPath[] paths)
  {
    Integer key = new Integer(property);
    Set changes = (Set)propertyChanges.get(key);
    if (changes == null)
    {
      changes = new HashSet();
      propertyChanges.put(key, changes);
    }
    for (int i = 0; i < paths.length; i++)
    {
      IPath path = paths[i];
      changes.add(path);
    }
  }
  
  public boolean getProperty(IPath path, int property)
  {
    return pathTree.getProperty(path, property);
  }
  
  /* Error */
  public void setBusy(IDiff[] diffs, IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 303	org/eclipse/team/core/diff/provider/DiffTree:beginInput	()V
    //   4: iconst_0
    //   5: istore_3
    //   6: goto +19 -> 25
    //   9: aload_1
    //   10: iload_3
    //   11: aaload
    //   12: astore 4
    //   14: aload_0
    //   15: aload 4
    //   17: iconst_1
    //   18: iconst_1
    //   19: invokevirtual 313	org/eclipse/team/core/diff/provider/DiffTree:setPropertyToRoot	(Lorg/eclipse/team/core/diff/IDiff;IZ)V
    //   22: iinc 3 1
    //   25: iload_3
    //   26: aload_1
    //   27: arraylength
    //   28: if_icmplt -19 -> 9
    //   31: goto +13 -> 44
    //   34: astore 5
    //   36: aload_0
    //   37: aload_2
    //   38: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   41: aload 5
    //   43: athrow
    //   44: aload_0
    //   45: aload_2
    //   46: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   49: return
    // Line number table:
    //   Java source line #387	-> byte code offset #0
    //   Java source line #388	-> byte code offset #4
    //   Java source line #389	-> byte code offset #9
    //   Java source line #390	-> byte code offset #14
    //   Java source line #388	-> byte code offset #22
    //   Java source line #392	-> byte code offset #34
    //   Java source line #393	-> byte code offset #36
    //   Java source line #394	-> byte code offset #41
    //   Java source line #393	-> byte code offset #44
    //   Java source line #395	-> byte code offset #49
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	50	0	this	DiffTree
    //   0	50	1	diffs	IDiff[]
    //   0	50	2	monitor	IProgressMonitor
    //   5	21	3	i	int
    //   12	4	4	node	IDiff
    //   34	8	5	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	34	34	finally
  }
  
  /* Error */
  public void clearBusy(IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 303	org/eclipse/team/core/diff/provider/DiffTree:beginInput	()V
    //   4: aload_0
    //   5: getfield 288	org/eclipse/team/core/diff/provider/DiffTree:pathTree	Lorg/eclipse/team/internal/core/mapping/PathTree;
    //   8: invokevirtual 336	org/eclipse/team/internal/core/mapping/PathTree:getPaths	()[Lorg/eclipse/core/runtime/IPath;
    //   11: astore_2
    //   12: iconst_0
    //   13: istore_3
    //   14: goto +31 -> 45
    //   17: aload_2
    //   18: iload_3
    //   19: aaload
    //   20: astore 4
    //   22: aload_0
    //   23: getfield 288	org/eclipse/team/core/diff/provider/DiffTree:pathTree	Lorg/eclipse/team/internal/core/mapping/PathTree;
    //   26: aload 4
    //   28: iconst_1
    //   29: iconst_0
    //   30: invokevirtual 341	org/eclipse/team/internal/core/mapping/PathTree:setPropogatedProperty	(Lorg/eclipse/core/runtime/IPath;IZ)[Lorg/eclipse/core/runtime/IPath;
    //   33: astore 5
    //   35: aload_0
    //   36: iconst_1
    //   37: aload 5
    //   39: invokespecial 306	org/eclipse/team/core/diff/provider/DiffTree:accumulatePropertyChanges	(I[Lorg/eclipse/core/runtime/IPath;)V
    //   42: iinc 3 1
    //   45: iload_3
    //   46: aload_2
    //   47: arraylength
    //   48: if_icmplt -31 -> 17
    //   51: goto +13 -> 64
    //   54: astore 6
    //   56: aload_0
    //   57: aload_1
    //   58: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   61: aload 6
    //   63: athrow
    //   64: aload_0
    //   65: aload_1
    //   66: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   69: return
    // Line number table:
    //   Java source line #402	-> byte code offset #0
    //   Java source line #403	-> byte code offset #4
    //   Java source line #404	-> byte code offset #12
    //   Java source line #405	-> byte code offset #17
    //   Java source line #406	-> byte code offset #22
    //   Java source line #407	-> byte code offset #35
    //   Java source line #404	-> byte code offset #42
    //   Java source line #409	-> byte code offset #54
    //   Java source line #410	-> byte code offset #56
    //   Java source line #411	-> byte code offset #61
    //   Java source line #410	-> byte code offset #64
    //   Java source line #412	-> byte code offset #69
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	70	0	this	DiffTree
    //   0	70	1	monitor	IProgressMonitor
    //   11	36	2	paths	IPath[]
    //   13	33	3	i	int
    //   20	7	4	path	IPath
    //   33	5	5	changed	IPath[]
    //   54	8	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	54	54	finally
  }
  
  public boolean hasMatchingDiffs(IPath path, FastDiffFilter filter)
  {
    RuntimeException found = new RuntimeException();
    try
    {
      accept(path, new IDiffVisitor()
      {
        private final FastDiffFilter val$filter;
        private final RuntimeException val$found;
        
        public boolean visit(IDiff delta)
        {
          if (val$filter.select(delta)) {
            throw val$found;
          }
          return false;
        }
      }, 2);
    }
    catch (RuntimeException e)
    {
      if (e == found) {
        return true;
      }
      throw e;
    }
    return false;
  }
  
  /* Error */
  public void reportError(org.eclipse.core.runtime.IStatus status)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 303	org/eclipse/team/core/diff/provider/DiffTree:beginInput	()V
    //   4: aload_0
    //   5: invokespecial 315	org/eclipse/team/core/diff/provider/DiffTree:getChangeEvent	()Lorg/eclipse/team/internal/core/mapping/DiffChangeEvent;
    //   8: aload_1
    //   9: invokevirtual 326	org/eclipse/team/internal/core/mapping/DiffChangeEvent:errorOccurred	(Lorg/eclipse/core/runtime/IStatus;)V
    //   12: goto +11 -> 23
    //   15: astore_2
    //   16: aload_0
    //   17: aconst_null
    //   18: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   21: aload_2
    //   22: athrow
    //   23: aload_0
    //   24: aconst_null
    //   25: invokevirtual 307	org/eclipse/team/core/diff/provider/DiffTree:endInput	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   28: return
    // Line number table:
    //   Java source line #448	-> byte code offset #0
    //   Java source line #449	-> byte code offset #4
    //   Java source line #450	-> byte code offset #15
    //   Java source line #451	-> byte code offset #16
    //   Java source line #452	-> byte code offset #21
    //   Java source line #451	-> byte code offset #23
    //   Java source line #453	-> byte code offset #28
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	29	0	this	DiffTree
    //   0	29	1	status	org.eclipse.core.runtime.IStatus
    //   15	7	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	15	15	finally
  }
}

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

import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.diff.IThreeWayDiff;
import org.eclipse.team.core.diff.ITwoWayDiff;
import org.eclipse.team.internal.core.Messages;
import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;

public class ThreeWayDiff
  extends Diff
  implements IThreeWayDiff
{
  private final ITwoWayDiff localChange;
  private final ITwoWayDiff remoteChange;
  
  public ThreeWayDiff(ITwoWayDiff localChange, ITwoWayDiff remoteChange)
  {
    super(calculatePath(localChange, remoteChange), calculateKind(localChange, remoteChange) | calculateDirection(localChange, remoteChange));
    this.localChange = localChange;
    this.remoteChange = remoteChange;
  }
  
  private static IPath calculatePath(ITwoWayDiff localChange, ITwoWayDiff remoteChange)
  {
    if ((localChange != null) && (remoteChange != null)) {
      Assert.isTrue(localChange.getPath().equals(remoteChange.getPath()));
    }
    if (localChange != null) {
      return localChange.getPath();
    }
    if (remoteChange != null) {
      return remoteChange.getPath();
    }
    Assert.isLegal(false, "Either or local or remote change must be supplied");
    return null;
  }
  
  private static int calculateDirection(ITwoWayDiff localChange, ITwoWayDiff remoteChange)
  {
    int direction = 0;
    if ((localChange != null) && (localChange.getKind() != 0)) {
      direction |= 0x100;
    }
    if ((remoteChange != null) && (remoteChange.getKind() != 0)) {
      direction |= 0x200;
    }
    return direction;
  }
  
  private static int calculateKind(ITwoWayDiff localChange, ITwoWayDiff remoteChange)
  {
    int localKind = 0;
    if (localChange != null) {
      localKind = localChange.getKind();
    }
    int remoteKind = 0;
    if (remoteChange != null) {
      remoteKind = remoteChange.getKind();
    }
    if ((localKind == 0) || (localKind == remoteKind)) {
      return remoteKind;
    }
    if (remoteKind == 0) {
      return localKind;
    }
    return 4;
  }
  
  public ITwoWayDiff getLocalChange()
  {
    return localChange;
  }
  
  public ITwoWayDiff getRemoteChange()
  {
    return remoteChange;
  }
  
  public int getDirection()
  {
    return getStatus() & 0x300;
  }
  
  public String toDiffString()
  {
    int kind = getKind();
    String label = "";
    if (kind == 0)
    {
      label = super.toDiffString();
    }
    else
    {
      label = SyncInfoToDiffConverter.diffDirectionToString(getDirection());
      label = NLS.bind(Messages.concatStrings, new String[] { label, super.toDiffString() });
    }
    return label;
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if ((super.equals(obj)) && 
      ((obj instanceof ThreeWayDiff)))
    {
      ThreeWayDiff other = (ThreeWayDiff)obj;
      
      return (changesEqual(getLocalChange(), other.getLocalChange())) && (changesEqual(getRemoteChange(), other.getRemoteChange()));
    }
    return false;
  }
  
  private boolean changesEqual(ITwoWayDiff diff, ITwoWayDiff diff2)
  {
    if (diff == null) {
      return diff2 == null;
    }
    if (diff2 == null) {
      return false;
    }
    return diff.equals(diff2);
  }
}

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

import org.eclipse.core.runtime.IPath;
import org.eclipse.team.core.diff.ITwoWayDiff;

public class TwoWayDiff
  extends Diff
  implements ITwoWayDiff
{
  protected static final int FLAG_MASK = 65280;
  
  public TwoWayDiff(IPath path, int kind, int flags)
  {
    super(path, kind & 0xFF | flags & 0xFF00);
  }
  
  public int getFlags()
  {
    return getStatus() & 0xFF00;
  }
  
  public IPath getToPath()
  {
    return null;
  }
  
  public IPath getFromPath()
  {
    return null;
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if ((super.equals(obj)) && 
      ((obj instanceof TwoWayDiff)))
    {
      TwoWayDiff other = (TwoWayDiff)obj;
      return (pathsEqual(getFromPath(), other.getFromPath())) && (pathsEqual(getToPath(), other.getToPath()));
    }
    return false;
  }
  
  private boolean pathsEqual(IPath path1, IPath path2)
  {
    if (path1 == null) {
      return path2 == null;
    }
    if (path2 == null) {
      return false;
    }
    return path1.equals(path2);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.core.diff.provider.TwoWayDiff
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.core.history;

public abstract interface IFileHistory
{
  public abstract IFileRevision[] getFileRevisions();
  
  public abstract IFileRevision getFileRevision(String paramString);
  
  public abstract IFileRevision[] getContributors(IFileRevision paramIFileRevision);
  
  public abstract IFileRevision[] getTargets(IFileRevision paramIFileRevision);
}

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

import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;

public abstract interface IFileHistoryProvider
{
  public static final int NONE = 0;
  public static final int SINGLE_REVISION = 1;
  public static final int SINGLE_LINE_OF_DESCENT = 2;
  
  public abstract IFileHistory getFileHistoryFor(IResource paramIResource, int paramInt, IProgressMonitor paramIProgressMonitor);
  
  public abstract IFileRevision getWorkspaceFileRevision(IResource paramIResource);
  
  public abstract IFileHistory getFileHistoryFor(IFileStore paramIFileStore, int paramInt, IProgressMonitor paramIProgressMonitor);
}

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

import java.net.URI;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;

public abstract interface IFileRevision
{
  public abstract IStorage getStorage(IProgressMonitor paramIProgressMonitor)
    throws CoreException;
  
  public abstract String getName();
  
  public abstract URI getURI();
  
  public abstract long getTimestamp();
  
  public abstract boolean exists();
  
  public abstract String getContentIdentifier();
  
  public abstract String getAuthor();
  
  public abstract String getComment();
  
  public abstract ITag[] getBranches();
  
  public abstract ITag[] getTags();
  
  public abstract boolean isPropertyMissing();
  
  public abstract IFileRevision withAllProperties(IProgressMonitor paramIProgressMonitor)
    throws CoreException;
}

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

public abstract interface ITag
{
  public abstract String getName();
}

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

import org.eclipse.team.core.history.IFileHistory;

public abstract class FileHistory
  implements IFileHistory
{}

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

import org.eclipse.team.core.history.IFileHistoryProvider;

public abstract class FileHistoryProvider
  implements IFileHistoryProvider
{}

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

import java.net.URI;
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.history.IFileRevision;

final class FileRevision$LocalFileRevision
  extends FileRevision
{
  private final IFile file;
  
  FileRevision$LocalFileRevision(IFile paramIFile, LocalFileRevision paramLocalFileRevision)
  {
    this(paramIFile);
  }
  
  private FileRevision$LocalFileRevision(IFile file)
  {
    this.file = file;
  }
  
  public IStorage getStorage(IProgressMonitor monitor)
  {
    return file;
  }
  
  public String getName()
  {
    return file.getName();
  }
  
  public boolean exists()
  {
    return file.exists();
  }
  
  public long getTimestamp()
  {
    return file.getLocalTimeStamp();
  }
  
  public URI getURI()
  {
    return file.getLocationURI();
  }
  
  public IFileRevision withAllProperties(IProgressMonitor monitor)
    throws CoreException
  {
    return this;
  }
  
  public boolean isPropertyMissing()
  {
    return false;
  }
  
  public int hashCode()
  {
    return file.hashCode();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if ((obj instanceof LocalFileRevision))
    {
      LocalFileRevision other = (LocalFileRevision)obj;
      return file.equals(file);
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.core.history.provider.FileRevision.LocalFileRevision
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.core.history.provider;

import java.net.URI;
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.history.IFileRevision;
import org.eclipse.team.core.history.ITag;

public abstract class FileRevision
  implements IFileRevision
{
  private static final class LocalFileRevision
    extends FileRevision
  {
    private final IFile file;
    
    LocalFileRevision(IFile paramIFile, LocalFileRevision paramLocalFileRevision)
    {
      this(paramIFile);
    }
    
    private LocalFileRevision(IFile file)
    {
      this.file = file;
    }
    
    public IStorage getStorage(IProgressMonitor monitor)
    {
      return file;
    }
    
    public String getName()
    {
      return file.getName();
    }
    
    public boolean exists()
    {
      return file.exists();
    }
    
    public long getTimestamp()
    {
      return file.getLocalTimeStamp();
    }
    
    public URI getURI()
    {
      return file.getLocationURI();
    }
    
    public IFileRevision withAllProperties(IProgressMonitor monitor)
      throws CoreException
    {
      return this;
    }
    
    public boolean isPropertyMissing()
    {
      return false;
    }
    
    public int hashCode()
    {
      return file.hashCode();
    }
    
    public boolean equals(Object obj)
    {
      if (obj == this) {
        return true;
      }
      if ((obj instanceof LocalFileRevision))
      {
        LocalFileRevision other = (LocalFileRevision)obj;
        return file.equals(file);
      }
      return false;
    }
  }
  
  /**
   * @deprecated
   */
  public static IFileRevision getFileRevisionFor(IFile file)
  {
    return new LocalFileRevision(file, null);
  }
  
  public URI getURI()
  {
    return null;
  }
  
  public long getTimestamp()
  {
    return -1L;
  }
  
  public boolean exists()
  {
    return true;
  }
  
  public String getContentIdentifier()
  {
    return null;
  }
  
  public String getAuthor()
  {
    return null;
  }
  
  public String getComment()
  {
    return null;
  }
  
  public ITag[] getBranches()
  {
    return new ITag[0];
  }
  
  public ITag[] getTags()
  {
    return new ITag[0];
  }
}

/* Location:
 * Qualified Name:     org.eclipse.team.core.history.provider.FileRevision
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.core.importing.provisional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.osgi.util.ManifestElement;
import org.eclipse.team.core.ProjectSetCapability;
import org.eclipse.team.core.ProjectSetSer
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