This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Calling of Data.setModified(false) from tests for PHP file doesn't reset state of file opened in editor. It seems that SaveCookie is not removed. Please, reassign if it is not bug in loaders (bug 199990 might be related). It is P2 because it blocks PHP validation tests. To reproduce try the following test case: public class SetModifiedTest extends NbTestCase { public static Test suite() { return NbModuleSuite.createConfiguration(SetModifiedTest.class).enableModules(".*").clusters(".*").gui(false).suite(); } public SetModifiedTest(String name) { super(name); } public void test1() throws Exception { FileSystem fs = FileUtil.createMemoryFileSystem(); FileObject f = fs.getRoot().createData("index.php"); DataObject dob = DataObject.find(f); System.out.println("dob=" + dob); dob.getLookup().lookup(EditorCookie.class).openDocument().insertString(0, "modified", null); assertTrue("Should be modified.", dob.isModified()); dob.setModified(false); assertFalse("Should not be modified.", dob.isModified()); assertNull("Should not have SaveCookie.", dob.getLookup().lookup(SaveCookie.class)); } }
Created attachment 110770 [details] PHP unit test that fails
Created attachment 110771 [details] Similar test and fix in csl.api Please review and integrate all patches, if they look acceptable. Btw. your LanguageRegistryTest fails due to introduction of LanguageRegistrationTest. Probably you don't run your unit tests anywhere regularly.
I have reviewed the fix. Looks ok to me - Milutin, can you please integrate it?
Thank you, one patch http://hg.netbeans.org/jet-main/rev/801bbaa2b141 and php test http://hg.netbeans.org/jet-main/rev/3f2cdfa14f72
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/801bbaa2b141 User: Milutin Kristofic <mkristofic@netbeans.org> Log: #202127 - DataObject.setModified(false) doesn't work for GsfDataObject