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

f merge+" + CVSDateFormatter.dateToEntryLine(timeStamp); break;
          case 4: 
            entryLineTimestamp = "restored+" + CVSDateFormatter.dateToEntryLine(timeStamp);
          }
        }
        result.append(entryLineTimestamp);
      }
      result.append("/");
      if (keywordMode != null) {
        result.append(keywordMode.toEntryLineMode());
      }
      result.append("/");
      if (tag != null) {
        result.append(tag.toEntryLineFormat(true));
      }
    }
    return result.toString();
  }
  
  public byte[] getBytes()
  {
    return getEntryLine().getBytes();
  }
  
  public static String getName(byte[] syncBytes)
    throws CVSException
  {
    String name = Util.getSubstring(syncBytes, (byte)47, 1, false);
    if (name == null) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    return name;
  }
  
  public static Command.KSubstOption getKeywordMode(byte[] syncBytes)
    throws CVSException
  {
    String mode = Util.getSubstring(syncBytes, (byte)47, 4, false);
    if (mode == null) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    return Command.KSubstOption.fromMode(mode);
  }
  
  public static byte[] setKeywordMode(byte[] syncBytes, Command.KSubstOption mode)
    throws CVSException
  {
    return setKeywordMode(syncBytes, mode.toEntryLineMode().getBytes());
  }
  
  public static byte[] setKeywordMode(byte[] syncBytes, byte[] modeBytes)
    throws CVSException
  {
    return setSlot(syncBytes, 4, modeBytes);
  }
  
  public static boolean isBinary(byte[] syncBytes)
    throws CVSException
  {
    if (syncBytes == null) {
      return false;
    }
    String mode = Util.getSubstring(syncBytes, (byte)47, 4, false);
    if (mode == null) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    return "-kb".equals(mode);
  }
  
  public static boolean isFolder(byte[] syncBytes)
  {
    return (syncBytes.length > 0) && (syncBytes[0] == 68);
  }
  
  public static boolean isAddition(byte[] syncBytes)
    throws CVSException
  {
    int start = startOfSlot(syncBytes, 2);
    if ((start == -1) || (start > syncBytes.length - 3)) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    return (syncBytes[(start + 1)] == 48) && (syncBytes[(start + 2)] != 46);
  }
  
  public static boolean isDeletion(byte[] syncBytes)
    throws CVSException
  {
    int start = startOfSlot(syncBytes, 2);
    if ((start == -1) || (start >= syncBytes.length)) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    return syncBytes[(start + 1)] == 45;
  }
  
  public static byte[] convertToDeletion(byte[] syncBytes)
    throws CVSException
  {
    int index = startOfSlot(syncBytes, 2);
    if (index == -1) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    if ((syncBytes.length > index) && (syncBytes[(index + 1)] != 45))
    {
      byte[] newSyncBytes = new byte[syncBytes.length + 1];
      System.arraycopy(syncBytes, 0, newSyncBytes, 0, index + 1);
      newSyncBytes[(index + 1)] = 45;
      System.arraycopy(syncBytes, index + 1, newSyncBytes, index + 2, syncBytes.length - index - 1);
      return newSyncBytes;
    }
    return syncBytes;
  }
  
  public static byte[] convertFromDeletion(byte[] syncBytes)
    throws CVSException
  {
    int index = startOfSlot(syncBytes, 2);
    if (index == -1) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    if ((syncBytes.length > index) && (syncBytes[(index + 1)] == 45))
    {
      byte[] newSyncBytes = new byte[syncBytes.length - 1];
      System.arraycopy(syncBytes, 0, newSyncBytes, 0, index + 1);
      System.arraycopy(syncBytes, index + 2, newSyncBytes, index + 1, newSyncBytes.length - index - 1);
      
      String syncTimestamp = Util.getSubstring(syncBytes, (byte)47, 
        3, false);
      if (getSyncType(new String(syncTimestamp)) == 1)
      {
        syncTimestamp = "restored+" + syncTimestamp;
        byte[] oldSyncBytes = newSyncBytes;
        newSyncBytes = new byte[oldSyncBytes.length + 
          "restored+".length()];
        System.arraycopy(oldSyncBytes, 0, newSyncBytes, 0, 
          startOfSlot(oldSyncBytes, 3) + 1);
        System.arraycopy(syncTimestamp.getBytes(), 0, newSyncBytes, 
          startOfSlot(oldSyncBytes, 3) + 1, 
          syncTimestamp.length());
        System.arraycopy(oldSyncBytes, 
          startOfSlot(oldSyncBytes, 4) - 1, newSyncBytes, 
          startOfSlot(oldSyncBytes, 3) + syncTimestamp.length(), 
          oldSyncBytes.length - (
          startOfSlot(oldSyncBytes, 4) - 1));
      }
      return newSyncBytes;
    }
    return syncBytes;
  }
  
  private static int startOfSlot(byte[] syncBytes, int slot)
  {
    int count = 0;
    for (int j = 0; j < syncBytes.length; j++) {
      if (syncBytes[j] == 47)
      {
        count++;
        if (count == slot) {
          return j;
        }
      }
    }
    return -1;
  }
  
  public static byte[] setSlot(byte[] syncBytes, int slot, byte[] newBytes)
    throws CVSException
  {
    int start = startOfSlot(syncBytes, slot);
    if (start == -1) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    int end = startOfSlot(syncBytes, slot + 1);
    int totalLength = start + 1 + newBytes.length;
    if (end != -1) {
      totalLength += syncBytes.length - end;
    }
    byte[] result = new byte[totalLength];
    System.arraycopy(syncBytes, 0, result, 0, start + 1);
    System.arraycopy(newBytes, 0, result, start + 1, newBytes.length);
    if (end != -1) {
      System.arraycopy(syncBytes, end, result, start + 1 + newBytes.length, syncBytes.length - end);
    }
    return result;
  }
  
  public static String getTimestampToServer(byte[] syncBytes, Date fileTimestamp)
    throws CVSException
  {
    if (fileTimestamp != null)
    {
      String syncTimestamp = Util.getSubstring(syncBytes, (byte)47, 3, false);
      if (syncTimestamp == null) {
        throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
      }
      int syncType = getSyncType(syncTimestamp);
      if (syncType == 4) {
        return syncTimestamp.substring(syncTimestamp.indexOf("+") + 1);
      }
      if (syncType != 1)
      {
        if ((syncType == 3) && (fileTimestamp.equals(getTimestamp(syncTimestamp)))) {
          return "+=";
        }
        return "+modified";
      }
    }
    return null;
  }
  
  private static Date getTimestamp(String syncTimestamp)
  {
    String dateString = syncTimestamp;
    if (syncTimestamp.indexOf("+modified") != -1) {
      dateString = null;
    } else if (syncTimestamp.indexOf("+=") != -1) {
      dateString = null;
    } else if (syncTimestamp.indexOf("Result of merge+") != -1) {
      dateString = syncTimestamp.substring(syncTimestamp.indexOf("+") + 1);
    } else if (syncTimestamp.indexOf("Result of merge") != -1) {
      dateString = null;
    }
    if ((dateString == null) || ("".equals(dateString))) {
      return null;
    }
    try
    {
      return CVSDateFormatter.entryLineToDate(dateString);
    }
    catch (ParseException localParseException) {}
    return null;
  }
  
  private static int getSyncType(String date)
  {
    if (date.indexOf("+modified") != -1) {
      return 2;
    }
    if (date.indexOf("+=") != -1) {
      return 3;
    }
    if (date.indexOf("Result of merge+") != -1) {
      return 3;
    }
    if (date.indexOf("Result of merge") != -1) {
      return 2;
    }
    if (date.indexOf("restored+") != -1) {
      return 4;
    }
    return 1;
  }
  
  public static byte[] getTagBytes(byte[] syncBytes)
    throws CVSException
  {
    byte[] tag = Util.getBytesForSlot(syncBytes, (byte)47, 5, true);
    if (tag == null) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    return tag;
  }
  
  public static byte[] setTag(byte[] syncBytes, byte[] tagBytes)
    throws CVSException
  {
    return setSlot(syncBytes, 5, tagBytes);
  }
  
  public static byte[] setTag(byte[] syncBytes, CVSTag tag)
    throws CVSException
  {
    CVSEntryLineTag entryTag;
    CVSEntryLineTag entryTag;
    if ((tag instanceof CVSEntryLineTag)) {
      entryTag = (CVSEntryLineTag)tag;
    } else {
      entryTag = new CVSEntryLineTag(tag);
    }
    return setTag(syncBytes, entryTag.toEntryLineFormat(true).getBytes());
  }
  
  public static String getRevision(byte[] syncBytes)
    throws CVSException
  {
    String revision = Util.getSubstring(syncBytes, (byte)47, 2, false);
    if (revision == null) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    if (revision.startsWith("-")) {
      revision = revision.substring("-".length());
    }
    revision = revision.replaceFirst("\\slocked by.+$", "");
    return revision;
  }
  
  public static byte[] setRevision(byte[] syncBytes, String revision)
    throws CVSException
  {
    return setSlot(syncBytes, 2, revision.getBytes());
  }
  
  public static boolean isMerge(byte[] syncBytes)
    throws CVSException
  {
    String timestamp = Util.getSubstring(syncBytes, (byte)47, 3, false);
    if (timestamp == null) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    int syncType = getSyncType(timestamp);
    return (syncType == 2) || (syncType == 3);
  }
  
  public static boolean wasDeleted(byte[] syncBytes)
    throws CVSException
  {
    String timestamp = Util.getSubstring(syncBytes, (byte)47, 3, 
      false);
    if (timestamp == null) {
      throw new CVSException(NLS.bind(
        CVSMessages.ResourceSyncInfo_malformedSyncBytes, 
        new String[] { new String(syncBytes) }));
    }
    int syncType = getSyncType(timestamp);
    return syncType == 4;
  }
  
  public static boolean isMergedWithConflicts(byte[] syncBytes)
    throws CVSException
  {
    String timestamp = Util.getSubstring(syncBytes, (byte)47, 3, false);
    if (timestamp == null) {
      throw new CVSException(NLS.bind(CVSMessages.ResourceSyncInfo_malformedSyncBytes, new String[] { new String(syncBytes) }));
    }
    int syncType = getSyncType(timestamp);
    return syncType == 3;
  }
  
  public static boolean isLaterRevisionOnSameBranch(byte[] remoteBytes, byte[] localBytes)
    throws CVSException
  {
    if (remoteBytes == localBytes) {
      return false;
    }
    byte[] remoteTag = getTagBytes(remoteBytes);
    byte[] localTag = getTagBytes(localBytes);
    if (!Util.equals(remoteTag, localTag)) {
      return false;
    }
    String remoteRevision = getRevision(remoteBytes);
    String localRevision = getRevision(localBytes);
    if (remoteRevision.equals(localRevision)) {
      return false;
    }
    return isLaterRevision(remoteRevision, localRevision);
  }
  
  public static boolean isLaterRevision(String remoteRevision, String localRevision)
  {
    int[] localDigits = Util.convertToDigits(localRevision);
    if (localDigits.length == 0) {
      return false;
    }
    int[] remoteDigits = Util.convertToDigits(remoteRevision);
    if (remoteDigits.length == 0) {
      return false;
    }
    if (localRevision.equals("0")) {
      return remoteDigits.length >= 2;
    }
    if (localDigits.length < remoteDigits.length)
    {
      for (int i = 0; i < localDigits.length; i++)
      {
        int localDigit = localDigits[i];
        int remoteDigit = remoteDigits[i];
        if (remoteDigit != localDigit) {
          return false;
        }
      }
      return true;
    }
    for (int i = 0; i < remoteDigits.length - 1; i++)
    {
      int localDigit = localDigits[i];
      int remoteDigit = remoteDigits[i];
      if (remoteDigit != localDigit) {
        return false;
      }
    }
    return localDigits[(remoteDigits.length - 1)] < remoteDigits[(remoteDigits.length - 1)];
  }
}

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

import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSMessages;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;

class BuildCleanupListener$1
  implements ICVSRunnable
{
  final BuildCleanupListener this$0;
  private final IResourceDelta val$delta;
  
  BuildCleanupListener$1(BuildCleanupListener paramBuildCleanupListener, IResourceDelta paramIResourceDelta)
  {
    this$0 = paramBuildCleanupListener;val$delta = paramIResourceDelta;
  }
  
  public void run(IProgressMonitor monitor)
    throws CVSException
  {
    try
    {
      val$delta.accept(this$0);
    }
    catch (CoreException e)
    {
      Util.logError(CVSMessages.ResourceDeltaVisitor_visitError, e);
    }
  }
}

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

import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSMessages;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;

public class BuildCleanupListener
  implements IResourceDeltaVisitor, IResourceChangeListener
{
  public static IResource getResourceFor(IProject container, IResource destination, IPath originating)
  {
    switch (destination.getType())
    {
    case 1: 
      return container.getFile(originating);
    case 2: 
      return container.getFolder(originating);
    case 4: 
      return ResourcesPlugin.getWorkspace().getRoot().getProject(originating.toString());
    }
    return destination;
  }
  
  public boolean visit(IResourceDelta delta)
    throws CoreException
  {
    IResource resource = delta.getResource();
    boolean movedFrom = (delta.getFlags() & 0x1000) > 0;
    switch (delta.getKind())
    {
    case 1: 
      if (resource.exists())
      {
        if (EclipseSynchronizer.getInstance().wasPhantom(resource)) {
          EclipseSynchronizer.getInstance().resourcesRecreated(new IResource[] { resource }, null);
        }
        if (resource.getType() == 2) {
          if (resource.getName().equals("CVS")) {
            handleOrphanedSubtree(resource.getParent());
          } else {
            handleOrphanedSubtree((IContainer)resource);
          }
        }
      }
      break;
    case 4: 
      if ((movedFrom) && (resource.getType() == 2) && (resource.exists())) {
        return !handleOrphanedSubtree((IContainer)resource);
      }
      break;
    }
    return true;
  }
  
  private boolean handleOrphanedSubtree(IContainer container)
  {
    try
    {
      if (CVSWorkspaceRoot.isOrphanedSubtree(container))
      {
        ICVSFolder mFolder = CVSWorkspaceRoot.getCVSFolderFor(container);
        mFolder.unmanage(null);
        return true;
      }
    }
    catch (CVSException e)
    {
      CVSProviderPlugin.log(e);
    }
    return false;
  }
  
  public void resourceChanged(IResourceChangeEvent event)
  {
    try
    {
      IResourceDelta root = event.getDelta();
      IResourceDelta[] projectDeltas = root.getAffectedChildren();
      for (int i = 0; i < projectDeltas.length; i++)
      {
        IResourceDelta delta = projectDeltas[i];
        IResource resource = delta.getResource();
        if ((resource.getType() != 4) || 
        
          (resource.isAccessible()))
        {
          RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
          
          ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(resource.getProject());
          if (provider != null) {
            try
            {
              if (!folder.isCVSFolder())
              {
                RepositoryProvider.unmap(resource.getProject());
                provider = null;
              }
            }
            catch (TeamException e)
            {
              CVSProviderPlugin.log(e);
            }
          }
          if ((delta.getFlags() & 0x2000) > 0)
          {
            IResource destination = getResourceFor(resource.getProject(), resource, delta.getMovedToPath());
            provider = RepositoryProvider.getProvider(destination.getProject());
          }
          if (provider != null) {
            folder.run(new ICVSRunnable()
            {
              private final IResourceDelta val$delta;
              
              public void run(IProgressMonitor monitor)
                throws CVSException
              {
                try
                {
                  val$delta.accept(BuildCleanupListener.this);
                }
                catch (CoreException e)
                {
                  Util.logError(CVSMessages.ResourceDeltaVisitor_visitError, e);
                }
              }
            }, Policy.monitorFor(null));
          }
        }
      }
    }
    catch (CVSException e)
    {
      Util.logError(CVSMessages.ResourceDeltaVisitor_visitError, e);
    }
  }
}

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

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

public class CVSDateFormatter
{
  private static final String ENTRYLINE_FORMAT = "E MMM dd HH:mm:ss yyyy";
  private static final String SERVER_FORMAT = "dd MMM yyyy HH:mm:ss";
  private static final int ENTRYLINE_TENS_DAY_OFFSET = 8;
  private static final SimpleDateFormat serverFormat = new SimpleDateFormat("dd MMM yyyy HH:mm:ss", Locale.US);
  private static SimpleDateFormat entryLineFormat = new SimpleDateFormat("E MMM dd HH:mm:ss yyyy", Locale.US);
  
  static
  {
    entryLineFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
  }
  
  public static synchronized Date serverStampToDate(String text)
    throws ParseException
  {
    serverFormat.setTimeZone(getTimeZone(text));
    Date date = serverFormat.parse(text);
    return date;
  }
  
  public static synchronized Date entryLineToDate(String text)
    throws ParseException
  {
    try
    {
      if (text.charAt(8) == ' ')
      {
        StringBuffer buf = new StringBuffer(text);
        buf.setCharAt(8, '0');
        text = buf.toString();
      }
    }
    catch (StringIndexOutOfBoundsException e)
    {
      throw new ParseException(e.getMessage(), 8);
    }
    return entryLineFormat.parse(text);
  }
  
  public static synchronized String dateToEntryLine(Date date)
  {
    if (date == null) {
      return "";
    }
    String passOne = entryLineFormat.format(date);
    if (passOne.charAt(8) != '0') {
      return passOne;
    }
    StringBuffer passTwo = new StringBuffer(passOne);
    passTwo.setCharAt(8, ' ');
    return passTwo.toString();
  }
  
  public static synchronized String dateToNotifyServer(Date date)
  {
    serverFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
    return serverFormat.format(date) + " GMT";
  }
  
  private static TimeZone getTimeZone(String dateFromServer)
  {
    if (dateFromServer.lastIndexOf("0000") != -1) {
      return TimeZone.getTimeZone("GMT");
    }
    String tz = null;
    StringBuffer resultTz = new StringBuffer("GMT");
    if (dateFromServer.indexOf("-") != -1)
    {
      resultTz.append("-");
      tz = dateFromServer.substring(dateFromServer.indexOf("-"));
    }
    else if (dateFromServer.indexOf("+") != -1)
    {
      resultTz.append('+');
      tz = dateFromServer.substring(dateFromServer.indexOf("+"));
    }
    try
    {
      if (tz != null)
      {
        resultTz.append(tz.substring(1, 3) + ":" + tz.substring(3, 5));
        return TimeZone.getTimeZone(resultTz.toString());
      }
    }
    catch (IndexOutOfBoundsException localIndexOutOfBoundsException)
    {
      return TimeZone.getTimeZone("GMT");
    }
    return TimeZone.getTimeZone("GMT");
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;

public class FileNameMatcher
{
  private List matchers = new ArrayList();
  private List results = new ArrayList();
  private static final String TRUE = "true";
  
  public FileNameMatcher() {}
  
  public FileNameMatcher(String[] patterns)
  {
    register(patterns);
  }
  
  void register(String[] patterns)
  {
    for (int i = 0; i < patterns.length; i++) {
      register(patterns[i], "true");
    }
  }
  
  public void register(String pattern, String result)
  {
    Assert.isTrue(matchers.size() == results.size());
    
    pattern = pattern.trim();
    if (pattern.length() == 0) {
      return;
    }
    matchers.add(new StringMatcher(pattern, false, false));
    results.add(result);
  }
  
  public String getMatch(String name)
  {
    for (int i = 0; i < matchers.size(); i++)
    {
      StringMatcher stringMatcher = (StringMatcher)matchers.get(i);
      if (stringMatcher.match(name)) {
        return (String)results.get(i);
      }
    }
    return null;
  }
  
  public boolean match(String name)
  {
    return getMatch(name) != null;
  }
}

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

import org.eclipse.team.internal.ccvs.core.ICVSListener;
import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;

class KnownRepositories$1
  extends KnownRepositories.Notification
{
  final KnownRepositories this$0;
  private final CVSRepositoryLocation val$location;
  
  KnownRepositories$1(KnownRepositories paramKnownRepositories, CVSRepositoryLocation paramCVSRepositoryLocation)
  {
    super(paramKnownRepositories, null);this$0 = paramKnownRepositories;val$location = paramCVSRepositoryLocation;
  }
  
  public void notify(ICVSListener listener)
  {
    listener.repositoryAdded(val$location);
  }
}

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

import org.eclipse.team.internal.ccvs.core.ICVSListener;
import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;

class KnownRepositories$2
  extends KnownRepositories.Notification
{
  final KnownRepositories this$0;
  private final ICVSRepositoryLocation val$repository;
  
  KnownRepositories$2(KnownRepositories paramKnownRepositories, ICVSRepositoryLocation paramICVSRepositoryLocation)
  {
    super(paramKnownRepositories, null);this$0 = paramKnownRepositories;val$repository = paramICVSRepositoryLocation;
  }
  
  public void notify(ICVSListener listener)
  {
    listener.repositoryRemoved(val$repository);
  }
}

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

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

abstract class KnownRepositories$Notification
  implements ISafeRunnable
{
  private ICVSListener listener;
  final KnownRepositories this$0;
  
  private KnownRepositories$Notification(KnownRepositories paramKnownRepositories)
  {
    this$0 = paramKnownRepositories;
  }
  
  KnownRepositories$Notification(KnownRepositories paramKnownRepositories, Notification paramNotification)
  {
    this(paramKnownRepositories);
  }
  
  public void run(ICVSListener listener)
  {
    this.listener = listener;
    Platform.run(this);
  }
  
  public void run()
    throws Exception
  {
    notify(listener);
  }
  
  public void handleException(Throwable exception) {}
  
  protected abstract void notify(ICVSListener paramICVSListener);
}

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

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.team.IResourceTree;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;

class MoveDeleteHook$1
  implements ICVSRunnable
{
  final MoveDeleteHook this$0;
  private final IFile val$file;
  private final IResourceTree val$tree;
  private final int val$updateFlags;
  
  MoveDeleteHook$1(MoveDeleteHook paramMoveDeleteHook, IFile paramIFile, IResourceTree paramIResourceTree, int paramInt)
  {
    this$0 = paramMoveDeleteHook;val$file = paramIFile;val$tree = paramIResourceTree;val$updateFlags = paramInt;
  }
  
  /* Error */
  public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
    throws org.eclipse.team.internal.ccvs.core.CVSException
  {
    // Byte code:
    //   0: aload_1
    //   1: aconst_null
    //   2: bipush 100
    //   4: invokeinterface 67 3 0
    //   9: invokestatic 63	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   12: aload_0
    //   13: getfield 58	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$1:val$file	Lorg/eclipse/core/resources/IFile;
    //   16: aload_1
    //   17: bipush 40
    //   19: invokestatic 62	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   22: invokevirtual 64	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:prepareForDeletion	(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   25: aload_0
    //   26: getfield 59	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$1:val$tree	Lorg/eclipse/core/resources/team/IResourceTree;
    //   29: aload_0
    //   30: getfield 58	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$1:val$file	Lorg/eclipse/core/resources/IFile;
    //   33: aload_0
    //   34: getfield 57	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$1:val$updateFlags	I
    //   37: aload_1
    //   38: bipush 60
    //   40: invokestatic 62	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   43: invokeinterface 65 4 0
    //   48: goto +12 -> 60
    //   51: astore_2
    //   52: aload_1
    //   53: invokeinterface 66 1 0
    //   58: aload_2
    //   59: athrow
    //   60: aload_1
    //   61: invokeinterface 66 1 0
    //   66: return
    // Line number table:
    //   Java source line #60	-> byte code offset #0
    //   Java source line #61	-> byte code offset #9
    //   Java source line #62	-> byte code offset #25
    //   Java source line #63	-> byte code offset #51
    //   Java source line #64	-> byte code offset #52
    //   Java source line #65	-> byte code offset #58
    //   Java source line #64	-> byte code offset #60
    //   Java source line #66	-> byte code offset #66
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	67	0	this	1
    //   0	67	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   51	8	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	51	51	finally
  }
}

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

import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.team.IResourceTree;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;

class MoveDeleteHook$2
  implements ICVSRunnable
{
  final MoveDeleteHook this$0;
  private final IFolder val$folder;
  private final IResourceTree val$tree;
  private final int val$updateFlags;
  
  MoveDeleteHook$2(MoveDeleteHook paramMoveDeleteHook, IFolder paramIFolder, IResourceTree paramIResourceTree, int paramInt)
  {
    this$0 = paramMoveDeleteHook;val$folder = paramIFolder;val$tree = paramIResourceTree;val$updateFlags = paramInt;
  }
  
  /* Error */
  public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
    throws org.eclipse.team.internal.ccvs.core.CVSException
  {
    // Byte code:
    //   0: aload_1
    //   1: aconst_null
    //   2: bipush 100
    //   4: invokeinterface 67 3 0
    //   9: invokestatic 63	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   12: aload_0
    //   13: getfield 58	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$2:val$folder	Lorg/eclipse/core/resources/IFolder;
    //   16: aload_1
    //   17: bipush 20
    //   19: invokestatic 62	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   22: invokevirtual 64	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:prepareForDeletion	(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   25: aload_0
    //   26: getfield 59	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$2:val$tree	Lorg/eclipse/core/resources/team/IResourceTree;
    //   29: aload_0
    //   30: getfield 58	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$2:val$folder	Lorg/eclipse/core/resources/IFolder;
    //   33: aload_0
    //   34: getfield 57	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$2:val$updateFlags	I
    //   37: aload_1
    //   38: bipush 50
    //   40: invokestatic 62	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   43: invokeinterface 65 4 0
    //   48: goto +12 -> 60
    //   51: astore_2
    //   52: aload_1
    //   53: invokeinterface 66 1 0
    //   58: aload_2
    //   59: athrow
    //   60: aload_1
    //   61: invokeinterface 66 1 0
    //   66: return
    // Line number table:
    //   Java source line #94	-> byte code offset #0
    //   Java source line #95	-> byte code offset #9
    //   Java source line #96	-> byte code offset #25
    //   Java source line #97	-> byte code offset #51
    //   Java source line #98	-> byte code offset #52
    //   Java source line #99	-> byte code offset #58
    //   Java source line #98	-> byte code offset #60
    //   Java source line #100	-> byte code offset #66
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	67	0	this	2
    //   0	67	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   51	8	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	51	51	finally
  }
}

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

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.team.IResourceTree;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;

class MoveDeleteHook$3
  implements ICVSRunnable
{
  final MoveDeleteHook this$0;
  private final IFile val$source;
  private final IFile val$destination;
  private final IResourceTree val$tree;
  private final int val$updateFlags;
  
  MoveDeleteHook$3(MoveDeleteHook paramMoveDeleteHook, IFile paramIFile1, IFile paramIFile2, IResourceTree paramIResourceTree, int paramInt)
  {
    this$0 = paramMoveDeleteHook;val$source = paramIFile1;val$destination = paramIFile2;val$tree = paramIResourceTree;val$updateFlags = paramInt;
  }
  
  /* Error */
  public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
    throws org.eclipse.team.internal.ccvs.core.CVSException
  {
    // Byte code:
    //   0: aload_1
    //   1: aconst_null
    //   2: bipush 100
    //   4: invokeinterface 80 3 0
    //   9: invokestatic 75	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   12: aload_0
    //   13: getfield 69	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$source	Lorg/eclipse/core/resources/IFile;
    //   16: aload_1
    //   17: bipush 40
    //   19: invokestatic 73	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   22: invokevirtual 76	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:prepareForDeletion	(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   25: aload_0
    //   26: getfield 68	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$destination	Lorg/eclipse/core/resources/IFile;
    //   29: invokeinterface 77 1 0
    //   34: ifeq +19 -> 53
    //   37: invokestatic 75	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   40: aload_0
    //   41: getfield 68	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$destination	Lorg/eclipse/core/resources/IFile;
    //   44: aload_1
    //   45: bipush 20
    //   47: invokestatic 73	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   50: invokevirtual 76	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:prepareForDeletion	(Lorg/eclipse/core/resources/IResource;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   53: aload_0
    //   54: getfield 70	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$tree	Lorg/eclipse/core/resources/team/IResourceTree;
    //   57: aload_0
    //   58: getfield 69	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$source	Lorg/eclipse/core/resources/IFile;
    //   61: aload_0
    //   62: getfield 68	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$destination	Lorg/eclipse/core/resources/IFile;
    //   65: aload_0
    //   66: getfield 67	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$updateFlags	I
    //   69: aload_1
    //   70: bipush 40
    //   72: invokestatic 73	org/eclipse/team/internal/ccvs/core/Policy:subMonitorFor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)Lorg/eclipse/core/runtime/IProgressMonitor;
    //   75: invokeinterface 78 5 0
    //   80: invokestatic 75	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:getInstance	()Lorg/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer;
    //   83: aload_0
    //   84: getfield 68	org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook$3:val$destination	Lorg/eclipse/core/resources/IFile;
    //   87: invokevirtual 74	org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer:postMove	(Lorg/eclipse/core/resources/IResource;)V
    //   90: goto +12 -> 102
    //   93: astore_2
    //   94: aload_1
    //   95: invokeinterface 79 1 0
    //   100: aload_2
    //   101: athrow
    //   102: aload_1
    //   103: invokeinterface 79 1 0
    //   108: return
    // Line number table:
    //   Java source line #165	-> byte code offset #0
    //   Java source line #166	-> byte code offset #9
    //   Java source line #167	-> byte code offset #25
    //   Java source line #168	-> byte code offset #37
    //   Java source line #170	-> byte code offset #53
    //   Java source line #171	-> byte code offset #80
    //   Java source line #172	-> byte code offset #93
    //   Java source line #173	-> byte code offset #94
    //   Java source line #174	-> byte code offset #100
    //   Java source line #173	-> byte code offset #102
    //   Java source line #175	-> byte code offset #108
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	109	0	this	3
    //   0	109	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   93	8	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	93	93	finally
  }
}

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

import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.team.IResourceTree;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;

class MoveDeleteHook$4
  implements ICVSRunnable
{
  final MoveDeleteHook this$0;
  private final IFolder val$source;
  private final IFolder val$destination;
  private final IResourceTree val$tree;
  private final int val$updateFlags;
  
  MoveDeleteHook$4(MoveDeleteHook paramMoveDeleteHook, IFolder paramIFolder1, IFolder paramIFolder2, IResourceTree paramIResourceTree, int paramInt)
  {
    this$0 = paramMoveDeleteHook;val$source = paramIFolder1;val$destination = paramIFolder2;val$tree = paramIResourceTree;val$updateFlags = paramInt;
  }
  
  public void run(IProgressMonitor monitor)
    throws CVSException
  {
    EclipseSynchronizer.getInstance().prepareForDeletion(val$source, Policy.subMonitorFor(monitor, 20));
    if (val$destination.exists()) {
      EclipseSynchronizer.getInstance().prepareForDeletion(val$destination, Policy.subMonitorFor(monitor, 20));
    }
    val$tree.standardMoveFolder(val$source, val$destination, val$updateFlags, Policy.subMonitorFor(monitor, 30));
    
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