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


Java ChangeListManager.isUnversioned方法代码示例

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


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

示例1: isEnabledImpl

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
private boolean isEnabledImpl(final SvnVcs vcs, final VirtualFile file) {
  final ChangeListManager clManager = ChangeListManager.getInstance(vcs.getProject());

  if (SvnStatusUtil.isIgnoredInAnySense(clManager, file)) {
    myAllCanBeIgnored = false;
    return myAllAreIgnored | myAllCanBeIgnored;
  } else if (clManager.isUnversioned(file)) {
    // check parent
    final VirtualFile parent = file.getParent();
    if (parent != null) {
      if ((! SvnStatusUtil.isIgnoredInAnySense(clManager, parent)) && (! clManager.isUnversioned(parent))) {
        myAllAreIgnored = false;
        return myAllAreIgnored | myAllCanBeIgnored;
      }
    }
  }
  myAllCanBeIgnored = false;
  myAllAreIgnored = false;
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:IgnoreGroupHelperAction.java

示例2: update

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
@Override
public void update(final AnActionEvent e) {
  Project project = e.getData(CommonDataKeys.PROJECT);
  VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE);
  if (project == null || project.isDefault() || virtualFile == null) {
    setVisibleEnabled(e, false, false);
    return;
  }
  GitRepositoryManager manager = GitUtil.getRepositoryManager(project);

  final GitRepository gitRepository = manager.getRepositoryForFile(virtualFile);
  if (gitRepository == null) {
    setVisibleEnabled(e, false, false);
    return;
  }

  if (!GithubUtil.isRepositoryOnGitHub(gitRepository)) {
    setVisibleEnabled(e, false, false);
    return;
  }

  ChangeListManager changeListManager = ChangeListManager.getInstance(project);
  if (changeListManager.isUnversioned(virtualFile)) {
    setVisibleEnabled(e, true, false);
    return;
  }

  Change change = changeListManager.getChange(virtualFile);
  if (change != null && change.getType() == Change.Type.NEW) {
    setVisibleEnabled(e, true, false);
    return;
  }

  setVisibleEnabled(e, true, true);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:36,代码来源:GithubOpenInBrowserAction.java

示例3: isUnderControl

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
public static boolean isUnderControl(final Project project, final VirtualFile file) {
  final ChangeListManager clManager = ChangeListManager.getInstance(project);
  return (! isIgnoredInAnySense(clManager, file)) && (! clManager.isUnversioned(file));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:SvnStatusUtil.java

示例4: fileCanBeAdded

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
public static boolean fileCanBeAdded(final Project project, final VirtualFile file) {
  final ChangeListManager clManager = ChangeListManager.getInstance(project);
  return isIgnoredInAnySense(clManager, file) || clManager.isUnversioned(file);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:SvnStatusUtil.java


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