@Override
    public void invokeImpl(Project project, PsiFile file) throws IncorrectOperationException {
      PsiElement myElement = getStartElement();
      final XPathExpression arg0 = ((XPathFunctionCall)myElement).getArgumentList()[0];
        final XPathExpression outer = PsiTreeUtil.getParentOfType(myElement, XPathExpression.class);
        if (arg0 instanceof XPathBinaryExpression && outer instanceof XPathBinaryExpression) {
            // TODO make this smarter by determining operator precedence
            replace("(" + arg0.getText() + ")");
        } else {
            replace(arg0.getText());
        }
    }
@Override
    public void invokeImpl(Project project, PsiFile file)