void () { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "xxx=yyy\n#s\nzzz=ttt\n\n")); final List<IProperty> properties = propertiesFile.getProperties(); assertEquals(2, properties.size()); assertPropertyEquals(properties.get(0), "xxx", "yyy"); assertPropertyEquals(properties.get(1), "zzz", "ttt"); WriteCommandAction.runWriteCommandAction(null, () -> properties.get(1).getPsiElement().delete()); List<IProperty> propertiesAfter = propertiesFile.getProperties(); assertEquals(1, propertiesAfter.size()); assertPropertyEquals(propertiesAfter.get(0), "xxx", "yyy"); }