GrExpression () { if (myExpression.isValid()) { return myExpression; } else if (myMarker != null && myMarker.isValid()) { PsiElement at = myFile.findElementAt(myMarker.getStartOffset()); if (at != null) { return GroovyPsiElementFactory.getInstance(myFile.getProject()).createExpressionFromText(myExpression.getText(), at); } } return GroovyPsiElementFactory.getInstance(myFile.getProject()).createExpressionFromText(myExpression.getText(), null); }