当前位置: 首页>>代码示例>>Java>>正文


Java MostlySingularMultiMap.add方法代码示例

本文整理汇总了Java中com.intellij.util.containers.MostlySingularMultiMap.add方法的典型用法代码示例。如果您正苦于以下问题:Java MostlySingularMultiMap.add方法的具体用法?Java MostlySingularMultiMap.add怎么用?Java MostlySingularMultiMap.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.util.containers.MostlySingularMultiMap的用法示例。


在下文中一共展示了MostlySingularMultiMap.add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ensurePropertiesLoaded

import com.intellij.util.containers.MostlySingularMultiMap; //导入方法依赖的package包/类
private void ensurePropertiesLoaded() {
  while (myFileModificationStamp != myFile.getModificationStamp() || myPropertiesMap == null) {
    myFileModificationStamp = myFile.getModificationStamp();
    MostlySingularMultiMap<String, IProperty> propertiesMap = new MostlySingularMultiMap<String, IProperty>();
    XmlTag rootTag = myFile.getRootTag();
    final List<IProperty> propertiesOrder = new ArrayList<IProperty>();
    if (rootTag != null) {
      XmlTag[] entries = rootTag.findSubTags("entry");
      for (XmlTag entry : entries) {
        XmlProperty property = new XmlProperty(entry, this);
        propertiesOrder.add(property);
        propertiesMap.add(property.getKey(), property);
      }
    }
    final boolean isAlphaSorted = PropertiesImplUtil.isAlphaSorted(propertiesOrder);
    myAlphaSorted = isAlphaSorted;
    myProperties = propertiesOrder;
    myPropertiesMap = propertiesMap;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:XmlPropertiesFileImpl.java

示例2: ensurePropertiesLoaded

import com.intellij.util.containers.MostlySingularMultiMap; //导入方法依赖的package包/类
private void ensurePropertiesLoaded() {
  if (myPropertiesMap != null) return;

  final ASTNode[] props = getPropertiesList().getChildren(PropertiesElementTypes.PROPERTIES);
  MostlySingularMultiMap<String, IProperty> propertiesMap = new MostlySingularMultiMap<String, IProperty>();
  List<IProperty> properties = new ArrayList<IProperty>(props.length);
  for (final ASTNode prop : props) {
    final Property property = (Property)prop.getPsi();
    String key = property.getUnescapedKey();
    propertiesMap.add(key, property);
    properties.add(property);
  }
  final boolean isAlphaSorted = PropertiesImplUtil.isAlphaSorted(properties);
  synchronized (lock) {
    if (myPropertiesMap != null) return;
    myProperties = properties;
    myPropertiesMap = propertiesMap;
    myAlphaSorted = isAlphaSorted;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:PropertiesFileImpl.java

示例3: ensurePropertiesLoaded

import com.intellij.util.containers.MostlySingularMultiMap; //导入方法依赖的package包/类
private void ensurePropertiesLoaded() {
  if (myPropertiesMap != null) return;

  final ASTNode[] props = getPropertiesList().getChildren(PropertiesElementTypes.PROPERTIES);
  MostlySingularMultiMap<String, IProperty> propertiesMap = new MostlySingularMultiMap<String, IProperty>();
  List<IProperty> properties = new ArrayList<IProperty>(props.length);
  for (final ASTNode prop : props) {
    final Property property = (Property)prop.getPsi();
    String key = property.getUnescapedKey();
    propertiesMap.add(key, property);
    properties.add(property);
  }
  synchronized (lock) {
    if (myPropertiesMap != null) return;
    myProperties = properties;
    myPropertiesMap = propertiesMap;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:PropertiesFileImpl.java

示例4: getDuplicateMethods

import com.intellij.util.containers.MostlySingularMultiMap; //导入方法依赖的package包/类
@NotNull
private MostlySingularMultiMap<MethodSignature, PsiMethod> getDuplicateMethods(@NotNull PsiClass aClass)
{
	MostlySingularMultiMap<MethodSignature, PsiMethod> signatures = myDuplicateMethods.get(aClass);
	if(signatures == null)
	{
		signatures = new MostlySingularMultiMap<>();
		for(PsiMethod method : aClass.getMethods())
		{
			if(method instanceof ExternallyDefinedPsiElement)
			{
				continue; // ignore aspectj-weaved methods; they are checked elsewhere
			}
			MethodSignature signature = method.getSignature(PsiSubstitutor.EMPTY);
			signatures.add(signature, method);
		}

		myDuplicateMethods.put(aClass, signatures);
	}
	return signatures;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:22,代码来源:HighlightVisitorImpl.java

示例5: getDuplicateMethods

import com.intellij.util.containers.MostlySingularMultiMap; //导入方法依赖的package包/类
@NotNull
private MostlySingularMultiMap<MethodSignature, PsiMethod> getDuplicateMethods(@NotNull PsiClass aClass) {
  MostlySingularMultiMap<MethodSignature, PsiMethod> signatures = myDuplicateMethods.get(aClass);
  if (signatures == null) {
    signatures = new MostlySingularMultiMap<MethodSignature, PsiMethod>();
    for (PsiMethod method : aClass.getMethods()) {
      if (method instanceof ExternallyDefinedPsiElement) continue; // ignore aspectj-weaved methods; they are checked elsewhere
      MethodSignature signature = method.getSignature(PsiSubstitutor.EMPTY);
      signatures.add(signature, method);
    }

    myDuplicateMethods.put(aClass, signatures);
  }
  return signatures;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:HighlightVisitorImpl.java

示例6: getDuplicateMethods

import com.intellij.util.containers.MostlySingularMultiMap; //导入方法依赖的package包/类
@NotNull
private MostlySingularMultiMap<MethodSignature, PsiMethod> getDuplicateMethods(PsiClass aClass) {
  MostlySingularMultiMap<MethodSignature, PsiMethod> signatures = myDuplicateMethods.get(aClass);
  if (signatures == null) {
    signatures = new MostlySingularMultiMap<MethodSignature, PsiMethod>();
    for (PsiMethod method : aClass.getMethods()) {
      if (method instanceof ExternallyDefinedPsiElement) continue; // ignore aspectj-weaved methods; they are checked elsewhere
      MethodSignature signature = method.getSignature(PsiSubstitutor.EMPTY);
      signatures.add(signature, method);
    }

    myDuplicateMethods.put(aClass, signatures);
  }
  return signatures;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:HighlightVisitorImpl.java


注:本文中的com.intellij.util.containers.MostlySingularMultiMap.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。