com.intellij.psi.PsiAssignmentExpression Java Examples
The following examples show how to use
com.intellij.psi.PsiAssignmentExpression.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AssignmentExpressionTranslator.java From java2typescript with Apache License 2.0 | 6 votes |
public static void translate(PsiAssignmentExpression element, TranslationContext ctx) { ExpressionTranslator.translate(element.getLExpression(), ctx); ctx.append(' '); JavaTokenTranslator.translate(element.getOperationSign(), ctx); ctx.append(' '); ExpressionTranslator.translate(element.getRExpression(), ctx); /* if (element.getLExpression().getType() != null && element.getRExpression() != null && element.getRExpression().getType() != null && element.getLExpression().getType().getPresentableText().equals("byte") && element.getRExpression().getType().getPresentableText().equals("char")) { ctx.append(".charCodeAt(0)"); } */ }
Example #2
Source File: PsiJavaElementVisitor.java From KodeBeagle with Apache License 2.0 | 5 votes |
private void visitExpression(final PsiElement element) { if (element.getNode().getElementType().equals(JavaElementType.NEW_EXPRESSION)) { visitPsiNewExpression((PsiNewExpression) element); } else if (element.getNode().getElementType(). equals(JavaElementType.METHOD_CALL_EXPRESSION)) { visitPsiMethodCallExpression((PsiMethodCallExpression) element); } else if (element.getNode().getElementType(). equals(JavaElementType.ASSIGNMENT_EXPRESSION)) { visitPsiAssignmentExpression((PsiAssignmentExpression) element); } else if (element.getNode().getElementType(). equals(JavaElementType.REFERENCE_EXPRESSION)) { visitPsiReferenceExpression((PsiReferenceExpression) element); } }
Example #3
Source File: InstanceOfAssignment.java From IntelliJDeodorant with MIT License | 4 votes |
public boolean instanceOf(PsiExpression expression) { return expression instanceof PsiAssignmentExpression; }