Examples of HaxeImportStatementWithWildcard


Examples of com.intellij.plugins.haxe.lang.psi.HaxeImportStatementWithWildcard

  }

  @Override
  public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
    PsiElement elementAt = file.findElementAt(editor.getCaretModel().getOffset());
    HaxeImportStatementWithWildcard importStatementWithWildcard = PsiTreeUtil.getParentOfType(elementAt, HaxeImportStatementWithWildcard.class);
    if (importStatementWithWildcard != null) {
      String qName = UsefulPsiTreeUtil.getQNameForImportStatementWithWildcardType(importStatementWithWildcard);
      if (!UsefulPsiTreeUtil.isImportStatementWildcardForType(qName)) {
        List<HaxeClass>
          classesForImportStatementWithWildcard = UsefulPsiTreeUtil.getClassesForImportStatementWithWildcard(importStatementWithWildcard);
View Full Code Here

Examples of com.intellij.plugins.haxe.lang.psi.HaxeImportStatementWithWildcard

  }

  @Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    PsiElement elementAt = file.findElementAt(editor.getCaretModel().getOffset());
    HaxeImportStatementWithWildcard importStatementWithWildcard = PsiTreeUtil.getParentOfType(elementAt, HaxeImportStatementWithWildcard.class);

    String packageName = importStatementWithWildcard.getReferenceExpression().getText();

    for (HaxeClass haxeClass : HaxeImportUtil.getClassesUsedFromImportStatementWithWildcard(file, importStatementWithWildcard)) {
      HaxeImportStatementRegular importStatementRegular =
        HaxeElementGenerator.createImportStatementFromPath(importStatementWithWildcard.getProject(), haxeClass.getQualifiedName());

      importStatementWithWildcard.getParent().addBefore(importStatementRegular, importStatementWithWildcard);
    }

    importStatementWithWildcard.delete();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.