@Nullable
    private static EvalExpressionDialog.Context inputXPathExpression(final Project project, XmlElement contextNode) {
        final XPathProjectComponent pc = XPathProjectComponent.getInstance(project);
        LOG.assertTrue(pc != null);

        // get expression history from project component
        final HistoryElement[] history = pc.getHistory();

        final EvalExpressionDialog dialog = new EvalExpressionDialog(project, XPathAppComponent.getInstance().getConfig(), history);
        if (!dialog.show(contextNode)) {
            // cancel
            LOG.debug("Input canceled");
            return null;
        }

        final InputExpressionDialog.Context context = dialog.getContext();
        LOG.debug("expression = " + context.input.expression);

        pc.addHistory(context.input);

        return context;
    }
@Nullable
    private static EvalExpressionDialog.Context inputXPathExpression(final Project project, XmlElement contextNode)