XExpression () { Object document = myDelegate.getItem(); if (document instanceof Document) { // sometimes null on Mac return getEditorsProvider().createExpression(getProject(), (Document)document, myExpression.getLanguage(), myExpression.getMode()); } return null; }