本文整理汇总了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;
}
示例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);
}
示例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));
}
示例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);
}