Collection<DocumentReference> (@Nullable FileEditor editor) { if (editor instanceof TextEditor && ((TextEditor)editor).getEditor().isViewer()) { return null; } if (editor == null) { return Collections.emptyList(); } return getDocumentReferences(editor); }