本文整理汇总了Java中com.intellij.plugins.haxe.lang.psi.HaxeType类的典型用法代码示例。如果您正苦于以下问题:Java HaxeType类的具体用法?Java HaxeType怎么用?Java HaxeType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HaxeType类属于com.intellij.plugins.haxe.lang.psi包,在下文中一共展示了HaxeType类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveHaxeClass
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@NotNull
@Override
public HaxeClassResolveResult resolveHaxeClass() {
LOG.trace("Resolving " + getText());
final HaxeFunctionType functionType = PsiTreeUtil.getChildOfType(this, HaxeFunctionType.class);
HaxeTypeOrAnonymous typeOrAnonymous = PsiTreeUtil.getChildOfType(this, HaxeTypeOrAnonymous.class);
if (functionType != null && !functionType.getTypeOrAnonymousList().isEmpty()) {
typeOrAnonymous = functionType.getTypeOrAnonymousList().iterator().next();
}
final HaxeType type = typeOrAnonymous != null ? typeOrAnonymous.getType() : PsiTreeUtil.getChildOfType(this, HaxeType.class);
return HaxeClassResolveResult.create(HaxeResolveUtil.tryResolveClassByQName(type));
}
示例2: getReferenceElements
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@NotNull
@Override
public PsiJavaCodeReferenceElement[] getReferenceElements() {
LOG.debug("getReferenceElements");
List<HaxeType> typeList = getTypeList();
PsiJavaCodeReferenceElement[] refList = new PsiJavaCodeReferenceElement[typeList.size()];
for (int i = 0; i < typeList.size(); ++i) {
refList[i] = typeList.get(i).getReferenceExpression();
}
return refList;
}
示例3: visitType
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@Override
public void visitType(@NotNull HaxeType type) {
super.visitType(type);
final HaxeReferenceExpression expression = type.getReferenceExpression();
if (expression.resolve() != null) {
return;
}
tryCreateAnnotation(expression);
}
示例4: doTest
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
public void doTest() {
final PsiFile file = PsiDocumentManager.getInstance(myFixture.getProject()).getPsiFile(myFixture.getEditor().getDocument());
assertNotNull(file);
final HaxeType type = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), HaxeType.class, false);
assertNotNull(type);
final GlobalSearchScope scope = HaxeResolveUtil.getScopeForElement(type);
new HaxeTypeAddImportIntentionAction(type, HaxeComponentIndex
.getItemsByName(type.getReferenceExpression().getText(), type.getProject(), scope))
.execute();
FileDocumentManager.getInstance().saveAllDocuments();
myFixture.checkResultByFile(getTestName(false) + ".txt");
}
示例5: doTest
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
public void doTest() {
final PsiFile file = PsiDocumentManager.getInstance(myFixture.getProject()).getPsiFile(myFixture.getEditor().getDocument());
assertNotNull(file);
final HaxeType type = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), HaxeType.class, false);
assertNotNull(type);
final GlobalSearchScope scope = HaxeResolveUtil.getScopeForElement(type);
new HaxeTypeAddImportIntentionAction(type, HaxeComponentIndex
.getItemsByName(type.getReferenceExpression().getText(), type.getProject(), scope))
.execute();
myFixture.checkResultByFile(getTestName(false) + ".txt");
}
示例6: HaxeClassReferenceModel
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
public HaxeClassReferenceModel(HaxeType type) {
this.type = type;
}
示例7: getPsi
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
public HaxeType getPsi() {
return type;
}
示例8: HaxePsiTypeAdapter
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
public HaxePsiTypeAdapter(@NotNull HaxeType haxeType) {
// Haxe doesn't use annotations in the same way that Java does. Instead, they're all
// modifiers, including macros (which are more like annotations).
super(PsiAnnotation.EMPTY_ARRAY);
myType = haxeType;
}
示例9: copy
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@Override
public PsiElement copy() {
return (HaxePsiTypeAdapter)((HaxeType)myType.copy()).getPsiType();
}
示例10: getTypeList
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@NotNull
public List<HaxeType> getTypeList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, HaxeType.class);
}
示例11: checkAfterTypeOrComponentName
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
private static boolean checkAfterTypeOrComponentName(PsiFile file, int offset) {
PsiElement at = file.findElementAt(offset - 1);
PsiElement toCheck = UsefulPsiTreeUtil.getPrevSiblingSkipWhiteSpacesAndComments(at, false);
return PsiTreeUtil.getParentOfType(toCheck, HaxeType.class, HaxeComponentName.class) != null;
}
示例12: getExtendsList
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@NotNull
@Override
public List<HaxeType> getExtendsList()
{
return HaxeResolveUtil.findExtendsList(PsiTreeUtil.getChildOfType(this, HaxeInheritList.class));
}
示例13: getImplementsList
import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@NotNull
@Override
public List<HaxeType> getImplementsList()
{
return HaxeResolveUtil.getImplementsList(PsiTreeUtil.getChildOfType(this, HaxeInheritList.class));
}