Examples of IHistoryStore


Examples of org.eclipse.core.internal.localstore.IHistoryStore

  /* (non-Javadoc)
   * @see IContainer#findDeletedMembersWithHistory(int, IProgressMonitor)
   */
  public IFile[] findDeletedMembersWithHistory(int depth, IProgressMonitor monitor) {
    IHistoryStore historyStore = getLocalManager().getHistoryStore();
    IPath basePath = getFullPath();
    IWorkspaceRoot root = getWorkspace().getRoot();
    Set deletedFiles = new HashSet();

    if (depth == IResource.DEPTH_ZERO) {
      // this folder might have been a file in a past life
      if (historyStore.getStates(basePath, monitor).length > 0) {
        IFile file = root.getFile(basePath);
        if (!file.exists()) {
          deletedFiles.add(file);
        }
      }
    } else {
      Set allFilePaths = historyStore.allFiles(basePath, depth, monitor);
      // convert IPaths to IFiles keeping only files that no longer exist
      for (Iterator it = allFilePaths.iterator(); it.hasNext();) {
        IPath filePath = (IPath) it.next();
        IFile file = root.getFile(filePath);
        if (!file.exists()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.