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


Java Ticket类代码示例

本文整理汇总了Java中com.intellij.util.Ticket的典型用法代码示例。如果您正苦于以下问题:Java Ticket类的具体用法?Java Ticket怎么用?Java Ticket使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: AbstractRefreshablePanel

import com.intellij.util.Ticket; //导入依赖的package包/类
protected AbstractRefreshablePanel(final Project project, final String loadingTitle, final BackgroundTaskQueue queue) {
  myQueue = queue;
  myTicket = new Ticket();
  myDetailsPanel = new DetailsPanel();
  myDetailsPanel.loading();
  myDetailsPanel.layout();
  
  myDetailsLoader = new GenericDetailsLoader<Ticket, T>(new Consumer<Ticket>() {
    @Override
    public void consume(Ticket ticket) {
      final Loader loader = new Loader(project, loadingTitle, myTicket.copy());
      loader.runSteadily(new Consumer<Task.Backgroundable>() {
        @Override
        public void consume(Task.Backgroundable backgroundable) {
          myQueue.run(backgroundable);
        }
      });
    }
  }, new PairConsumer<Ticket, T>() {
    @Override
    public void consume(Ticket ticket, T t) {
      acceptData(t);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:AbstractRefreshablePanel.java

示例2: ByRootLoader

import com.intellij.util.Ticket; //导入依赖的package包/类
public ByRootLoader(Project project,
                    LoaderAndRefresherImpl.MyRootHolder rootHolder,
                    Mediator mediator,
                    DetailsCache detailsCache,
                    Ticket ticket, UsersIndex usersIndex, GitLogFilters gitLogFilters, final Collection<String> startingPoints) {
  super("Initial checks", Where.POOLED);
  myProject = project;
  myRootHolder = rootHolder;
  myUsersIndex = usersIndex;
  myStartingPoints = startingPoints;
  myLowLevelAccess = new LowLevelAccessImpl(myProject, myRootHolder.getRoot());
  myMediator = mediator;
  myDetailsCache = detailsCache;
  myTicket = ticket;
  myGitLogFilters = gitLogFilters;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:ByRootLoader.java

示例3: reportSymbolicRefs

import com.intellij.util.Ticket; //导入依赖的package包/类
@CalledInBackground
@Override
public void reportSymbolicRefs(final Ticket ticket, final VirtualFile root, final CachedRefs symbolicRefs) {
  Runnable runnable = new Runnable() {
    @Override
    public void run() {
      if (!myTicket.equals(ticket)) return;
      myDetailsLoader.reportRefs(root, symbolicRefs);
      myUIRefresh.reportSymbolicRefs(root, symbolicRefs);
    }
  };
  if (ApplicationManager.getApplication().isDispatchThread()) {
    runnable.run();
  } else {
    SwingUtilities.invokeLater(runnable);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:MediatorImpl.java

示例4: refresh

import com.intellij.util.Ticket; //导入依赖的package包/类
@CalledInAwt
@Override
public void refresh() {
  ApplicationManager.getApplication().assertIsDispatchThread();
  
  if (! Comparing.equal(myDetailsLoader.getCurrentlySelected(), myTicket)) {
    final Ticket copy = myTicket.copy();
    myDetailsLoader.updateSelection(copy, false);
    myDetailsPanel.loading();
    myDetailsPanel.layout();
  } else {
    refreshPresentation();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:AbstractRefreshablePanel.java

示例5: MediatorImpl

import com.intellij.util.Ticket; //导入依赖的package包/类
public MediatorImpl(final Project project, GitCommitsSequentially gitCommitsSequentially) {
  myProject = project;
  myGitCommitsSequentially = gitCommitsSequentially;
  myTicket = new Ticket();
  myController = new LoadGrowthController();
  mySequenceBuffers = new HashMap<VirtualFile, SequenceSupportBuffer>();
  myHaveRestrictingFilters = false;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:MediatorImpl.java

示例6: appendResult

import com.intellij.util.Ticket; //导入依赖的package包/类
@CalledInBackground
@Override
public StepType appendResult(final Ticket ticket,
                             final List<CommitI> result,
                             final @Nullable List<List<AbstractHash>> parents,
                             VirtualFile root, boolean checkForSequential) {
  if (! myTicket.equals(ticket)) {
    return StepType.STOP;
  }

  if (! result.isEmpty()) {
    /*if (mySequenceBuffers != null && checkForSequential) {
      try {
        mySequenceBuffers.get(root).appendResult(ticket, result, parents);
      }
      catch (VcsException e) {
        // todo
        myUIRefresh.acceptException(e);
        myTableWrapper.forceStop();
        return StepType.STOP;
      }
    } else {*/
      myTableWrapper.appendResult(ticket, result, parents);
    //}
  }
  if (myTableWrapper.isSuspend()) {
    return StepType.PAUSE;
  }
  return StepType.CONTINUE;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:31,代码来源:MediatorImpl.java

示例7: refresh

import com.intellij.util.Ticket; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public void refresh() {
  ApplicationManager.getApplication().assertIsDispatchThread();
  
  if (! Comparing.equal(myDetailsLoader.getCurrentlySelected(), myTicket)) {
    final Ticket copy = myTicket.copy();
    myDetailsLoader.updateSelection(copy, false);
    myDetailsPanel.loading();
    myDetailsPanel.layout();
  } else {
    refreshPresentation();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:15,代码来源:AbstractRefreshablePanel.java

示例8: Loader

import com.intellij.util.Ticket; //导入依赖的package包/类
private Loader(@Nullable Project project, @NotNull String title, final Ticket ticketCopy) {
  super(project, title, false, BackgroundFromStartOption.getInstance());
  myTicketCopy = ticketCopy;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AbstractRefreshablePanel.java

示例9: loadSkeleton

import com.intellij.util.Ticket; //导入依赖的package包/类
@CalledInAwt
@Override
public void loadSkeleton(final Ticket ticket,
                         final RootsHolder rootsHolder,
                         final Collection<String> startingPoints,
                         final GitLogFilters gitLogFilters,
                         final LoadGrowthController loadGrowthController, final boolean topoOrder) {
  if (myPreviousAlgorithm != null) {
    myPreviousAlgorithm.stop();
  }
  final List<LoaderAndRefresher<CommitHashPlusParents>> list = new ArrayList<LoaderAndRefresher<CommitHashPlusParents>>();
  final List<ByRootLoader> shortLoaders = new ArrayList<ByRootLoader>();
  final List<VirtualFile> roots = rootsHolder.getRoots();
  int i = 0;
  for (VirtualFile root : roots) {
    final LoaderAndRefresherImpl.MyRootHolder rootHolder = roots.size() == 1 ?
      new LoaderAndRefresherImpl.OneRootHolder(root) :
      new LoaderAndRefresherImpl.ManyCaseHolder(i, rootsHolder);

    if (! gitLogFilters.isUseOnlyHashes()) {
      final boolean haveStructureFilter = gitLogFilters.haveStructureFilter();
      // check if no files under root are selected
      if (haveStructureFilter && ! gitLogFilters.haveStructuresForRoot(root)) {
        ++ i;
        continue;
      }
      gitLogFilters.callConsumer(new Consumer<List<ChangesFilter.Filter>>() {
        @Override
        public void consume(final List<ChangesFilter.Filter> filters) {
          final LoaderAndRefresherImpl loaderAndRefresher =
            new LoaderAndRefresherImpl(ticket, filters, myMediator, startingPoints, myDetailsCache, myProject, rootHolder, myUsersIndex,
                                       loadGrowthController.getId(), haveStructureFilter, topoOrder, gitLogFilters.haveDisordering());
          list.add(loaderAndRefresher);
        }
      }, true, root);
    }

    shortLoaders.add(new ByRootLoader(myProject, rootHolder, myMediator, myDetailsCache, ticket, myUsersIndex, gitLogFilters, startingPoints));
    ++ i;
  }

  myUsersComponent.acceptUpdate(myUsersIndex.getKeys());

  if (myPreviousAlgorithm != null) {
    final Continuation oldContinuation = myPreviousAlgorithm.getContinuation();
    oldContinuation.cancelCurrent();
    oldContinuation.clearQueue();
  }

  final RepositoriesSorter sorter = new RepositoriesSorter(list, shortLoaders); // this will set previous algorithm for stop

  final Runnable runnable = new Runnable() {
    @Override
    public void run() {
      final Continuation continuation = Continuation.createForCurrentProgress(myProject, true, "Load git log data");
      sorter.setContinuation(continuation);
      continuation.add(Arrays.<TaskDescriptor>asList(sorter));
      continuation.resume();
    }
  };
  loadUnderProgress(runnable);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:63,代码来源:LoadController.java

示例10: appendResult

import com.intellij.util.Ticket; //导入依赖的package包/类
/**
 * @return false -> ticket already changed
 */
StepType appendResult(final Ticket ticket,
                      final List<CommitI> result,
                      @Nullable final List<List<AbstractHash>> parents, VirtualFile root, boolean checkForSequential);
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:Mediator.java

示例11: acceptStashHead

import com.intellij.util.Ticket; //导入依赖的package包/类
@Override
public void acceptStashHead(Ticket ticket, VirtualFile root, Pair<AbstractHash, AbstractHash> hash) {
  if (! myTicket.equals(ticket)) return;
  myUIRefresh.reportStash(root, hash);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:MediatorImpl.java

示例12: loadSkeleton

import com.intellij.util.Ticket; //导入依赖的package包/类
void loadSkeleton(Ticket ticket,
RootsHolder rootsHolder,
final Collection<String> startingPoints,
final GitLogFilters filters, LoadGrowthController loadGrowthController, final boolean topoOrder);
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:Loader.java

示例13: LoaderAndRefresherImpl

import com.intellij.util.Ticket; //导入依赖的package包/类
public LoaderAndRefresherImpl(final Ticket ticket,
                              Collection<ChangesFilter.Filter> filters,
                              Mediator mediator,
                              Collection<String> startingPoints,
                              DetailsCache detailsCache,
                              Project project,
                              MyRootHolder rootHolder,
                              final UsersIndex usersIndex,
                              final LoadGrowthController.ID id, boolean haveStructureFilter, boolean topoOrder, boolean haveDisordering) {
  myRootHolder = rootHolder;
  myUsersIndex = usersIndex;
  myId = id;
  myHaveStructureFilter = haveStructureFilter;
  myTopoOrder = topoOrder;
  myLoadParents = ! haveDisordering;
  myTicket = ticket;
  myFilters = filters;
  myMediator = mediator;
  myStartingPoints = startingPoints;
  myDetailsCache = detailsCache;
  myStepType = StepType.CONTINUE;
  myProject = project;
  myProgressAnalog = new Getter<Boolean>() {
    @Override
    public Boolean get() {
      return isInterrupted();
    }
  };
  myLowLevelAccess = new LowLevelAccessImpl(myProject, myRootHolder.getRoot());

  myRealConsumer = new Consumer<List<CommitHashPlusParents>>() {
    @Override
    public void consume(final List<CommitHashPlusParents> list) {
      if (isInterrupted()) return;
      final List<CommitI> buffer = new ArrayList<CommitI>();
      final List<List<AbstractHash>> parents = myLoadParents ? new ArrayList<List<AbstractHash>>() : null;
      for (CommitHashPlusParents commitHashPlusParents : list) {
        CommitI commit = new Commit(commitHashPlusParents.getHash(), commitHashPlusParents.getTime(),
                                    myUsersIndex.put(commitHashPlusParents.getAuthorName()));
        commit = myRootHolder.decorateByRoot(commit);
        buffer.add(commit);
        if (myLoadParents) {
          parents.add(commitHashPlusParents.getParents());
        }
      }

      StepType stepType = myMediator.appendResult(myTicket, buffer, parents, myRootHolder.getRoot(), true);
      if (! StepType.FINISHED.equals(myStepType)) {
        myStepType = stepType;
      }
    }
  };
  myBufferConsumer = new BufferedListConsumer<CommitHashPlusParents>(15, myRealConsumer, 400);
  myRepeatingLoadConsumer = new RepeatingLoadConsumer<CommitHashPlusParents>(myProject, myBufferConsumer.asConsumer());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:56,代码来源:LoaderAndRefresherImpl.java

示例14: Loader

import com.intellij.util.Ticket; //导入依赖的package包/类
private Loader(@Nullable Project project, @Nonnull String title, final Ticket ticketCopy) {
  super(project, title, false, BackgroundFromStartOption.getInstance());
  myTicketCopy = ticketCopy;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:AbstractRefreshablePanel.java

示例15: reportSymbolicRefs

import com.intellij.util.Ticket; //导入依赖的package包/类
void reportSymbolicRefs(final Ticket ticket, VirtualFile root, final CachedRefs symbolicRefs); 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:2,代码来源:Mediator.java


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