本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}