本文整理匯總了Java中com.intellij.util.xml.model.DomModelCache類的典型用法代碼示例。如果您正苦於以下問題:Java DomModelCache類的具體用法?Java DomModelCache怎麽用?Java DomModelCache使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DomModelCache類屬於com.intellij.util.xml.model包,在下文中一共展示了DomModelCache類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: CachedMultipleDomModelFactory
import com.intellij.util.xml.model.DomModelCache; //導入依賴的package包/類
protected CachedMultipleDomModelFactory(@NotNull Class<T> aClass,
@NotNull ModelMerger modelMerger,
final Project project,
@NonNls String name) {
super(aClass,modelMerger);
myCombinedModelCache = new DomModelCache<M, Scope>(project, name + " combined model") {
@Override
@NotNull
protected CachedValueProvider.Result<M> computeValue(@NotNull final Scope scope) {
final M combinedModel = computeCombinedModel(scope);
return new CachedValueProvider.Result<M>(combinedModel, computeDependencies(combinedModel, scope));
}
};
myAllModelsCache = new DomModelCache<List<M>, Scope>(project, name + " models list") {
@Override
@NotNull
protected CachedValueProvider.Result<List<M>> computeValue(@NotNull final Scope scope) {
final List<M> models = computeAllModels(scope);
return new CachedValueProvider.Result<List<M>>(models, computeDependencies(null, scope));
}
};
}
示例2: CachedSimpleDomModelFactory
import com.intellij.util.xml.model.DomModelCache; //導入依賴的package包/類
protected CachedSimpleDomModelFactory(@NotNull Class<T> aClass,
@NotNull ModelMerger modelMerger,
final Project project,
@NonNls String name) {
super(aClass, modelMerger);
myModelCache = new DomModelCache<M, XmlFile>(project, name + " model") {
@Override
@NotNull
protected CachedValueProvider.Result<M> computeValue(@NotNull XmlFile file) {
file = (XmlFile)file.getOriginalFile();
final Scope scope = getModelScope(file);
final M model = computeModel(file, scope);
return new CachedValueProvider.Result<M>(model, computeDependencies(model, scope));
}
};
}
示例3: CachedMultipleDomModelFactory
import com.intellij.util.xml.model.DomModelCache; //導入依賴的package包/類
protected CachedMultipleDomModelFactory(@NotNull Class<T> aClass,
@NotNull ModelMerger modelMerger,
final Project project,
@NonNls String name) {
super(aClass,modelMerger);
myCombinedModelCache = new DomModelCache<M, Scope>(project, name + " combined model") {
@NotNull
protected CachedValueProvider.Result<M> computeValue(@NotNull final Scope scope) {
final M combinedModel = computeCombinedModel(scope);
return new CachedValueProvider.Result<M>(combinedModel, computeDependencies(combinedModel, scope));
}
};
myAllModelsCache = new DomModelCache<List<M>, Scope>(project, name + " models list") {
@NotNull
protected CachedValueProvider.Result<List<M>> computeValue(@NotNull final Scope scope) {
final List<M> models = computeAllModels(scope);
return new CachedValueProvider.Result<List<M>>(models, computeDependencies(null, scope));
}
};
}
示例4: CachedSimpleDomModelFactory
import com.intellij.util.xml.model.DomModelCache; //導入依賴的package包/類
protected CachedSimpleDomModelFactory(@NotNull Class<T> aClass,
@NotNull ModelMerger modelMerger,
final Project project,
@NonNls String name) {
super(aClass, modelMerger);
myModelCache = new DomModelCache<M, XmlFile>(project, name + " model") {
@NotNull
protected CachedValueProvider.Result<M> computeValue(@NotNull XmlFile file) {
file = (XmlFile)file.getOriginalFile();
final Scope scope = getModelScope(file);
final M model = computeModel(file, scope);
return new CachedValueProvider.Result<M>(model, computeDependencies(model, scope));
}
};
}