boolean (int offset) { PsiNewExpression expression = getNewExpression(); if (rejectContainer(expression)) { return false; } PsiFile targetFile = getTargetFile(expression); if (targetFile != null && !targetFile.getManager().isInProject(targetFile)) { return false; } PsiElement nameElement = getNameElement(expression); if (CreateFromUsageUtils.shouldShowTag(offset, nameElement, expression)) { String varName = nameElement.getText(); setText(getText(varName)); return true; } return false; }