本文整理汇总了Java中com.intellij.util.xml.ResolvingConverter类的典型用法代码示例。如果您正苦于以下问题:Java ResolvingConverter类的具体用法?Java ResolvingConverter怎么用?Java ResolvingConverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResolvingConverter类属于com.intellij.util.xml包,在下文中一共展示了ResolvingConverter类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: findConverterForAttribute
import com.intellij.util.xml.ResolvingConverter; //导入依赖的package包/类
@Nullable
private static ResolvingConverter findConverterForAttribute(String nsPrefix,
String localName,
@NotNull AndroidFacet facet,
@NotNull GenericDomValue element) {
ResourceManager manager = facet.getResourceManager("android".equals(nsPrefix)
? AndroidUtils.SYSTEM_RESOURCE_PACKAGE
: null, element.getXmlElement());
if (manager != null) {
AttributeDefinitions attrDefs = manager.getAttributeDefinitions();
if (attrDefs != null) {
AttributeDefinition attr = attrDefs.getAttrDefByName(localName);
if (attr != null) {
return AndroidDomUtil.getConverter(attr);
}
}
}
return null;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:StyleItemConverter.java
示例2: getVariants
import com.intellij.util.xml.ResolvingConverter; //导入依赖的package包/类
@Override
@NotNull
public Collection<String> getVariants(ConvertContext context) {
List<String> variants = new ArrayList<String>();
for (ResolvingConverter<String> converter : converters) {
variants.addAll(converter.getVariants(context));
}
return variants;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:CompositeConverter.java
示例3: addVariants
import com.intellij.util.xml.ResolvingConverter; //导入依赖的package包/类
private static <T> void addVariants(ResolvingConverter<T> converter, Collection<T> variants, Collection result) {
for (T variant : variants) {
LookupElement lookupElement = converter.createLookupElement(variant);
if (lookupElement != null) {
result.add(lookupElement);
}
else {
result.add(variant);
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:MavenSmartCompletionContributor.java
示例4: getVariants
import com.intellij.util.xml.ResolvingConverter; //导入依赖的package包/类
@NotNull
private static Collection<?> getVariants(CompletionParameters parameters) {
if (!MavenDomUtil.isMavenFile(parameters.getOriginalFile())) return Collections.emptyList();
SmartList<?> result = new SmartList<Object>();
for (PsiReference each : getReferences(parameters)) {
if (each instanceof TagNameReference) continue;
if (each instanceof GenericDomValueReference) {
GenericDomValueReference reference = (GenericDomValueReference)each;
Converter converter = reference.getConverter();
if (converter instanceof MavenSmartConverter) {
result.addAll(((MavenSmartConverter)converter).getSmartVariants(reference.getConvertContext()));
}
else if (converter instanceof ResolvingConverter) {
//noinspection unchecked
result.addAll(((ResolvingConverter)converter).getVariants(reference.getConvertContext()));
}
}
else {
//noinspection unchecked
Collections.addAll((Collection)result, each.getVariants());
}
}
return result;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:MavenSmartCompletionContributor.java
示例5: FlagConverter
import com.intellij.util.xml.ResolvingConverter; //导入依赖的package包/类
public FlagConverter(@Nullable ResolvingConverter<String> additionalConverter, @NotNull String... values) {
super("|");
this.additionalConverter = additionalConverter;
Collections.addAll(myValues, values);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:FlagConverter.java
示例6: addConverter
import com.intellij.util.xml.ResolvingConverter; //导入依赖的package包/类
public void addConverter(@NotNull ResolvingConverter<String> converter) {
converters.add(converter);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:CompositeConverter.java
示例7: getConverters
import com.intellij.util.xml.ResolvingConverter; //导入依赖的package包/类
@NotNull
public List<ResolvingConverter<String>> getConverters() {
return converters;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:CompositeConverter.java
注:本文中的com.intellij.util.xml.ResolvingConverter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论