コード例 #1
0
 @Override
 public List<Task> getCachedIssues(final boolean withClosed) {
   return ContainerUtil.filter(
       myIssueCache.values(),
       new Condition<Task>() {
         @Override
         public boolean value(final Task task) {
           return withClosed || !task.isClosed();
         }
       });
 }
コード例 #2
0
 @Override
 public List<LocalTask> getLocalTasks(final boolean withClosed) {
   synchronized (myTasks) {
     return ContainerUtil.filter(
         myTasks.values(),
         new Condition<LocalTask>() {
           @Override
           public boolean value(final LocalTask task) {
             return withClosed || !isLocallyClosed(task);
           }
         });
   }
 }
コード例 #3
0
 @SuppressWarnings({"unchecked"})
 @NotNull
 public Config getState() {
   myConfig.tasks =
       ContainerUtil.map(
           myTasks.values(),
           new Function<Task, LocalTaskImpl>() {
             public LocalTaskImpl fun(Task task) {
               return new LocalTaskImpl(task);
             }
           });
   myConfig.servers = XmlSerializer.serialize(getAllRepositories());
   return myConfig;
 }
コード例 #4
0
    private boolean isLocalRevisionMergeIteration(
        final TreeStructureNode<SVNLogEntry> tree,
        final String localURL,
        ProgressIndicator indicator) {
      final LinkedList<TreeStructureNode<SVNLogEntry>> queue =
          new LinkedList<TreeStructureNode<SVNLogEntry>>();
      queue.addLast(tree);

      while (!queue.isEmpty()) {
        final TreeStructureNode<SVNLogEntry> element = queue.removeFirst();
        indicator.checkCanceled();

        final Map map = element.getMe().getChangedPaths();
        for (Object o : map.values()) {
          final SVNLogEntryPath path = (SVNLogEntryPath) o;
          if (SVNPathUtil.isAncestor(localURL, path.getPath())) {
            return true;
          }
          break; // do not check all. first should match or fail
        }
        queue.addAll(element.getChildren());
      }
      return false;
    }