本文整理汇总了Java中com.intellij.openapi.vcs.changes.Change.getFileStatus方法的典型用法代码示例。如果您正苦于以下问题:Java Change.getFileStatus方法的具体用法?Java Change.getFileStatus怎么用?Java Change.getFileStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vcs.changes.Change
的用法示例。
在下文中一共展示了Change.getFileStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import com.intellij.openapi.vcs.changes.Change; //导入方法依赖的package包/类
@Override
protected void update(final VcsContext vcsContext, final Presentation presentation) {
super.update(vcsContext, presentation);
if (presentation.isVisible() && presentation.isEnabled()) {
final ChangeList[] selectedChangeLists = vcsContext.getSelectedChangeLists();
final Change[] selectedChanges = vcsContext.getSelectedChanges();
if (vcsContext.getPlace().equals(ActionPlaces.CHANGES_VIEW_POPUP)) {
if (selectedChangeLists != null && selectedChangeLists.length > 0) {
presentation.setEnabled(selectedChangeLists.length == 1 && !ContainerUtil.isEmpty(selectedChangeLists[0].getChanges()));
}
else {
presentation.setEnabled (selectedChanges != null && selectedChanges.length > 0);
}
}
if (presentation.isEnabled() && selectedChanges != null) {
final ChangeListManager changeListManager = ChangeListManager.getInstance(vcsContext.getProject());
for(Change c: selectedChanges) {
if (c.getFileStatus() == FileStatus.HIJACKED && changeListManager.getChangeList(c) == null) {
presentation.setEnabled(false);
break;
}
}
}
}
}
示例2: containsUnresolvedConflicts
import com.intellij.openapi.vcs.changes.Change; //导入方法依赖的package包/类
private static boolean containsUnresolvedConflicts(@NotNull CheckinProjectPanel panel) {
for (Change change : panel.getSelectedChanges()) {
FileStatus status = change.getFileStatus();
if (status.equals(FileStatus.MERGE) || status.equals(FileStatus.MERGED_WITH_BOTH_CONFLICTS) ||
status.equals(FileStatus.MERGED_WITH_CONFLICTS) || status.equals(FileStatus.MERGED_WITH_PROPERTY_CONFLICTS)) {
return true;
}
}
return false;
}
示例3: isEnabled
import com.intellij.openapi.vcs.changes.Change; //导入方法依赖的package包/类
@Override
protected boolean isEnabled(@NotNull AnActionEvent event) {
final Collection<Change> changes = ChangeListManager.getInstance(event.getProject()).getAllChanges();
if (changes.size() > 1000) {
return true;
}
for (Change change : changes) {
if (change.getFileStatus() == FileStatus.MERGED_WITH_CONFLICTS) {
return true;
}
}
return false;
}
示例4: IncomingChangeState
import com.intellij.openapi.vcs.changes.Change; //导入方法依赖的package包/类
public IncomingChangeState(final Change change, final String revision, State state) {
myRevision = revision;
myStatus = change.getFileStatus();
myPath = ChangesUtil.getFilePath(change);
myState = state;
}