Java Code Examples for com.intellij.psi.util.PsiTreeUtil

The following are top voted examples for showing how to use com.intellij.psi.util.PsiTreeUtil. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: ReactPropTypes-Plugin   File: CommonAction.java   Source Code and License 7 votes vote down vote up
@NotNull
private List<PropTypeBean>  findPropsNameListWithIdentityReference(String identity, PsiElement psiElement){
  return PsiTreeUtil.findChildrenOfType(psiElement, LeafPsiElement.class)
          .stream()
          .filter(o -> o.getText().equals(identity))
          .filter(o -> o.getElementType().toString().equals("JS:IDENTIFIER"))
          .filter(o -> {
            if(o.getParent() instanceof JSReferenceExpressionImpl){
              JSReferenceExpressionImpl parent = (JSReferenceExpressionImpl) o.getParent();
              if(parent.getTreeNext()!=null && parent.getTreeNext().getElementType().toString().equals("JS:DOT")
                      &&parent.getTreeNext().getTreeNext()!=null){
                return true;
              }
            }
            return  false;
          })
          .map(o -> ((JSReferenceExpressionImpl)o.getParent()).getTreeNext().getTreeNext().getText())
          .distinct()
          .map(o -> new PropTypeBean(o,"any", false))
          .collect(Collectors.toList());
}
 
Example 2
Project: intellij-csv-validator   File: CsvStructureViewElement.java   Source Code and License 6 votes vote down vote up
private Map<Integer, CsvColumnInfo<PsiElement>> createColumnInfoMap(CsvFile csvFile) {
    Map<Integer, CsvColumnInfo<PsiElement>> columnInfoMap = new HashMap<>();
    CsvRecord[] records = PsiTreeUtil.getChildrenOfType(csvFile, CsvRecord.class);
    int row = 0;
    for (CsvRecord record : records) {
        int column = 0;
        for (CsvField field : record.getFieldList()) {
            Integer length = field.getTextLength();
            if (!columnInfoMap.containsKey(column)) {
                columnInfoMap.put(column, new CsvColumnInfo(column, length));
            } else if (columnInfoMap.get(column).getMaxLength() < length) {
                columnInfoMap.get(column).setMaxLength(length);
            }
            columnInfoMap.get(column).addElement(field, row);
            ++column;
        }
        ++row;
    }
    return columnInfoMap;
}
 
Example 3
Project: yii2support   File: CompletionContributor.java   Source Code and License 6 votes vote down vote up
@Override
public boolean invokeAutoPopup(@NotNull PsiElement position, char typeChar) {
    MethodReference reference = PsiTreeUtil.getParentOfType(position, MethodReference.class);
    if (reference != null && reference.getName() != null && reference.getName().equals("t") && reference.getClassReference() instanceof ClassReference) {
        ClassReference classReference = (ClassReference) reference.getClassReference();
        if (classReference == null || classReference.getName() == null || !classReference.getName().equals("Yii")) {
            return false;
        }
        if (typeChar == '\'' || typeChar == '"') {
            if (position instanceof LeafPsiElement && (position.getText().equals("$category") || position.getText().equals("$message"))) {
                return true;
            }
            if (position.getNextSibling() instanceof ParameterList) {
                return true;
            }
        }
    }

    return false;
}
 
Example 4
Project: AppleScript-IDEA   File: AppleScriptResolveUtil.java   Source Code and License 6 votes vote down vote up
@NotNull
public static List<AppleScriptComponent> getNamedSubComponentsFor(@NotNull AppleScriptScriptObject script) {
  List<AppleScriptComponent> result = new ArrayList<>();
  AppleScriptScriptBody scriptBody = script.getScriptBody();
  AppleScriptComponent[] namedComponents = PsiTreeUtil.getChildrenOfType(scriptBody, AppleScriptComponent.class);
  AppleScriptAssignmentStatement[] varsCreations = PsiTreeUtil.getChildrenOfType(scriptBody, AppleScriptAssignmentStatement.class);
  AppleScriptVarDeclarationList[] varsDeclarations = PsiTreeUtil.getChildrenOfType(scriptBody, AppleScriptVarDeclarationList.class);

  if (namedComponents != null) {
    result.addAll(Arrays.asList(namedComponents));
  }
  if (varsCreations != null) {
    for (AppleScriptAssignmentStatement variable : varsCreations) {
      result.addAll(variable.getTargets());
    }
  }
  if (varsDeclarations != null) {
    for (AppleScriptVarDeclarationList declarationList : varsDeclarations) {
      AppleScriptComponent[] vars = PsiTreeUtil.getChildrenOfType(declarationList, AppleScriptComponent.class);
      if (vars != null) {
        result.addAll(Arrays.asList(vars));
      }
    }
  }
  return result;
}
 
Example 5
Project: hybris-integration-intellij-idea-plugin   File: BeansUtils.java   Source Code and License 6 votes vote down vote up
public static <T extends DomElement, V> GenericAttributeValue<V> expectDomAttributeValue(
    @NotNull final PsiElement element,
    @NotNull final Class<? extends T> domTagClass,
    @NotNull final Function<T, GenericAttributeValue<V>> domGetter
) {
    final DomManager domManager = DomManager.getDomManager(element.getProject());

    if (!(element instanceof XmlElement)) {
        return null;
    }

    final XmlAttribute xmlAttribute = PsiTreeUtil.getParentOfType(element, XmlAttribute.class, false);
    if (xmlAttribute == null) {
        return null;
    }

    final XmlTag xmlParentTag = PsiTreeUtil.getParentOfType(element, XmlTag.class, false);
    DomElement domParentTag = domManager.getDomElement(xmlParentTag);

    return Optional.ofNullable(domParentTag)
                   .map(o -> ObjectUtils.tryCast(o, domTagClass))
                   .map(domGetter)
                   .filter(val -> val == domManager.getDomElement(xmlAttribute))
                   .orElse(null);
}
 
Example 6
Project: manifold-ij   File: ManifoldPsiClassAnnotator.java   Source Code and License 6 votes vote down vote up
public static PsiClass getContainingClass( PsiElement element )
{
  final PsiClass psiClass = PsiTreeUtil.getParentOfType( element, PsiClass.class, false );
  if( psiClass == null )
  {
    final PsiFile containingFile = element.getContainingFile();
    if( containingFile instanceof PsiClassOwner )
    {
      final PsiClass[] classes = ((PsiClassOwner)containingFile).getClasses();
      if( classes.length == 1 )
      {
        return classes[0];
      }
    }
  }
  return psiClass;
}
 
Example 7
Project: idea-php-typo3-plugin   File: PhpLangUtil.java   Source Code and License 6 votes vote down vote up
public static String getClassName(@NotNull PsiElement element) {
    ParameterList parameterList = PsiTreeUtil.getParentOfType(element, ParameterList.class);
    if (parameterList == null) {
        return null;
    }

    MethodReference methodReference = PsiTreeUtil.getParentOfType(element, MethodReference.class);
    if (methodReference == null) {
        return null;
    }

    Variable variableBeingCalledOn = PsiTreeUtil.findChildOfType(methodReference, Variable.class);
    if (variableBeingCalledOn != null && variableBeingCalledOn.getInferredType() != null) {
        PhpType inferredType = variableBeingCalledOn.getInferredType();
        return inferredType.toString();
    }

    ClassReference classReference = PsiTreeUtil.getChildOfType(methodReference, ClassReference.class);

    return extractFqnFromClassReference(methodReference, classReference);
}
 
Example 8
Project: hybris-integration-intellij-idea-plugin   File: ImpexHeaderItemTypeAttributeNameCompletionProvider.java   Source Code and License 6 votes vote down vote up
@Nullable
@Contract("null -> null")
protected ImpexHeaderTypeName getHeaderTypeNamePsiElementOfAttribute(@Nullable final PsiElement headerAttributePsiElement) {
    if (null == headerAttributePsiElement || null == headerAttributePsiElement.getNode()) {
        return null;
    }

    final ImpexHeaderLine impexHeaderLine = PsiTreeUtil.getParentOfType(
        headerAttributePsiElement,
        ImpexHeaderLine.class
    );

    if (null == impexHeaderLine) {
        return null;
    }

    final ImpexFullHeaderType impexFullHeaderType = impexHeaderLine.getFullHeaderType();

    return null == impexFullHeaderType ? null : impexFullHeaderType.getHeaderTypeName();
}
 
Example 9
Project: reasonml-idea-plugin   File: DocumentationProvider.java   Source Code and License 5 votes vote down vote up
@Override
public String generateDoc(PsiElement element, @Nullable PsiElement originalElement) {
    if (element instanceof PsiModuleName) {
        element = element.getParent();
        PsiElement previousElement = element == null ? null : PsiTreeUtil.prevVisibleLeaf(element);
        if (previousElement instanceof PsiComment) {
            StringBuilder sb = new StringBuilder();
            sb.append(previousElement.getText());
            return sb.toString();
        }
    }

    return super.generateDoc(element, originalElement);
}
 
Example 10
Project: retrofit2-lint   File: UnusedCallObjectDetector.java   Source Code and License 5 votes vote down vote up
private boolean isCallResultUsed(PsiMethodCallExpression call) {
    if (hasChainedMethodCall(call)) {
        return true;
    } else if (getBoundVariable(call, true) != null) {
        // TODO: Check that variable is actually used
        return true;
    } else if (PsiTreeUtil.getParentOfType(call, PsiReturnStatement.class) != null) {
        return true;
    } else if (PsiTreeUtil.getParentOfType(call, PsiMethodCallExpression.class) != null) {
        return true;
    }
    return false;
}
 
Example 11
Project: ReactPropTypes-Plugin   File: CommonAction.java   Source Code and License 5 votes vote down vote up
@Nullable
ES6ImportDeclaration getReactImportDeclaration(PsiFile file){
  return PsiTreeUtil.findChildrenOfType(file, ES6FromClause.class)
          .stream()
          .filter(o -> o.getText().contains("\'react\'"))
          .filter(o -> o.getParent() instanceof ES6ImportDeclaration)
          .map(o -> (ES6ImportDeclaration) o.getParent())
          .findFirst()
          .orElse(null);

}
 
Example 12
Project: educational-plugin   File: EduKotlinPyCharmTaskChecker.java   Source Code and License 5 votes vote down vote up
@Override
protected void setProcessParameters(Project project, ApplicationConfiguration configuration, Module module, @NotNull VirtualFile testsFile) {
  configuration.setMainClassName(EduIntelliJNames.TEST_RUNNER_CLASS);
  configuration.setModule(module);
  PsiFile psiFile = PsiManager.getInstance(project).findFile(testsFile);
  Collection<KtClass> ktClasses = PsiTreeUtil.findChildrenOfType(psiFile, KtClass.class);
  for (KtClass ktClass : ktClasses) {
    String name = ktClass.getName();
    configuration.setProgramParameters(name);
  }
}
 
Example 13
Project: AppleScript-IDEA   File: AbstractAppleScriptHandlerCall.java   Source Code and License 5 votes vote down vote up
@NotNull
@Override
protected ResolveResult[] resolveInner(boolean incompleteCode, @NotNull PsiFile containingFile) {
  final AppleScriptResolveProcessor resolveProcessor = new AppleScriptResolveProcessor(getHandlerSelector());
  PsiTreeUtil.treeWalkUp(resolveProcessor, AbstractAppleScriptHandlerCall.this, null, ResolveState.initial());
  final List<PsiElement> results = new ArrayList<>();
  results.add(resolveProcessor.getResult());
  return AppleScriptResolveUtil.toCandidateInfoArray(results);
}
 
Example 14
Project: AppleScript-IDEA   File: AppleScriptReferenceElementImpl.java   Source Code and License 5 votes vote down vote up
@Override
public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException {
  PsiElement element = this;
  final AppleScriptIdentifier identifier = PsiTreeUtil.getChildOfType(element, AppleScriptIdentifier.class);
  final AppleScriptIdentifier identifierNew = AppleScriptPsiElementFactory.createIdentifierFromText(getProject(), newElementName);
  if (identifierNew != null && identifier != null) {
    element.getNode().replaceChild(identifier.getNode(), identifierNew.getNode());
  }
  return this;
}
 
Example 15
Project: yii2inspections   File: TranslationKeysIndexer.java   Source Code and License 5 votes vote down vote up
@NotNull
@Override
public DataIndexer<String, Void, FileContent> getIndexer() {
    return fileContent -> {
        final Map<String, Void> map = new THashMap<>();

        /* ignore file if its' structure is not as expected */
        final PhpReturn returnExpression = PsiTreeUtil.findChildOfType(fileContent.getPsiFile(), PhpReturn.class);
        final PsiElement argument        = null == returnExpression ? null : returnExpression.getArgument();
        if (!(argument instanceof ArrayCreationExpression)) {
            return map;
        }

        /* extract translations from the file */
        for (ArrayHashElement item : ((ArrayCreationExpression) argument).getHashElements()) {
            final PhpPsiElement key = item.getKey();
            if (key instanceof StringLiteralExpression) {
                final StringLiteralExpression literal = (StringLiteralExpression) key;
                final String message                  = literal.getContents();
                if (message.length() > 0) {
                    map.putIfAbsent(PhpStringUtil.unescapeText(message, literal.isSingleQuote()), null);
                }
            }
        }

        return map;
    };
}
 
Example 16
Project: reasonml-idea-plugin   File: PsiModuleReference.java   Source Code and License 5 votes vote down vote up
@Nullable
@Override
public PsiElement resolve() {
    PsiElement parent = PsiTreeUtil.getParentOfType(myElement, PsiModule.class, PsiOpen.class);

    // If name is used in a module definition, it's already the reference
    if (parent instanceof PsiModule && ((PsiModule) parent).getNameIdentifier() == myElement) {
        return null;
    }

    Project project = myElement.getProject();

    // In open expression, name resolve to a file
    if (parent instanceof PsiOpen) {
        PsiFile file = RmlPsiUtil.findFileModule(project, m_referenceName);
        if (file != null) {
            return file;
        }
    }

    // No parent found, try to find the expression in current file
    PsiFile containingFile = myElement.getContainingFile();
    PsiModule module = ((FileBase) containingFile).getModule(m_referenceName);
    if (module != null) {
        return module.getNameIdentifier();
    }

    // No parent found, find the corresponding file
    PsiFile fileModule = RmlPsiUtil.findFileModule(project, m_referenceName);
    if (fileModule != null) {
        return fileModule;
    }

    return null;
}
 
Example 17
Project: magento2-phpstorm-plugin   File: ModulePackageIndex.java   Source Code and License 5 votes vote down vote up
@NotNull
@Override
public DataIndexer<String, Void, FileContent> getIndexer() {
    return inputData -> {
        Map<String, Void> map = new HashMap<>();
        JsonFile jsonFile = (JsonFile)inputData.getPsiFile();
        if (!Settings.isEnabled(jsonFile.getProject())) {
            return map;
        }

        JsonObject jsonObject = PsiTreeUtil.getChildOfType(jsonFile, JsonObject.class);
        if (jsonObject == null) {
            return map;
        }
        ComposerPackageModel composerObject = new ComposerPackageModelImpl(jsonObject);

        String type = composerObject.getType();
        if (type == null) {
            return map;
        }

        if (!type.startsWith("magento2-")) {
            return map;
        }

        String name = composerObject.getName();

        if (name != null) {
            map.put(name, null);
        }

        return map;
    };
}
 
Example 18
Project: data-mediator   File: ConvertAction.java   Source Code and License 5 votes vote down vote up
private PsiClass getPsiClassFromContext(AnActionEvent e) {
    PsiFile psiFile = e.getData(LangDataKeys.PSI_FILE);
    Editor editor = e.getData(PlatformDataKeys.EDITOR);
   // psiFile.getViewProvider().getVirtualFile()

    if (psiFile == null || editor == null) {
        return null;
    }
    int offset = editor.getCaretModel().getOffset();
    PsiElement element = psiFile.findElementAt(offset);

    return PsiTreeUtil.getParentOfType(element, PsiClass.class);
}
 
Example 19
Project: intellij-plugin-tools   File: BuilderClassAction.java   Source Code and License 5 votes vote down vote up
private PsiClass getPsiClassFromContext(AnActionEvent e) {
    PsiFile psiFile = e.getData(LangDataKeys.PSI_FILE);
    Editor editor = e.getData(PlatformDataKeys.EDITOR);

    if (psiFile == null || editor == null) {
        return null;
    }

    int offset = editor.getCaretModel().getOffset();
    PsiElement element = psiFile.findElementAt(offset);

    return PsiTreeUtil.getParentOfType(element, PsiClass.class);
}
 
Example 20
Project: hybris-integration-intellij-idea-plugin   File: ImpexPsiUtils.java   Source Code and License 5 votes vote down vote up
@Nullable
@Contract(pure = true)
public static PsiElement getHeaderForValueGroup(@Nullable final ImpexValueGroup valueGroup) {
    if (null == valueGroup) {
        return null;
    }

    final int columnNumber = ImpexPsiUtils.getColumnNumberForValueGroup(valueGroup);

    if (columnNumber < 0) {
        return null;
    }

    final ImpexValueLine impexValueLine = PsiTreeUtil.getParentOfType(valueGroup, ImpexValueLine.class);
    if (null == impexValueLine) {
        return null;
    }

    if (prevElementIsUserRightsMacros(impexValueLine)) {
        return null;
    }

    final ImpexHeaderLine impexHeaderLine = PsiTreeUtil.getPrevSiblingOfType(impexValueLine, ImpexHeaderLine.class);
    if (null == impexHeaderLine) {
        return null;
    }

    final ImpexFullHeaderParameter header = ImpexPsiUtils.getImpexFullHeaderParameterFromHeaderLineByNumber(
        columnNumber,
        impexHeaderLine
    );

    if (null == header) {
        return ImpexPsiUtils.getHeaderParametersSeparatorFromHeaderLineByNumber(columnNumber, impexHeaderLine);
    } else {
        return header;
    }
}
 
Example 21
Project: reasonml-idea-plugin   File: RmlPsiUtil.java   Source Code and License 5 votes vote down vote up
@NotNull
public static List<PsiModule> findModules(@NotNull Project project) {
    ArrayList<PsiModule> result = new ArrayList<>();

    Collection<VirtualFile> virtualFiles = FilenameIndex.getAllFilesByExt(project, RmlFileType.INSTANCE.getDefaultExtension());
    for (VirtualFile virtualFile : virtualFiles) {
        PsiFile file = PsiManager.getInstance(project).findFile(virtualFile);
        PsiModule[] modules = PsiTreeUtil.getChildrenOfType(file, PsiModule.class);
        if (modules != null) {
            result.addAll(Arrays.asList(modules));
        }
    }

    return result;
}
 
Example 22
Project: hybris-integration-intellij-idea-plugin   File: ColumnsAlignmentStrategy.java   Source Code and License 5 votes vote down vote up
@Contract(pure = true)
private boolean isStartOfValueLine(@Nullable final ASTNode currentNode) {
    return null != currentNode
           && PsiTreeUtil.findChildOfType(
        currentNode.getTreeParent().getPsi(),
        ImpexValueGroup.class
    ) == currentNode.getPsi();
}
 
Example 23
Project: processing-idea   File: ImportSketchClasses.java   Source Code and License 5 votes vote down vote up
private void migrateColorToIntegerType(@NotNull PsiFile sketchFile, PsiElementFactory elementFactory) {
    Collection<PsiTypeElement> typeElementsInFile = PsiTreeUtil.findChildrenOfType(sketchFile, PsiTypeElement.class);

    for (PsiTypeElement typeElement : typeElementsInFile) {
        boolean isProcessingColorType = typeElement.getType().equalsToText("color");
        if (isProcessingColorType) {
            PsiTypeElement integerType = elementFactory.createTypeElementFromText("int", null);
            typeElement.replace(integerType);
        }
    }
}
 
Example 24
Project: Goal-Intellij-Plugin   File: ModuleTermListImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<ModuleTerm> getTermList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, ModuleTerm.class);
}
 
Example 25
Project: AppleScript-IDEA   File: AppleScriptRangeFromReferenceImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptExpression> getExpressionList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptExpression.class);
}
 
Example 26
Project: AppleScript-IDEA   File: AppleScriptConcatenationExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptRelativeReference> getRelativeReferenceList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptRelativeReference.class);
}
 
Example 27
Project: AppleScript-IDEA   File: AppleScriptBlockBodyImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptExitStatement> getExitStatementList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptExitStatement.class);
}
 
Example 28
Project: hybris-integration-intellij-idea-plugin   File: ImpexValueLineImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<ImpexValueGroup> getValueGroupList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, ImpexValueGroup.class);
}
 
Example 29
Project: AppleScript-IDEA   File: AppleScriptTargetListLiteralImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptTargetVariable> getTargetVariableList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptTargetVariable.class);
}
 
Example 30
Project: AppleScript-IDEA   File: AppleScriptMultiplicativeExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptApplicationReference> getApplicationReferenceList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptApplicationReference.class);
}
 
Example 31
Project: AppleScript-IDEA   File: AppleScriptAdditiveExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptNameReference> getNameReferenceList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptNameReference.class);
}
 
Example 32
Project: AppleScript-IDEA   File: AppleScriptHandlerPositionalParametersCallExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptIgnoringStatement> getIgnoringStatementList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptIgnoringStatement.class);
}
 
Example 33
Project: AppleScript-IDEA   File: AppleScriptCoercionExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptBuiltInClassIdentifierPlural> getBuiltInClassIdentifierPluralList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptBuiltInClassIdentifierPlural.class);
}
 
Example 34
Project: Goal-Intellij-Plugin   File: PrologDirectiveClauseImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<PrologPredicateSpec> getPredicateSpecList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, PrologPredicateSpec.class);
}
 
Example 35
Project: AppleScript-IDEA   File: AppleScriptCoercionExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptIndexReferenceClassForm> getIndexReferenceClassFormList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptIndexReferenceClassForm.class);
}
 
Example 36
Project: hybris-integration-intellij-idea-plugin   File: ImpexFullHeaderParameterImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<ImpexModifiers> getModifiersList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, ImpexModifiers.class);
}
 
Example 37
Project: AppleScript-IDEA   File: AppleScriptRangeIndexReferenceImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptExpression> getExpressionList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptExpression.class);
}
 
Example 38
Project: AppleScript-IDEA   File: AppleScriptBlockBodyImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptIfSimpleStatement> getIfSimpleStatementList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptIfSimpleStatement.class);
}
 
Example 39
Project: AppleScript-IDEA   File: AppleScriptConcatenationExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptBuiltInClassIdentifierPlural> getBuiltInClassIdentifierPluralList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptBuiltInClassIdentifierPlural.class);
}
 
Example 40
Project: AppleScript-IDEA   File: AppleScriptConcatenationExpressionImpl.java   Source Code and License 4 votes vote down vote up
@Override
@NotNull
public List<AppleScriptMiddleElemReference> getMiddleElemReferenceList() {
  return PsiTreeUtil.getChildrenOfTypeAsList(this, AppleScriptMiddleElemReference.class);
}