Package com.jetbrains.php.lang.psi.elements

Examples of com.jetbrains.php.lang.psi.elements.StringLiteralExpression


     * @param propertyName property name template=""
     * @return Property value
     */
    @Nullable
    public String getPropertyValue(String propertyName) {
        StringLiteralExpression literalExpression = getPropertyValuePsi(propertyName);
        if(literalExpression != null) {
            return literalExpression.getContents();
        }

        return null;
    }
View Full Code Here


            return null;
        }

        PsiElement parent = annotationPropertyParameter.getElement().getParent();

        StringLiteralExpression targetEntity = PhpElementsUtil.getChildrenOnPatternMatch(parent, AnnotationPattern.getPropertyIdentifierValue("targetEntity"));
        if(targetEntity == null) {
            return null;
        }

        PhpClass phpClass = PhpElementsUtil.getClassInsideAnnotation(targetEntity);
View Full Code Here

        if (!(parameter instanceof StringLiteralExpression)) {
            return null;
        }

        StringLiteralExpression stringLiteralExpression = (StringLiteralExpression) parameter;

        String stringValue = stringLiteralExpression.getText();
        String value = stringValue.substring(stringLiteralExpression.getValueRange().getStartOffset(), stringLiteralExpression.getValueRange().getEndOffset());

        // wtf: ???
        // looks like current cursor position is marked :)
        value = value.replace("IntellijIdeaRulezzz", "");
        value = value.replace("IntellijIdeaRulezzz ", "");
View Full Code Here

    @NotNull
    @Override
    public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {

        // IF we touch down here, we do have a StringLiteralExpression.
        StringLiteralExpression se = (StringLiteralExpression) element;

        TwigViewPsiReference psiReference = new TwigViewPsiReference(se, element.getProject());

        if (psiReference.resolve() != null) {
            return new PsiReference[]{psiReference};
View Full Code Here

TOP

Related Classes of com.jetbrains.php.lang.psi.elements.StringLiteralExpression

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.