Package com.jetbrains.lang.dart.psi.impl

Examples of com.jetbrains.lang.dart.psi.impl.DartOperatorExpressionImpl


    return DartBundle.message("dart.create.operator.fix.name", myFunctionName);
  }

  @Override
  protected boolean isAvailable(Project project, PsiElement element, Editor editor, PsiFile file) {
    final DartOperatorExpressionImpl operatorExpression = PsiTreeUtil.getParentOfType(element, DartOperatorExpressionImpl.class);
    final DartReference[] references = PsiTreeUtil.getChildrenOfType(operatorExpression, DartReference.class);
    if (references == null || references[0].resolveDartClass().getDartClass() == null) return false;

    final PsiElement anchor = findAnchor(element);
    return anchor != null && !DartWritingAccessProvider.isInDartSdkOrDartPackagesFolder(anchor.getContainingFile());
View Full Code Here


  }

  @Nullable
  @Override
  protected PsiElement findAnchor(PsiElement element) {
    DartOperatorExpressionImpl operatorExpression = PsiTreeUtil.getParentOfType(element, DartOperatorExpressionImpl.class);
    final DartReference[] references = PsiTreeUtil.getChildrenOfType(operatorExpression, DartReference.class);
    assert references != null;
    DartClass aClass = references[0].resolveDartClass().getDartClass();
    return DartResolveUtil.getBody(aClass);
  }
View Full Code Here

    return DartResolveUtil.getBody(aClass);
  }

  @Override
  protected boolean buildTemplate(Template template, PsiElement psiElement) {
    DartOperatorExpressionImpl operatorExpression = PsiTreeUtil.getParentOfType(psiElement, DartOperatorExpressionImpl.class);
    final DartReference[] references = PsiTreeUtil.getChildrenOfType(operatorExpression, DartReference.class);
    assert references != null;
    DartClass aClass = references[0].resolveDartClass().getDartClass();
    assert aClass != null;
View Full Code Here

TOP

Related Classes of com.jetbrains.lang.dart.psi.impl.DartOperatorExpressionImpl

Copyright © 2018 www.massapicom. 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.