void (Project project, XmlFile pluginXml) { VirtualFile file = pluginXml.getVirtualFile(); final ReadonlyStatusHandler readonlyStatusHandler = ReadonlyStatusHandler.getInstance(project); final ReadonlyStatusHandler.OperationStatus status = readonlyStatusHandler.ensureFilesWritable(Collections.singletonList(file)); if (status.hasReadonlyFiles()) { throw new IncorrectOperationException(DevKitBundle.message("error.plugin.xml.readonly", status.getReadonlyFiles()[0])); } }