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


Java HaxeType类代码示例

本文整理汇总了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));
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:13,代码来源:HaxeClassReferenceImpl.java

示例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;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:12,代码来源:HaxeInheritPsiMixinImpl.java

示例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);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:11,代码来源:HaxeTypeAnnotator.java

示例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");
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:13,代码来源:HaxeTypeAddImportIntentionActionTest.java

示例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");
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:12,代码来源:HaxeTypeAddImportIntentionActionTest.java

示例6: HaxeClassReferenceModel

import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
public HaxeClassReferenceModel(HaxeType type) {
  this.type = type;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:4,代码来源:HaxeClassReferenceModel.java

示例7: getPsi

import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
public HaxeType getPsi() {
  return type;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:4,代码来源:HaxeClassReferenceModel.java

示例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;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:7,代码来源:HaxePsiTypeAdapter.java

示例9: copy

import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@Override
public PsiElement copy() {
  return (HaxePsiTypeAdapter)((HaxeType)myType.copy()).getPsiType();
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:5,代码来源:HaxePsiTypeAdapter.java

示例10: getTypeList

import com.intellij.plugins.haxe.lang.psi.HaxeType; //导入依赖的package包/类
@NotNull
public List<HaxeType> getTypeList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, HaxeType.class);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:5,代码来源:HaxeInheritPsiMixinImpl.java

示例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;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:6,代码来源:HaxeTypedHandler.java

示例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));
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:7,代码来源:AbstractHaxePsiClass.java

示例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));
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:7,代码来源:AbstractHaxePsiClass.java


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