Examples of YAMLCompoundValue


Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

                                                                    @NotNull final YAMLKeyValue keyValue,
                                                                    @NotNull final List<PsiReference> references) {
    keyValue.acceptChildren(new PsiElementVisitor() {
      @Override
      public void visitElement(PsiElement element) {
        YAMLCompoundValue compoundValue = ObjectUtils.tryCast(element, YAMLCompoundValue.class);
        if (compoundValue != null) {
          compoundValue.acceptChildren(new PsiElementVisitor() {
            @Override
            public void visitElement(PsiElement element) {
              YAMLSequence yamlSequence = ObjectUtils.tryCast(element, YAMLSequence.class);
              if (yamlSequence != null) {
                PsiReference ref = getReferenceBySequence(basePathInfo, keyValue, yamlSequence);
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

    }

    private void getMethodGoto(PsiElement psiElement, List<PsiElement> results) {

        YAMLCompoundValue yamlCompoundValue = PsiTreeUtil.getParentOfType(psiElement, YAMLCompoundValue.class);
        if(yamlCompoundValue == null) {
            return;
        }

        yamlCompoundValue = PsiTreeUtil.getParentOfType(yamlCompoundValue, YAMLCompoundValue.class);
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

    protected void visitRoot(PsiFile psiFile, String rootName, @NotNull ProblemsHolder holder) {
        YAMLDocument document = PsiTreeUtil.findChildOfType(psiFile, YAMLDocument.class);
        if(document != null) {
            YAMLKeyValue yamlKeyValue = YamlHelper.getYamlKeyValue(document, rootName);
            if(yamlKeyValue != null) {
                YAMLCompoundValue yaml = PsiTreeUtil.findChildOfType(yamlKeyValue, YAMLCompoundValue.class);
                if(yaml != null) {
                    YamlHelper.attachDuplicateKeyInspection(yaml, holder);
                }

            }
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

            if(!Symfony2ProjectComponent.isEnabled(completionParameters.getPosition())) {
                return;
            }

            PsiElement psiElement = completionParameters.getPosition();
            YAMLCompoundValue yamlCompoundValue = PsiTreeUtil.getParentOfType(psiElement, YAMLCompoundValue.class);
            if(yamlCompoundValue == null) {
                return;
            }

            yamlCompoundValue = PsiTreeUtil.getParentOfType(yamlCompoundValue, YAMLCompoundValue.class);
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

            if(!Symfony2ProjectComponent.isEnabled(completionParameters.getPosition())) {
                return;
            }

            PsiElement psiElement = completionParameters.getPosition();
            YAMLCompoundValue yamlCompoundValue = PsiTreeUtil.getParentOfType(psiElement, YAMLCompoundValue.class);
            if(yamlCompoundValue == null) {
                return;
            }

            addYamlClassMethods(yamlCompoundValue, completionResultSet, this.yamlArrayKeyName);
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

            if(!Symfony2ProjectComponent.isEnabled(completionParameters.getPosition())) {
                return;
            }

            PsiElement psiElement = completionParameters.getPosition();
            YAMLCompoundValue yamlCompoundValue = PsiTreeUtil.getParentOfType(psiElement, YAMLCompoundValue.class);
            if(yamlCompoundValue == null) {
                return;
            }

            yamlCompoundValue = PsiTreeUtil.getParentOfType(yamlCompoundValue, YAMLCompoundValue.class);
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

            PsiElement position = completionParameters.getPosition();
            if(!Symfony2ProjectComponent.isEnabled(position)) {
                return;
            }

            YAMLCompoundValue yamlCompoundValue = PsiTreeUtil.getParentOfType(position, YAMLCompoundValue.class);
            if(yamlCompoundValue == null) {
                return;
            }

            String className = YamlHelper.getYamlKeyValueAsString(yamlCompoundValue, "targetEntity", false);
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

        YAMLArray yamlArray = (YAMLArray) psiElement.getContext();
        if(!(yamlArray.getContext() instanceof YAMLCompoundValue)) {
            return;
        }

        YAMLCompoundValue yamlCompoundValue = (YAMLCompoundValue) yamlArray.getContext();
        if(!(yamlCompoundValue.getContext() instanceof YAMLKeyValue)) {
            return;
        }

        YAMLKeyValue yamlKeyValue = (YAMLKeyValue) yamlCompoundValue.getContext();
        if(yamlKeyValue == null || !yamlKeyValue.getKeyText().equals("arguments")) {
            return;
        }

        YAMLKeyValue classKeyValue = YamlHelper.getYamlKeyValue(yamlKeyValue.getContext(), "class");
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

        YAMLSequence yamlSequence = (YAMLSequence) yamlCallArray.getContext();
        if(!(yamlSequence.getContext() instanceof YAMLCompoundValue)) {
            return;
        }

        YAMLCompoundValue yamlCompoundValue = (YAMLCompoundValue) yamlSequence.getContext();
        if(!(yamlCompoundValue.getContext() instanceof YAMLKeyValue)) {
            return;
        }

        YAMLCompoundValue serviceDefinition = PsiTreeUtil.getParentOfType(yamlCompoundValue, YAMLCompoundValue.class);
        YAMLKeyValue classKeyValue = YamlHelper.getYamlKeyValue(serviceDefinition, "class");
        if(classKeyValue == null) {
            return;
        }
View Full Code Here

Examples of org.jetbrains.yaml.psi.YAMLCompoundValue

         *      _controller: "Bundle:Foo:Bar"
         */
        if(psiElement instanceof YAMLKeyValue && psiElement.getParent() instanceof YAMLDocument) {
            YAMLKeyValue yamlKeyValue = YamlHelper.getYamlKeyValue((YAMLKeyValue) psiElement, "defaults");
            if(yamlKeyValue != null) {
                YAMLCompoundValue yamlCompoundValue = PsiTreeUtil.getChildOfType(yamlKeyValue, YAMLCompoundValue.class);
                if(yamlCompoundValue != null) {

                    // if we have a child of YAMLKeyValue, we need to go back to parent
                    // else on YAMLHash we can directly visit array keys
                    PsiElement yamlHashElement = PsiTreeUtil.getChildOfAnyType(yamlCompoundValue, YAMLHash.class, YAMLKeyValue.class);
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.