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

项目:intellij-ce-playground    文件:CoreApplicationEnvironment.java   
private <T,U> void doAddExplicitExtension(@NotNull final KeyedExtensionCollector<T,U> instance, @NotNull final U key, @NotNull final T object) {
  instance.addExplicitExtension(key, object);
  Disposer.register(myParentDisposable, new Disposable() {
    @Override
    public void dispose() {
      instance.removeExplicitExtension(key, object);
    }
  });
}
项目:consulo    文件:CoreApplicationEnvironment.java   
private <T,U> void doAddExplicitExtension(@Nonnull final KeyedExtensionCollector<T,U> instance, @Nonnull final U key, @Nonnull final T object) {
  instance.addExplicitExtension(key, object);
  Disposer.register(myParentDisposable, new Disposable() {
    @Override
    public void dispose() {
      instance.removeExplicitExtension(key, object);
    }
  });
}