本文整理匯總了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);
}
}
示例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);
}
示例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);
}