CodeStyleSettings (@NotNull Editor editor) { Project project = editor.getProject(); VirtualFile file = editor.getVirtualFile(); if (file != null && project != null) { return getSettings(project, file); } return getDefaultSettings(); }