本文整理汇总了Java中com.intellij.lang.ant.AntIntrospector类的典型用法代码示例。如果您正苦于以下问题:Java AntIntrospector类的具体用法?Java AntIntrospector怎么用?Java AntIntrospector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AntIntrospector类属于com.intellij.lang.ant包,在下文中一共展示了AntIntrospector类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processNestedElements
import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
public boolean processNestedElements(PsiScopeProcessor processor) {
final AntIntrospector introspector = AntDomExtender.getIntrospector(myAntClass);
if (introspector != null) {
String expectedName = ResolveUtil.getNameHint(processor);
final PsiType stringType = getParameterList().getParameters()[1].getType();
final PsiType closureType = getParameterList().getParameters()[2].getType();
for (String name : Collections.list(introspector.getNestedElements())) {
if (expectedName == null || expectedName.equals(name)) {
final AntBuilderMethod method = new AntBuilderMethod(myPlace, name, closureType, introspector.getElementType(name),
stringType);
if (!processor.execute(method, ResolveState.initial())) return false;
}
}
}
return true;
}
示例2: getIntrospector
import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
@Nullable
public static AntIntrospector getIntrospector(Class c) {
try {
return AntIntrospector.getInstance(c);
}
catch (Throwable ignored) {
}
return null;
}
示例3: getContexts
import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
private List<AbstractIntrospector> getContexts() {
if (myContexts != null) {
return myContexts;
}
final List<AbstractIntrospector> parents = new ArrayList<AbstractIntrospector>();
final AntDomMacroDef macroDef = myElement.getParentOfType(AntDomMacroDef.class, true);
if (macroDef != null) {
final AntDomSequentialTask body = macroDef.getMacroBody();
if (body != null) {
body.accept(new AntDomRecursiveVisitor() {
public void visitAntDomCustomElement(AntDomCustomElement custom) {
if (myElement.equals(custom.getDeclaringElement())) {
final AntDomElement parent = custom.getParentOfType(AntDomElement.class, true);
if (parent != null) {
final Class type = parent.getChildDescription().getUserData(ELEMENT_IMPL_CLASS_KEY);
if (type != null) {
final AntIntrospector antIntrospector = AntIntrospector.getInstance(type);
if (antIntrospector != null) {
parents.add(new ClassIntrospectorAdapter(antIntrospector));
}
}
}
}
}
});
}
}
return myContexts = parents;
}
示例4: ClassIntrospectorAdapter
import com.intellij.lang.ant.AntIntrospector; //导入依赖的package包/类
private ClassIntrospectorAdapter(AntIntrospector introspector) {
this(introspector, null, null);
}