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


Java RegistriesHolder类代码示例

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


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

示例1: install

import org.waveprotocol.wave.client.wave.RegistriesHolder; //导入依赖的package包/类
/**
 * Installs parts of stage one that have dependencies.
 * <p>
 * This method is only called once all asynchronously loaded components of
 * stage one are ready.
 * <p>
 * Subclasses may override this to change the set of installed features.
 */
private void install() {
  Timer timer = Timing.start("StageOneProvider.install");
  try {
    // Statics.
    WavePanelResourceLoader.loadCss();
    RegistriesHolder.initialize();

    // Eagerly install some features.
    getFocusFrame();

    // Install wave panel into focusManager framework.
    FocusManager focusManager = FocusManager.getRoot();
    focusManager.add(getWavePanel());
    focusManager.select(getWavePanel());
  } finally {
    Timing.stop(timer);
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:27,代码来源:StageOneProvider.java

示例2: createDocumentRegistry

import org.waveprotocol.wave.client.wave.RegistriesHolder; //导入依赖的package包/类
/** @return the registry of documents in the wave. Subclasses may override. */
protected WaveDocuments<LazyContentDocument> createDocumentRegistry() {
  IndexedDocumentImpl.performValidation = false;

  DocumentFactory<?> dataDocFactory =
      ObservablePluggableMutableDocument.createFactory(createSchemas());
  DocumentFactory<LazyContentDocument> blipDocFactory =
      new DocumentFactory<LazyContentDocument>() {
        private final Registries registries = RegistriesHolder.get();

        @Override
        public LazyContentDocument create(
            WaveletId waveletId, String docId, DocInitialization content) {
          // TODO(piotrkaleta,hearnden): hook up real diff state.
          SimpleDiffDoc noDiff = SimpleDiffDoc.create(content, null);
          return LazyContentDocument.create(registries, noDiff);
        }
      };

  return WaveDocuments.create(blipDocFactory, dataDocFactory);
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:22,代码来源:StageTwo.java

示例3: createWaveDocuments

import org.waveprotocol.wave.client.wave.RegistriesHolder; //导入依赖的package包/类
/** @return the registry createDocument documents in the waveViewImpl.
 * Subclasses may override.
 */
private WaveDocuments<DiffContentDocument> createWaveDocuments() {
  IndexedDocumentImpl.performValidation = false;

  DocumentFactory<DiffContentDocument> blipDocumentFactory =
      new DocumentFactory<DiffContentDocument>() {

    @Override
    public DiffContentDocument create(final WaveletId waveletId, final String documentId,
        DocInitialization content) {
      Timer timer = Timing.start("create DiffContentDocument");
      try {
        ContentDocument core = new ContentDocument(DocumentSchema.NO_SCHEMA_CONSTRAINTS);
        core.setRegistries(RegistriesHolder.get());
        core.consume(content);
        return DiffContentDocument.create(core, getQuasiConversationView().getRoot());
      } finally {
        Timing.stop(timer);
      }
    }
  };

  DocumentFactory<?> dataDocumentFactory =
      ObservablePluggableMutableDocument.createFactory(getSchemaProvider());

  return WaveDocuments.create(blipDocumentFactory, dataDocumentFactory);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:30,代码来源:StageOneProvider.java


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