当前位置: 首页>>代码示例>>Java>>正文


Java FileStatus.NOT_CHANGED属性代码示例

本文整理汇总了Java中com.intellij.openapi.vcs.FileStatus.NOT_CHANGED属性的典型用法代码示例。如果您正苦于以下问题:Java FileStatus.NOT_CHANGED属性的具体用法?Java FileStatus.NOT_CHANGED怎么用?Java FileStatus.NOT_CHANGED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.openapi.vcs.FileStatus的用法示例。


在下文中一共展示了FileStatus.NOT_CHANGED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: collectModifiedFiles

public Collection<VirtualFile> collectModifiedFiles(VirtualFile[] files) {

    ArrayList<VirtualFile> result = new ArrayList<VirtualFile>();

    if (files == null) return result;

    for (int i = 0; i < files.length; i++) {
      VirtualFile file = files[i];
      if (myProgressIndicator != null) {
        myProgressIndicator.setText(VcsBundle.message("progress.text.searching.for.modified.files"));
        myProgressIndicator.setText2(file.getPresentableUrl());
      }
      FileStatus status = myFileStatusManager.getStatus(file);
      if (status != FileStatus.NOT_CHANGED) {
        result.add(file);
        if (result.size() > 1) return result;
      }
      result.addAll(collectModifiedFiles(file.getChildren()));
    }
    return result;
  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:ReplaceFileConfirmationDialog.java

示例2: getStatus

protected FileStatus getStatus(Object value, FilePath path) {
  final FileStatus fileStatus;
  if (value instanceof Change) {
    fileStatus = ((Change) value).getFileStatus();
  }
  else {
    final VirtualFile virtualFile = path.getVirtualFile();
    if (virtualFile != null) {
      fileStatus = myFileStatusManager.getStatus(virtualFile);
    }
    else {
      fileStatus = FileStatus.NOT_CHANGED;
    }
  }
  return fileStatus;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:VirtualFileListCellRenderer.java

示例3: hasReportedProblems

@Override
public boolean hasReportedProblems() {
  final GlobalInspectionContextImpl context = getContext();
  if (!isDisposed() && context.getUIOptions().SHOW_ONLY_DIFF) {
    for (CommonProblemDescriptor descriptor : getProblemToElements().keySet()) {
      if (getProblemStatus(descriptor) != FileStatus.NOT_CHANGED) {
        return true;
      }
    }
    if (myOldProblemElements != null) {
      for (RefEntity entity : myOldProblemElements.keySet()) {
        if (getElementStatus(entity) != FileStatus.NOT_CHANGED) {
          return true;
        }
      }
    }
    return false;
  }
  if (!getProblemElements().isEmpty()) return true;
  return !isDisposed() && context.getUIOptions().SHOW_DIFF_WITH_PREVIOUS_RUN && myOldProblemElements != null && !myOldProblemElements.isEmpty();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:DefaultInspectionToolPresentation.java

示例4: getProblemStatus

@Override
@NotNull
public FileStatus getProblemStatus(@NotNull final CommonProblemDescriptor descriptor) {
  final GlobalInspectionContextImpl context = getContext();
  if (!isDisposed() && context.getUIOptions().SHOW_DIFF_WITH_PREVIOUS_RUN){
    if (myOldProblemElements != null){
      final Set<CommonProblemDescriptor> allAvailable = new HashSet<CommonProblemDescriptor>();
      for (CommonProblemDescriptor[] descriptors : myOldProblemElements.values()) {
        if (descriptors != null) {
          ContainerUtil.addAll(allAvailable, descriptors);
        }
      }
      final boolean old = containsDescriptor(descriptor, allAvailable);
      final boolean current = containsDescriptor(descriptor, getProblemToElements().keySet());
      return calcStatus(old, current);
    }
  }
  return FileStatus.NOT_CHANGED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:DefaultInspectionToolPresentation.java

示例5: containsOnlyDiff

private boolean containsOnlyDiff(@NotNull Map<String, Set<RefEntity>> packageContents) {
  for (String packageName : packageContents.keySet()) {
    final Set<RefEntity> refElements = packageContents.get(packageName);
    if (refElements != null){
      for (RefEntity refElement : refElements) {
        if (getElementStatus(refElement) != FileStatus.NOT_CHANGED){
          return true;
        }
      }
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:UnusedDeclarationPresentation.java

示例6: convertPropertyStatus

@NotNull
public static FileStatus convertPropertyStatus(final StatusType status) {
  if (status == null) {
    return FileStatus.UNKNOWN;
  }
  if (StatusType.STATUS_UNVERSIONED.equals(status)) {
    return FileStatus.UNKNOWN;
  }
  else if (StatusType.STATUS_MISSING.equals(status)) {
    return FileStatus.DELETED_FROM_FS;
  }
  else if (StatusType.STATUS_EXTERNAL.equals(status)) {
    return SvnFileStatus.EXTERNAL;
  }
  else if (StatusType.STATUS_OBSTRUCTED.equals(status)) {
    return SvnFileStatus.OBSTRUCTED;
  }
  else if (StatusType.STATUS_IGNORED.equals(status)) {
    return FileStatus.IGNORED;
  }
  else if (StatusType.STATUS_ADDED.equals(status)) {
    return FileStatus.ADDED;
  }
  else if (StatusType.STATUS_DELETED.equals(status)) {
    return FileStatus.DELETED;
  }
  else if (StatusType.STATUS_REPLACED.equals(status)) {
    return SvnFileStatus.REPLACED;
  }
  else if (status == StatusType.STATUS_CONFLICTED) {
    return FileStatus.MERGED_WITH_PROPERTY_CONFLICTS;
  }
  else if (status == StatusType.STATUS_MODIFIED) {
    return FileStatus.MODIFIED;
  }
  return FileStatus.NOT_CHANGED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:SvnStatusConvertor.java

示例7: isChanged

@Override
public boolean isChanged(@NotNull final EditorComposite editor) {
  final FileStatusManager fileStatusManager = FileStatusManager.getInstance(myProject);
  if (fileStatusManager == null) return false;
  FileStatus status = fileStatusManager.getStatus(editor.getFile());
  return status != FileStatus.UNKNOWN && status != FileStatus.NOT_CHANGED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:FileEditorManagerImpl.java

示例8: isPerformedOn

public boolean isPerformedOn(CvsContext context) {
  VirtualFile[] selectedFiles = context.getSelectedFiles();
  if (selectedFiles == null) return false;
  for (int i = 0; i < selectedFiles.length; i++) {
    VirtualFile selectedFile = selectedFiles[i];
    if (CvsStatusProvider.getStatus(selectedFile) == FileStatus.NOT_CHANGED) {
      return documentIsModified(selectedFile);
    }
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ActionOnSelectedElement.java

示例9: isEnabled

@Override
protected boolean isEnabled(@NotNull Project project, @NotNull GitVcs vcs, @NotNull VirtualFile... vFiles) {
  for (VirtualFile file : vFiles) {
    FileStatus fileStatus = FileStatusManager.getInstance(project).getStatus(file);
    if (file.isDirectory() || (fileStatus != FileStatus.NOT_CHANGED && fileStatus != FileStatus.UNKNOWN)) {
      return true;
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GitRevert.java

示例10: get

public static FileStatus get(NavigationItem item) {
  if (item instanceof PsiElement) {
    return getPsiElementFileStatus((PsiElement)item);
  }
  if (item instanceof AbstractTreeNode) {
    return ((AbstractTreeNode) item).getFileStatus();
  }
  if (item instanceof PsiElementNavigationItem) {
    PsiElement target = ((PsiElementNavigationItem) item).getTargetElement();
    if (target != null) return getPsiElementFileStatus(target);
  }
  return FileStatus.NOT_CHANGED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:NavigationItemFileStatus.java

示例11: getPsiElementFileStatus

private static FileStatus getPsiElementFileStatus(@NotNull PsiElement psiElement) {
  if (!psiElement.isPhysical()) return FileStatus.NOT_CHANGED;
  PsiFile contFile = psiElement.getContainingFile();
  if (contFile == null) return FileStatus.NOT_CHANGED;
  VirtualFile vFile = contFile.getVirtualFile();
  return vFile == null ? FileStatus.NOT_CHANGED : FileStatusManager.getInstance(psiElement.getProject()).getStatus(vFile);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:NavigationItemFileStatus.java

示例12: getFileStatus

@Override
public FileStatus getFileStatus() {
  for(BasePsiNode<? extends PsiElement> child: myChildren) {
    final PsiElement value = child.getValue();
    if (value == null || !value.isValid()) continue;
    final FileStatus fileStatus = NavigationItemFileStatus.get(child);
    if (fileStatus != FileStatus.NOT_CHANGED) {
      return fileStatus;
    }
  }
  return FileStatus.NOT_CHANGED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:FormNode.java

示例13: getFileStatus

@Override
public FileStatus getFileStatus() {
  VirtualFile file = getVirtualFileForValue();
  if (file == null) {
    return FileStatus.NOT_CHANGED;
  }
  else {
    return FileStatusManager.getInstance(getProject()).getStatus(file);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AbstractPsiBasedNode.java

示例14: calcStatus

@NotNull
protected static FileStatus calcStatus(boolean old, boolean current) {
  if (old) {
    if (!current) {
      return FileStatus.DELETED;
    }
  }
  else if (current) {
    return FileStatus.ADDED;
  }
  return FileStatus.NOT_CHANGED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DefaultInspectionToolPresentation.java

示例15: getFileStatusForAbsentEntry

private static FileStatus getFileStatusForAbsentEntry(VirtualFile file) {
  if (file == null) {
    return FileStatus.UNKNOWN;
  }

  if (CvsEntriesManager.getInstance().fileIsIgnored(file)) {
    return FileStatus.IGNORED;
  }

  if (file.isDirectory() && CvsUtil.fileIsUnderCvs(file)) {
    return FileStatus.NOT_CHANGED;
  }

  return FileStatus.UNKNOWN;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:CvsStatusProvider.java


注:本文中的com.intellij.openapi.vcs.FileStatus.NOT_CHANGED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。