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)); } }; }
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)); } }; }
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)); } }; }
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)); } }; }
public DomModelFactoryHelper(@NotNull Class<T> aClass, @NotNull ModelMerger modelMerger) { myClass = aClass; myModelMerger = modelMerger; }
public ModelMerger getModelMerger() { return myModelMerger; }
public SimpleDomModelFactory(@NotNull Class<T> aClass, @NotNull ModelMerger modelMerger) { super(aClass, modelMerger); }