Java 类com.intellij.openapi.util.SimpleModificationTracker 实例源码

项目:consulo    文件:PsiModificationTrackerImpl.java   
@Nonnull
private static SimpleModificationTracker wrapped(RegistryValue value, SimpleModificationTracker fallback, boolean testMode) {
  if (testMode) {
    return new SimpleModificationTracker();
  }
  return new SimpleModificationTracker() {
    @Override
    public long getModificationCount() {
      return value.asBoolean() ? super.getModificationCount() : fallback.getModificationCount();
    }

    @Override
    public void incModificationCount() {
      if (value.asBoolean()) super.incModificationCount();
      //else fallback.incModificationCount();
    }
  };
}
项目:intellij-ce-playground    文件:FacetModificationTrackingServiceImpl.java   
private Pair<SimpleModificationTracker, EventDispatcher<ModificationTrackerListener>> getFacetInfo(final Facet facet) {
  Pair<SimpleModificationTracker, EventDispatcher<ModificationTrackerListener>> pair = myModificationsTrackers.get(facet);
  if (pair == null) {
    pair = Pair.create(new SimpleModificationTracker(), EventDispatcher.create(ModificationTrackerListener.class));
    myModificationsTrackers.put(facet, pair);
  }
  return pair;
}
项目:intellij-ce-playground    文件:FacetModificationTrackingServiceImpl.java   
@Override
public void facetConfigurationChanged(@NotNull final Facet facet) {
  final Pair<SimpleModificationTracker, EventDispatcher<ModificationTrackerListener>> pair = myModificationsTrackers.get(facet);
  if (pair != null) {
    pair.first.incModificationCount();
    pair.second.getMulticaster().modificationCountChanged(facet);
  }
}
项目:intellij    文件:BlazeSourceJarNavigationPolicy.java   
private Result<PsiFile> notFound(ClsFileImpl file) {
  // A "not-found" result is null, but depends on the project sync tracker, so it will expire
  // after the next blaze sync. This means we'll run this check again after every sync for files
  // that don't have source jars, but it's not a huge deal because checking for the source jar
  // only takes a few microseconds.
  projectSyncTrackers.putIfAbsent(file.getProject(), new SimpleModificationTracker());
  return Result.create(null, projectSyncTrackers.get(file.getProject()));
}
项目:intellij    文件:BlazeSourceJarNavigationPolicy.java   
@Override
public void afterSync(
    Project project, BlazeContext context, SyncMode syncMode, SyncResult syncResult) {
  SimpleModificationTracker modificationTracker = projectSyncTrackers.get(project);
  if (modificationTracker != null) {
    modificationTracker.incModificationCount();
  }
}
项目:intellij-ce-playground    文件:ClassInnerStuffCache.java   
public ClassInnerStuffCache(@NotNull PsiExtensibleClass aClass) {
  myClass = aClass;
  myTracker = new SimpleModificationTracker();
}
项目:intellij-ce-playground    文件:MockDumbService.java   
@Override
public ModificationTracker getModificationTracker() {
  return new SimpleModificationTracker();
}
项目:intellij-ce-playground    文件:FacetModificationTrackingServiceImpl.java   
@Override
public void incFacetModificationTracker(@NotNull final Facet facet) {
  final Pair<SimpleModificationTracker, EventDispatcher<ModificationTrackerListener>> pair = getFacetInfo(facet);
  pair.first.incModificationCount();
  pair.second.getMulticaster().modificationCountChanged(facet);
}
项目:consulo    文件:MockDumbService.java   
@Override
public ModificationTracker getModificationTracker() {
  return new SimpleModificationTracker();
}
项目:consulo    文件:PsiModificationTrackerImpl.java   
public void incLanguageModificationCount(@Nullable Language language) {
  if (language == null) return;
  ((SimpleModificationTracker)myLanguageTrackers.get(language)).incModificationCount();
}
项目:consulo-java    文件:ClassInnerStuffCache.java   
public ClassInnerStuffCache(@NotNull PsiExtensibleClass aClass)
{
    myClass = aClass;
    myTracker = new SimpleModificationTracker();
}