當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。