Lets say, given 'left', 'right' as two PsiExpressions and we would like to combine them using an operator (say, '+'). As of now, we are doing this as shown below (which seems to be hacky), is this the recommended way?
PsiFile dummyFile = createDummyFile("x = a" + operator + "b"); // This invokes PsiFileFactory.createFileFromText().
PsiAssignStatement assgn = (PsiAssignStatement) dummyFile.getFirstChild();
PsiBinaryExpression binExp = (PsiBinaryExpression) assgn.getValue();