當前位置: 首頁>>代碼示例>>Java>>正文


Java DomModelCache類代碼示例

本文整理匯總了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));
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:25,代碼來源:CachedMultipleDomModelFactory.java

示例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));
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:CachedSimpleDomModelFactory.java

示例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));
    }
  };
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:23,代碼來源:CachedMultipleDomModelFactory.java

示例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));
    }
  };
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:18,代碼來源:CachedSimpleDomModelFactory.java


注:本文中的com.intellij.util.xml.model.DomModelCache類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。