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


Java ContainerUtil.exists方法代码示例

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


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

示例1: getIntentionActionsToShow

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private void getIntentionActionsToShow() {
  getActionsToShow(myEditor, myFile, myIntentionsInfo, myPassIdToShowIntentionsFor);
  if (myFile instanceof IntentionFilterOwner) {
    final IntentionFilterOwner.IntentionActionsFilter actionsFilter = ((IntentionFilterOwner)myFile).getIntentionActionsFilter();
    if (actionsFilter == null) return;
    if (actionsFilter != IntentionFilterOwner.IntentionActionsFilter.EVERYTHING_AVAILABLE) {
      myIntentionsInfo.filterActions(actionsFilter);
    }
  }

  if (myIntentionsInfo.isEmpty()) {
    return;
  }
  myShowBulb = !myIntentionsInfo.guttersToShow.isEmpty() ||
    ContainerUtil.exists(ContainerUtil.concat(myIntentionsInfo.errorFixesToShow, myIntentionsInfo.inspectionFixesToShow,myIntentionsInfo.intentionsToShow), new Condition<HighlightInfo.IntentionActionDescriptor>() {
      @Override
      public boolean value(HighlightInfo.IntentionActionDescriptor descriptor) {
        return IntentionManagerSettings.getInstance().isShowLightBulb(descriptor.getAction());
      }
    });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ShowIntentionsPass.java

示例2: setUpTracking

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private void setUpTracking(@NotNull Collection<VcsRef> refs) {
  cd(myProjectRoot);
  for (final VcsRef ref : refs) {
    if (ref.getType() == GitRefManager.LOCAL_BRANCH) {
      final String localBranch = ref.getName();
      if (ContainerUtil.exists(refs, new Condition<VcsRef>() {
        @Override
        public boolean value(VcsRef remoteRef) {
          return remoteRef.getType() == GitRefManager.REMOTE_BRANCH && remoteRef.getName().replace("origin/", "").equals(localBranch);
        }
      })) {
        git("config branch." + localBranch + ".remote origin");
        git("config branch." + localBranch + ".merge refs/heads/" + localBranch);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GitRefManagerTest.java

示例3: containsForcePushTarget

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public boolean containsForcePushTarget(@NotNull final String remote, @NotNull final String branch) {
  return ContainerUtil.exists(myState.FORCE_PUSH_TARGETS, new Condition<ForcePushTargetInfo>() {
    @Override
    public boolean value(ForcePushTargetInfo info) {
      return info.targetRemoteName.equals(remote) && info.targetBranchName.equals(branch);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PushSettings.java

示例4: isForcePushEnabled

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public boolean isForcePushEnabled() {
  return ContainerUtil.exists(myView2Model.values(), new Condition<MyRepoModel<?, ?, ?>>() {
    @Override
    public boolean value(MyRepoModel<?, ?, ?> model) {
      return model.getSupport().isForcePushEnabled();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PushController.java

示例5: containedInOtherNames

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private boolean containedInOtherNames(@NotNull final Repository except, final String candidate) {
  return ContainerUtil.exists(myGlobalRepositoryManager.getRepositories(), new Condition<Repository>() {
    @Override
    public boolean value(Repository repository) {
      return !repository.equals(except) && repository.getRoot().getName().equals(candidate);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PushController.java

示例6: isPushAllowed

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public boolean isPushAllowed(final boolean force) {
  JTree tree = myPushLog.getTree();
  return !tree.isEditing() &&
         ContainerUtil.exists(myPushSupports, new Condition<PushSupport<Repository, PushSource, PushTarget>>() {
           @Override
           public boolean value(PushSupport<Repository, PushSource, PushTarget> support) {
             return isPushAllowed(support, force);
           }
         });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:PushController.java

示例7: hasSomethingToPush

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private boolean hasSomethingToPush(Collection<RepositoryNode> nodes) {
  return ContainerUtil.exists(nodes, new Condition<RepositoryNode>() {
    @Override
    public boolean value(@NotNull RepositoryNode node) {
      PushTarget target = myView2Model.get(node).getTarget();
      //if node is selected target should not be null
      return (node.isChecked() || node.isLoading()) && target != null && target.hasSomethingToPush();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:PushController.java

示例8: hasGitRoots

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private static boolean hasGitRoots(@NotNull Project project, @NotNull Set<VirtualFile> roots) {
  final GitRepositoryManager manager = ServiceManager.getService(project, GitRepositoryManager.class);
  return ContainerUtil.exists(roots, new Condition<VirtualFile>() {
    @Override
    public boolean value(VirtualFile root) {
      return manager.getRepositoryForRoot(root) != null;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:DeepCompareAction.java

示例9: noChangesAfterCherryPick

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private boolean noChangesAfterCherryPick(@NotNull Collection<Change> originalChanges) {
  final Collection<Change> allChanges = myChangeListManager.getAllChanges();
  return !ContainerUtil.exists(originalChanges, new Condition<Change>() {
    @Override
    public boolean value(Change change) {
      return allChanges.contains(change);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GitCherryPicker.java

示例10: getCommonTarget

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@Nullable
private static PushTarget getCommonTarget(@NotNull Collection<MyRepoModel<?, ?, ?>> selectedNodes) {
  final PushTarget commonTarget = ObjectUtils.assertNotNull(ContainerUtil.getFirstItem(selectedNodes)).getTarget();
  return commonTarget != null && !ContainerUtil.exists(selectedNodes, new Condition<MyRepoModel<?, ?, ?>>() {
    @Override
    public boolean value(MyRepoModel model) {
      return !commonTarget.equals(model.getTarget());
    }
  }) ? commonTarget : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:PushController.java

示例11: isAppliedPatch

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public static boolean isAppliedPatch(@NotNull HgRepository repository, @NotNull final VcsFullCommitDetails commitDetails) {
  return ContainerUtil.exists(repository.getMQAppliedPatches(), new Condition<HgNameWithHashInfo>() {
    @Override
    public boolean value(HgNameWithHashInfo info) {
      return info.getHash().equals(commitDetails.getId());
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:HgMqAppliedPatchAction.java

示例12: isInTargetPosition

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private static boolean isInTargetPosition(@NotNull final PySequenceExpression sequenceLiteral) {
  return ContainerUtil.exists(sequenceLiteral.getElements(), new Condition<PyExpression>() {
    @Override
    public boolean value(PyExpression expression) {
      return expression instanceof PyTargetExpression;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PyConvertLiteralToSetIntention.java

示例13: containsCategory

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
public boolean containsCategory(int category) {
  final int categoryCode = getCategoryCode(category);
  Condition<Integer> belongsToCategoryCondition = new Condition<Integer>() {
    @Override
    public boolean value(Integer code) {
      return getCategoryCode(code) == categoryCode;
    }
  };

  return ContainerUtil.exists(errors.keySet(), belongsToCategoryCondition) ||
         ContainerUtil.exists(warnings.keySet(), belongsToCategoryCondition);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SvnBindException.java

示例14: belongsToSomeMovedElement

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private boolean belongsToSomeMovedElement(@NotNull final PsiElement element) {
  return ContainerUtil.exists(myAllMovedElements, new Condition<PsiElement>() {
    @Override
    public boolean value(PsiElement movedElement) {
      final PsiElement movedElementBody = PyMoveModuleMembersHelper.expandNamedElementBody((PsiNamedElement)movedElement);
      return PsiTreeUtil.isAncestor(movedElementBody, element, false);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:PyMoveSymbolProcessor.java

示例15: isForcePushAllowed

import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
@Override
public boolean isForcePushAllowed(@NotNull GitRepository repo, @NotNull GitPushTarget target) {
  final String targetBranch = target.getBranch().getNameForRemoteOperations();
  return !ContainerUtil.exists(mySharedSettings.getForcePushProhibitedPatterns(), new Condition<String>() {
    @Override
    public boolean value(String pattern) {
      return targetBranch.matches("^" + pattern + "$"); // let "master" match only "master" and not "any-master-here" by default
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GitPushSupport.java


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