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

 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.team.internal.ccvs.core.connection;

import org.eclipse.team.internal.ccvs.core.IUserInfo;

public class UserInfo
  implements IUserInfo
{
  private String username;
  private String password;
  private boolean isUsernameMutable;
  
  protected UserInfo(String username, String password, boolean isUsernameMutable)
  {
    this.username = username;
    this.password = password;
    this.isUsernameMutable = isUsernameMutable;
  }
  
  public String getUsername()
  {
    return username;
  }
  
  protected String getPassword()
  {
    return password;
  }
  
  public boolean isUsernameMutable()
  {
    return isUsernameMutable;
  }
  
  public void setPassword(String password)
  {
    this.password = password;
  }
  
  public void setUsername(String username)
  {
    this.username = username;
  }
}

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

import java.util.ArrayList;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFileState;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.history.provider.FileHistory;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSFile;

public class CVSFileHistory
  extends FileHistory
{
  public static final int REFRESH_LOCAL = 1;
  public static final int REFRESH_REMOTE = 2;
  public static final int REFRESH_ALL = 3;
  private final ICVSFile cvsFile;
  protected IFileRevision[] revisions;
  protected IFileRevision[] remoteRevisions;
  protected IFileRevision[] localRevisions;
  protected boolean includeLocalRevisions;
  protected boolean includeRemoteRevisions;
  protected boolean includesExists;
  protected boolean refetchRevisions;
  private int flag;
  
  public CVSFileHistory(ICVSFile file)
  {
    Assert.isNotNull(file);
    cvsFile = file;
    includeLocalRevisions = false;
    includeRemoteRevisions = true;
    refetchRevisions = true;
    flag = 0;
  }
  
  public CVSFileHistory(ICVSFile file, int flag)
  {
    Assert.isNotNull(file);
    cvsFile = file;
    includeLocalRevisions = false;
    includeRemoteRevisions = true;
    refetchRevisions = true;
    this.flag = flag;
  }
  
  public IFileRevision[] getFileRevisions()
  {
    if (revisions == null) {
      return new IFileRevision[0];
    }
    return revisions;
  }
  
  /* Error */
  public void refresh(int flags, IProgressMonitor monitor)
    throws org.eclipse.team.core.TeamException
  {
    // Byte code:
    //   0: iload_1
    //   1: iconst_1
    //   2: if_icmpne +9 -> 11
    //   5: aload_0
    //   6: aload_2
    //   7: invokevirtual 346	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:fetchLocalOnly	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   10: return
    //   11: aload_0
    //   12: getfield 319	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:refetchRevisions	Z
    //   15: ifeq +721 -> 736
    //   18: aload_2
    //   19: getstatic 314	org/eclipse/team/internal/ccvs/core/CVSMessages:CVSFileHistory_0	Ljava/lang/String;
    //   22: aload_0
    //   23: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   26: invokeinterface 372 1 0
    //   31: invokestatic 337	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   34: sipush 300
    //   37: invokeinterface 368 3 0
    //   42: aload_0
    //   43: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   46: new 164	org/eclipse/core/runtime/SubProgressMonitor
    //   49: dup
    //   50: aload_2
    //   51: sipush 200
    //   54: invokespecial 336	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   57: invokeinterface 377 2 0
    //   62: astore_3
    //   63: aload_3
    //   64: arraylength
    //   65: ifne +137 -> 202
    //   68: aload_0
    //   69: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   72: invokeinterface 375 1 0
    //   77: astore 4
    //   79: aload 4
    //   81: invokeinterface 378 1 0
    //   86: ifeq +116 -> 202
    //   89: aload 4
    //   91: aload 4
    //   93: invokeinterface 379 2 0
    //   98: astore 5
    //   100: aload 5
    //   102: ifnull +100 -> 202
    //   105: aload 5
    //   107: new 155	java/lang/StringBuffer
    //   110: dup
    //   111: ldc 1
    //   113: invokespecial 327	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   116: aload_0
    //   117: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   120: invokeinterface 371 1 0
    //   125: invokevirtual 328	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   128: invokevirtual 326	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   131: invokevirtual 325	java/lang/String:concat	(Ljava/lang/String;)Ljava/lang/String;
    //   134: astore 6
    //   136: aload_0
    //   137: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   140: invokeinterface 373 1 0
    //   145: invokeinterface 366 1 0
    //   150: invokestatic 338	org/eclipse/team/core/RepositoryProvider:getProvider	(Lorg/eclipse/core/resources/IProject;)Lorg/eclipse/team/core/RepositoryProvider;
    //   153: checkcast 173	org/eclipse/team/internal/ccvs/core/CVSTeamProvider
    //   156: astore 7
    //   158: aload 7
    //   160: ifnull +42 -> 202
    //   163: aload 7
    //   165: invokevirtual 343	org/eclipse/team/internal/ccvs/core/CVSTeamProvider:getCVSWorkspaceRoot	()Lorg/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot;
    //   168: astore 8
    //   170: aload 8
    //   172: invokevirtual 357	org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot:getRemoteLocation	()Lorg/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation;
    //   175: iconst_0
    //   176: invokeinterface 380 2 0
    //   181: invokestatic 344	org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation:fromString	(Ljava/lang/String;)Lorg/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation;
    //   184: astore 9
    //   186: aload 6
    //   188: aload 9
    //   190: invokestatic 359	org/eclipse/team/internal/ccvs/core/resources/RemoteFile:create	(Ljava/lang/String;Lorg/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation;)Lorg/eclipse/team/internal/ccvs/core/resources/RemoteFile;
    //   193: astore 10
    //   195: aload 10
    //   197: aload_2
    //   198: invokevirtual 358	org/eclipse/team/internal/ccvs/core/resources/RemoteFile:getLogEntries	(Lorg/eclipse/core/runtime/IProgressMonitor;)[Lorg/eclipse/team/internal/ccvs/core/ILogEntry;
    //   201: astore_3
    //   202: aload_0
    //   203: getfield 315	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:flag	I
    //   206: iconst_1
    //   207: if_icmpne +104 -> 311
    //   210: aload_0
    //   211: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   214: invokeinterface 376 1 0
    //   219: invokevirtual 360	org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo:getRevision	()Ljava/lang/String;
    //   222: astore 4
    //   224: iconst_0
    //   225: istore 5
    //   227: goto +74 -> 301
    //   230: aload_3
    //   231: iload 5
    //   233: aaload
    //   234: invokeinterface 381 1 0
    //   239: aload 4
    //   241: invokevirtual 324	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   244: ifeq +54 -> 298
    //   247: aload_0
    //   248: iconst_1
    //   249: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   252: dup
    //   253: iconst_0
    //   254: new 181	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision
    //   257: dup
    //   258: aload_3
    //   259: iload 5
    //   261: aaload
    //   262: invokespecial 353	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision:<init>	(Lorg/eclipse/team/internal/ccvs/core/ILogEntry;)V
    //   265: aastore
    //   266: putfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   269: aload_0
    //   270: iconst_1
    //   271: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   274: putfield 322	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:revisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   277: aload_0
    //   278: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   281: iconst_0
    //   282: aload_0
    //   283: getfield 322	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:revisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   286: iconst_0
    //   287: aload_0
    //   288: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   291: arraylength
    //   292: invokestatic 329	java/lang/System:arraycopy	(Ljava/lang/Object;ILjava/lang/Object;II)V
    //   295: goto +432 -> 727
    //   298: iinc 5 1
    //   301: iload 5
    //   303: aload_3
    //   304: arraylength
    //   305: if_icmplt -75 -> 230
    //   308: goto +419 -> 727
    //   311: aload_0
    //   312: getfield 315	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:flag	I
    //   315: iconst_2
    //   316: if_icmpne +235 -> 551
    //   319: aload_0
    //   320: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   323: invokeinterface 376 1 0
    //   328: invokevirtual 361	org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo:getTag	()Lorg/eclipse/team/internal/ccvs/core/CVSTag;
    //   331: astore 4
    //   333: new 157	java/util/ArrayList
    //   336: dup
    //   337: invokespecial 331	java/util/ArrayList:<init>	()V
    //   340: astore 5
    //   342: iconst_0
    //   343: istore 6
    //   345: goto +104 -> 449
    //   348: aload_3
    //   349: iload 6
    //   351: aaload
    //   352: invokeinterface 382 1 0
    //   357: astore 7
    //   359: iconst_0
    //   360: istore 8
    //   362: goto +76 -> 438
    //   365: aload 7
    //   367: iload 8
    //   369: aaload
    //   370: invokevirtual 341	org/eclipse/team/internal/ccvs/core/CVSTag:getType	()I
    //   373: aload 4
    //   375: invokevirtual 341	org/eclipse/team/internal/ccvs/core/CVSTag:getType	()I
    //   378: if_icmpne +57 -> 435
    //   381: aload 4
    //   383: invokevirtual 341	org/eclipse/team/internal/ccvs/core/CVSTag:getType	()I
    //   386: iconst_1
    //   387: if_icmpne +35 -> 422
    //   390: aload 4
    //   392: invokevirtual 342	org/eclipse/team/internal/ccvs/core/CVSTag:getName	()Ljava/lang/String;
    //   395: aload 7
    //   397: iload 8
    //   399: aaload
    //   400: invokevirtual 342	org/eclipse/team/internal/ccvs/core/CVSTag:getName	()Ljava/lang/String;
    //   403: invokevirtual 324	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   406: ifeq +16 -> 422
    //   409: aload 5
    //   411: aload_3
    //   412: iload 6
    //   414: aaload
    //   415: invokevirtual 332	java/util/ArrayList:add	(Ljava/lang/Object;)Z
    //   418: pop
    //   419: goto +27 -> 446
    //   422: aload 5
    //   424: aload_3
    //   425: iload 6
    //   427: aaload
    //   428: invokevirtual 332	java/util/ArrayList:add	(Ljava/lang/Object;)Z
    //   431: pop
    //   432: goto +14 -> 446
    //   435: iinc 8 1
    //   438: iload 8
    //   440: aload 7
    //   442: arraylength
    //   443: if_icmplt -78 -> 365
    //   446: iinc 6 1
    //   449: iload 6
    //   451: aload_3
    //   452: arraylength
    //   453: if_icmplt -105 -> 348
    //   456: aload_0
    //   457: aload 5
    //   459: invokevirtual 330	java/util/ArrayList:size	()I
    //   462: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   465: putfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   468: aload 5
    //   470: invokevirtual 333	java/util/ArrayList:iterator	()Ljava/util/Iterator;
    //   473: astore 6
    //   475: iconst_0
    //   476: istore 7
    //   478: goto +30 -> 508
    //   481: aload_0
    //   482: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   485: iload 7
    //   487: iinc 7 1
    //   490: new 181	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision
    //   493: dup
    //   494: aload 6
    //   496: invokeinterface 363 1 0
    //   501: checkcast 177	org/eclipse/team/internal/ccvs/core/ILogEntry
    //   504: invokespecial 353	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision:<init>	(Lorg/eclipse/team/internal/ccvs/core/ILogEntry;)V
    //   507: aastore
    //   508: aload 6
    //   510: invokeinterface 362 1 0
    //   515: ifne -34 -> 481
    //   518: aload_0
    //   519: aload_0
    //   520: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   523: arraylength
    //   524: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   527: putfield 322	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:revisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   530: aload_0
    //   531: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   534: iconst_0
    //   535: aload_0
    //   536: getfield 322	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:revisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   539: iconst_0
    //   540: aload_0
    //   541: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   544: arraylength
    //   545: invokestatic 329	java/lang/System:arraycopy	(Ljava/lang/Object;ILjava/lang/Object;II)V
    //   548: goto +179 -> 727
    //   551: aload_0
    //   552: iconst_0
    //   553: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   556: putfield 320	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:localRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   559: aload_0
    //   560: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   563: invokeinterface 373 1 0
    //   568: astore 4
    //   570: aload_0
    //   571: iconst_0
    //   572: putfield 318	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:includesExists	Z
    //   575: aload 4
    //   577: ifnull +81 -> 658
    //   580: aload 4
    //   582: instanceof 159
    //   585: ifeq +73 -> 658
    //   588: aload 4
    //   590: checkcast 159	org/eclipse/core/resources/IFile
    //   593: new 164	org/eclipse/core/runtime/SubProgressMonitor
    //   596: dup
    //   597: aload_2
    //   598: bipush 100
    //   600: invokespecial 336	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   603: invokeinterface 365 2 0
    //   608: astore 5
    //   610: aload_0
    //   611: aload_0
    //   612: aload 5
    //   614: new 164	org/eclipse/core/runtime/SubProgressMonitor
    //   617: dup
    //   618: aload_2
    //   619: bipush 100
    //   621: invokespecial 336	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   624: invokespecial 348	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:convertToFileRevision	([Lorg/eclipse/core/resources/IFileState;Lorg/eclipse/core/runtime/IProgressMonitor;)[Lorg/eclipse/team/core/history/IFileRevision;
    //   627: putfield 320	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:localRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   630: aload_0
    //   631: aload_0
    //   632: getfield 320	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:localRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   635: arraylength
    //   636: ifle +7 -> 643
    //   639: iconst_1
    //   640: goto +4 -> 644
    //   643: iconst_0
    //   644: putfield 318	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:includesExists	Z
    //   647: goto +11 -> 658
    //   650: astore 6
    //   652: aload 6
    //   654: invokestatic 339	org/eclipse/team/core/TeamException:asTeamException	(Lorg/eclipse/core/runtime/CoreException;)Lorg/eclipse/team/core/TeamException;
    //   657: pop
    //   658: aload_0
    //   659: aload_3
    //   660: arraylength
    //   661: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   664: putfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   667: iconst_0
    //   668: istore 5
    //   670: goto +24 -> 694
    //   673: aload_0
    //   674: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   677: iload 5
    //   679: new 181	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision
    //   682: dup
    //   683: aload_3
    //   684: iload 5
    //   686: aaload
    //   687: invokespecial 353	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileRevision:<init>	(Lorg/eclipse/team/internal/ccvs/core/ILogEntry;)V
    //   690: aastore
    //   691: iinc 5 1
    //   694: iload 5
    //   696: aload_3
    //   697: arraylength
    //   698: if_icmplt -25 -> 673
    //   701: aload_0
    //   702: iconst_0
    //   703: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   706: putfield 322	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:revisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   709: aload_0
    //   710: invokespecial 345	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:arrangeRevisions	()V
    //   713: goto +14 -> 727
    //   716: astore 11
    //   718: aload_2
    //   719: invokeinterface 367 1 0
    //   724: aload 11
    //   726: athrow
    //   727: aload_2
    //   728: invokeinterface 367 1 0
    //   733: goto +7 -> 740
    //   736: aload_0
    //   737: invokespecial 345	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:arrangeRevisions	()V
    //   740: return
    // Line number table:
    //   Java source line #90	-> byte code offset #0
    //   Java source line #91	-> byte code offset #5
    //   Java source line #92	-> byte code offset #10
    //   Java source line #95	-> byte code offset #11
    //   Java source line #96	-> byte code offset #18
    //   Java source line #98	-> byte code offset #42
    //   Java source line #99	-> byte code offset #46
    //   Java source line #98	-> byte code offset #62
    //   Java source line #101	-> byte code offset #63
    //   Java source line #103	-> byte code offset #68
    //   Java source line #104	-> byte code offset #79
    //   Java source line #105	-> byte code offset #89
    //   Java source line #106	-> byte code offset #100
    //   Java source line #107	-> byte code offset #105
    //   Java source line #109	-> byte code offset #136
    //   Java source line #110	-> byte code offset #158
    //   Java source line #111	-> byte code offset #163
    //   Java source line #112	-> byte code offset #170
    //   Java source line #113	-> byte code offset #186
    //   Java source line #114	-> byte code offset #195
    //   Java source line #120	-> byte code offset #202
    //   Java source line #121	-> byte code offset #210
    //   Java source line #122	-> byte code offset #224
    //   Java source line #123	-> byte code offset #230
    //   Java source line #124	-> byte code offset #247
    //   Java source line #125	-> byte code offset #269
    //   Java source line #127	-> byte code offset #277
    //   Java source line #128	-> byte code offset #295
    //   Java source line #122	-> byte code offset #298
    //   Java source line #132	-> byte code offset #311
    //   Java source line #133	-> byte code offset #319
    //   Java source line #134	-> byte code offset #333
    //   Java source line #135	-> byte code offset #342
    //   Java source line #136	-> byte code offset #348
    //   Java source line #137	-> byte code offset #359
    //   Java source line #138	-> byte code offset #365
    //   Java source line #139	-> byte code offset #381
    //   Java source line #140	-> byte code offset #409
    //   Java source line #141	-> byte code offset #419
    //   Java source line #143	-> byte code offset #422
    //   Java source line #144	-> byte code offset #432
    //   Java source line #137	-> byte code offset #435
    //   Java source line #135	-> byte code offset #446
    //   Java source line #152	-> byte code offset #456
    //   Java source line #153	-> byte code offset #468
    //   Java source line #154	-> byte code offset #475
    //   Java source line #155	-> byte code offset #478
    //   Java source line #156	-> byte code offset #481
    //   Java source line #155	-> byte code offset #508
    //   Java source line #160	-> byte code offset #518
    //   Java source line #161	-> byte code offset #530
    //   Java source line #164	-> byte code offset #551
    //   Java source line #166	-> byte code offset #559
    //   Java source line #167	-> byte code offset #570
    //   Java source line #168	-> byte code offset #575
    //   Java source line #172	-> byte code offset #588
    //   Java source line #173	-> byte code offset #610
    //   Java source line #174	-> byte code offset #630
    //   Java source line #175	-> byte code offset #650
    //   Java source line #176	-> byte code offset #652
    //   Java source line #181	-> byte code offset #658
    //   Java source line #182	-> byte code offset #667
    //   Java source line #183	-> byte code offset #673
    //   Java source line #182	-> byte code offset #691
    //   Java source line #186	-> byte code offset #701
    //   Java source line #187	-> byte code offset #709
    //   Java source line #189	-> byte code offset #716
    //   Java source line #190	-> byte code offset #718
    //   Java source line #191	-> byte code offset #724
    //   Java source line #190	-> byte code offset #727
    //   Java source line #194	-> byte code offset #736
    //   Java source line #197	-> byte code offset #740
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	741	0	this	CVSFileHistory
    //   0	741	1	flags	int
    //   0	741	2	monitor	IProgressMonitor
    //   62	635	3	entries	org.eclipse.team.internal.ccvs.core.ILogEntry[]
    //   77	15	4	folder	org.eclipse.team.internal.ccvs.core.ICVSFolder
    //   222	18	4	revisionNumber	String
    //   331	60	4	tempTag	org.eclipse.team.internal.ccvs.core.CVSTag
    //   568	21	4	localResource	org.eclipse.core.resources.IResource
    //   98	8	5	remoteFolderLocation	String
    //   225	77	5	i	int
    //   340	129	5	entriesOfInterest	ArrayList
    //   608	5	5	localHistoryState	IFileState[]
    //   668	27	5	i	int
    //   134	53	6	remoteFileName	String
    //   343	107	6	i	int
    //   473	36	6	iter	java.util.Iterator
    //   650	3	6	e	org.eclipse.core.runtime.CoreException
    //   156	8	7	pro	org.eclipse.team.internal.ccvs.core.CVSTeamProvider
    //   357	84	7	tags	org.eclipse.team.internal.ccvs.core.CVSTag[]
    //   476	10	7	i	int
    //   168	3	8	root	org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot
    //   360	79	8	j	int
    //   184	5	9	location	org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation
    //   193	3	10	remFile	org.eclipse.team.internal.ccvs.core.resources.RemoteFile
    //   716	9	11	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   588	647	650	org/eclipse/core/runtime/CoreException
    //   42	716	716	finally
  }
  
  private void arrangeRevisions()
  {
    if (revisions != null) {
      if ((includeLocalRevisions) && (includeRemoteRevisions))
      {
        revisions = new IFileRevision[remoteRevisions.length + localRevisions.length];
        
        System.arraycopy(remoteRevisions, 0, revisions, 0, remoteRevisions.length);
        
        System.arraycopy(localRevisions, 0, revisions, remoteRevisions.length, localRevisions.length);
      }
      else if (includeLocalRevisions)
      {
        revisions = new IFileRevision[localRevisions.length];
        
        System.arraycopy(localRevisions, 0, revisions, 0, localRevisions.length);
      }
      else if (includeRemoteRevisions)
      {
        revisions = new IFileRevision[remoteRevisions.length];
        
        System.arraycopy(remoteRevisions, 0, revisions, 0, remoteRevisions.length);
      }
    }
  }
  
  public IFileRevision getFileRevision(String id)
  {
    IFileRevision[] revisions = getFileRevisions();
    for (int i = 0; i < revisions.length; i++) {
      if (revisions[i].getContentIdentifier().equals(id)) {
        return revisions[i];
      }
    }
    return null;
  }
  
  public IFileRevision[] getContributors(IFileRevision revision)
  {
    IFileRevision[] revisions = getFileRevisions();
    
    IFileRevision fileRevision = null;
    for (int i = 0; i < revisions.length; i++) {
      if (((CVSFileRevision)revisions[i]).isPredecessorOf(revision))
      {
        if (fileRevision == null) {
          fileRevision = revisions[i];
        }
        if (revisions[i].getTimestamp() > fileRevision.getTimestamp()) {
          fileRevision = revisions[i];
        }
      }
    }
    if (fileRevision == null) {
      return new IFileRevision[0];
    }
    return new IFileRevision[] { fileRevision };
  }
  
  public IFileRevision[] getTargets(IFileRevision revision)
  {
    IFileRevision[] revisions = getFileRevisions();
    
    ArrayList directDescendents = new ArrayList();
    for (int i = 0; i < revisions.length; i++) {
      if (((CVSFileRevision)revisions[i]).isDescendentOf(revision)) {
        directDescendents.add(revisions[i]);
      }
    }
    return (IFileRevision[])directDescendents.toArray(new IFileRevision[directDescendents.size()]);
  }
  
  private IFileRevision[] convertToFileRevision(IFileState[] localRevisions, IProgressMonitor monitor)
  {
    boolean modified = false;
    try
    {
      modified = cvsFile.isModified(monitor);
    }
    catch (CVSException localCVSException) {}
    IFile localFile = (IFile)cvsFile.getIResource();
    boolean localFileExists = (localFile != null) && (localFile.exists());
    int arrayLength = 0;
    if ((modified) && (localFileExists)) {
      arrayLength++;
    }
    arrayLength += localRevisions.length;
    
    IFileRevision[] fileRevisions = new IFileRevision[arrayLength];
    for (int i = 0; i < localRevisions.length; i++)
    {
      IFileState localFileState = localRevisions[i];
      CVSLocalFileRevision localRevision = new CVSLocalFileRevision(localFileState);
      fileRevisions[i] = localRevision;
    }
    if ((modified) && (localFileExists))
    {
      CVSLocalFileRevision currentFile = new CVSLocalFileRevision(localFile);
      CVSFileHistoryProvider provider = new CVSFileHistoryProvider();
      currentFile.setBaseRevision(provider.getWorkspaceFileRevision(localFile));
      fileRevisions[localRevisions.length] = currentFile;
    }
    return fileRevisions;
  }
  
  public void includeLocalRevisions(boolean flag)
  {
    includeLocalRevisions = flag;
  }
  
  public boolean getIncludesExists()
  {
    return includesExists;
  }
  
  public void setRefetchRevisions(boolean refetch)
  {
    refetchRevisions = refetch;
  }
  
  public void includeRemoteRevisions(boolean flag)
  {
    includeRemoteRevisions = flag;
  }
  
  /* Error */
  public void fetchLocalOnly(IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: iconst_0
    //   2: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   5: putfield 320	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:localRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   8: aload_0
    //   9: getfield 323	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:cvsFile	Lorg/eclipse/team/internal/ccvs/core/ICVSFile;
    //   12: invokeinterface 373 1 0
    //   17: astore_2
    //   18: aload_0
    //   19: iconst_0
    //   20: putfield 318	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:includesExists	Z
    //   23: aload_2
    //   24: ifnull +66 -> 90
    //   27: aload_2
    //   28: instanceof 159
    //   31: ifeq +59 -> 90
    //   34: aload_2
    //   35: checkcast 159	org/eclipse/core/resources/IFile
    //   38: new 164	org/eclipse/core/runtime/SubProgressMonitor
    //   41: dup
    //   42: aload_1
    //   43: bipush 100
    //   45: invokespecial 336	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   48: invokeinterface 365 2 0
    //   53: astore_3
    //   54: aload_0
    //   55: aload_0
    //   56: aload_3
    //   57: new 164	org/eclipse/core/runtime/SubProgressMonitor
    //   60: dup
    //   61: aload_1
    //   62: bipush 100
    //   64: invokespecial 336	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   67: invokespecial 348	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:convertToFileRevision	([Lorg/eclipse/core/resources/IFileState;Lorg/eclipse/core/runtime/IProgressMonitor;)[Lorg/eclipse/team/core/history/IFileRevision;
    //   70: putfield 320	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:localRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   73: aload_0
    //   74: aload_0
    //   75: getfield 320	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:localRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   78: arraylength
    //   79: ifle +7 -> 86
    //   82: iconst_1
    //   83: goto +4 -> 87
    //   86: iconst_0
    //   87: putfield 318	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:includesExists	Z
    //   90: aload_0
    //   91: getfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   94: ifnonnull +11 -> 105
    //   97: aload_0
    //   98: iconst_0
    //   99: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   102: putfield 321	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:remoteRevisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   105: aload_0
    //   106: iconst_0
    //   107: anewarray 168	org/eclipse/team/core/history/IFileRevision
    //   110: putfield 322	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:revisions	[Lorg/eclipse/team/core/history/IFileRevision;
    //   113: aload_0
    //   114: invokespecial 345	org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory:arrangeRevisions	()V
    //   117: goto +24 -> 141
    //   120: pop
    //   121: aload_1
    //   122: invokeinterface 367 1 0
    //   127: goto +20 -> 147
    //   130: astore 4
    //   132: aload_1
    //   133: invokeinterface 367 1 0
    //   138: aload 4
    //   140: athrow
    //   141: aload_1
    //   142: invokeinterface 367 1 0
    //   147: return
    // Line number table:
    //   Java source line #320	-> byte code offset #0
    //   Java source line #322	-> byte code offset #8
    //   Java source line #323	-> byte code offset #18
    //   Java source line #324	-> byte code offset #23
    //   Java source line #326	-> byte code offset #34
    //   Java source line #327	-> byte code offset #54
    //   Java source line #328	-> byte code offset #73
    //   Java source line #331	-> byte code offset #90
    //   Java source line #332	-> byte code offset #97
    //   Java source line #333	-> byte code offset #105
    //   Java source line #334	-> byte code offset #113
    //   Java source line #335	-> byte code offset #120
    //   Java source line #339	-> byte code offset #121
    //   Java source line #338	-> byte code offset #130
    //   Java source line #339	-> byte code offset #132
    //   Java source line #340	-> byte code offset #138
    //   Java source line #339	-> byte code offset #141
    //   Java source line #341	-> byte code offset #147
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	148	0	this	CVSFileHistory
    //   0	148	1	monitor	IProgressMonitor
    //   17	18	2	localResource	org.eclipse.core.resources.IResource
    //   53	4	3	localHistoryState	IFileState[]
    //   130	9	4	localObject	Object
    //   120	1	5	localCoreException	org.eclipse.core.runtime.CoreException
    // Exception table:
    //   from	to	target	type
    //   0	117	120	org/eclipse/core/runtime/CoreException
    //   0	121	130	finally
  }
  
  public boolean isInitialized()
  {
    return revisions != null;
  }
  
  public boolean isIncludeLocal()
  {
    return includeLocalRevisions;
  }
}

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

import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.history.IFileHistory;
import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.history.provider.FileHistoryProvider;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.ICVSFile;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
import org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry;
import org.eclipse.team.internal.ccvs.core.filesystem.CVSFileStore;
import org.eclipse.team.internal.ccvs.core.filesystem.CVSURI;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;

public class CVSFileHistoryProvider
  extends FileHistoryProvider
{
  public IFileHistory getFileHistoryFor(IResource resource, int flags, IProgressMonitor monitor)
  {
    try
    {
      monitor.beginTask(null, 100);
      CVSFileHistory localCVSFileHistory1;
      if ((flags == 1) || (flags == 2))
      {
        ICVSRemoteResource remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(resource);
        monitor.worked(40);
        CVSFileHistory remoteFile = null;
        if ((remoteResource instanceof ICVSFile))
        {
          remoteFile = new CVSFileHistory((ICVSFile)remoteResource, flags);
          remoteFile.refresh(3, monitor);
        }
        return remoteFile;
      }
      ICVSRemoteResource remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(resource);
      monitor.worked(40);
      CVSFileHistory remoteFile = null;
      if ((remoteResource instanceof ICVSFile))
      {
        remoteFile = new CVSFileHistory((ICVSFile)remoteResource);
        remoteFile.refresh(3, monitor);
      }
      return remoteFile;
    }
    catch (CVSException localCVSException) {}catch (TeamException localTeamException) {}finally
    {
      monitor.done();
    }
    return null;
  }
  
  public IFileRevision getWorkspaceFileRevision(IResource resource)
  {
    try
    {
      ICVSRemoteResource remoteResource = CVSWorkspaceRoot.getRemoteResourceFor(resource);
      if ((remoteResource != null) && 
        ((remoteResource instanceof RemoteFile)))
      {
        ResourceSyncInfo syncInfo = remoteResource.getSyncInfo();
        LogEntry cvsEntry = new LogEntry((RemoteFile)remoteResource, syncInfo.getRevision(), "", null, "", "", new CVSTag[0], new CVSTag[0]);
        return new CVSFileRevision(cvsEntry);
      }
    }
    catch (CVSException localCVSException) {}
    return null;
  }
  
  public IFileHistory getFileHistoryFor(IFileStore store, int flags, IProgressMonitor monitor)
  {
    if ((store instanceof CVSFileStore))
    {
      CVSFileStore fileStore = (CVSFileStore)store;
      ICVSRemoteFile file = fileStore.getCVSURI().toFile();
      if (file != null) {
        try
        {
          if ((flags == 1) || (flags == 2))
          {
            CVSFileHistory history = new CVSFileHistory(file, flags);
            history.refresh(3, monitor);
            return history;
          }
          CVSFileHistory history = new CVSFileHistory(file);
          history.refresh(3, monitor);
          return history;
        }
        catch (TeamException localTeamException) {}
      }
    }
    return null;
  }
}

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

import java.net.URI;
import java.util.Date;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.history.ITag;
import org.eclipse.team.core.history.provider.FileRevision;
import org.eclipse.team.core.variants.IResourceVariant;
import org.eclipse.team.internal.ccvs.core.ICVSFile;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
import org.eclipse.team.internal.ccvs.core.ILogEntry;
import org.eclipse.team.internal.ccvs.core.filesystem.CVSURI;
import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;

public class CVSFileRevision
  extends FileRevision
  implements IAdaptable
{
  protected ILogEntry entry;
  
  public CVSFileRevision(ILogEntry entry)
  {
    this.entry = entry;
  }
  
  public long getTimestamp()
  {
    return entry.getDate().getTime();
  }
  
  public String getAuthor()
  {
    return entry.getAuthor();
  }
  
  public String getComment()
  {
    return entry.getComment();
  }
  
  public boolean isPredecessorOf(IFileRevision revision)
  {
    long compareRevisionTime = revision.getTimestamp();
    return getTimestamp() < compareRevisionTime;
  }
  
  public boolean isDescendentOf(IFileRevision revision)
  {
    long compareRevisionTime = revision.getTimestamp();
    return getTimestamp() > compareRevisionTime;
  }
  
  public IStorage getStorage(IProgressMonitor monitor)
    throws TeamException
  {
    RemoteFile remoteFile = (RemoteFile)entry.getRemoteFile();
    return remoteFile.getStorage(monitor);
  }
  
  public String getName()
  {
    return entry.getRemoteFile().getName();
  }
  
  public String getC
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