SchemeState (@NotNull FileTypeWithDescriptor ftd) { if (!(ftd.fileType instanceof AbstractFileType) || !shouldSave(ftd.fileType)) { return SchemeState.NON_PERSISTENT; } if (!myDefaultTypes.contains(ftd)) { return SchemeState.POSSIBLY_CHANGED; } return ((AbstractFileType)ftd.fileType).isModified() ? SchemeState.POSSIBLY_CHANGED : SchemeState.NON_PERSISTENT; }