void (Editor editor) { Project project = editor.getProject(); if (project == null || !(editor instanceof EditorImpl)) { return; } Document document = editor.getDocument(); VirtualFile file = FileDocumentManager.getInstance().getFile(document); Language language = findXmlLikeLanguage(project, file); if (language != null) { new TagNameSynchronizer((EditorImpl)editor, project, language).listenForDocumentChanges(); } }