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.
As part of my commit http://www.netbeans.org/source/browse/openide/test/unit/src/org/openide/loaders/DataShadowTest.java.diff?r1=1.1&r2=1.2 I have found that BrokenDataShadow is not turned into DataShadow on a plain file creation, but needs DataObject to be created. I think this could cause various unreproducible errors and should be fixed.
Returned back to David.
I do not think this could result in some obscure problems. The result is that DO is still BrokenDataShadow although it should be working DataShadow. Anyway, how do you think it should be solved? The ShadowChangeAdapter listens on OperationListener, i.e. it works on DS layer. But your test uses FileUtil.createData. So maybe it is bug in the test, i.e. all operations which should be visible on DS layer must be done through DS layer. Or should ShadowChangeAdapter be changed to listen on FileSystem layer?
The test simulates possible problem when one module (ide ui integration) is assigning keyboard shortcut to actions from various other modules. If one of such modules is enabled (after being initially disabled), the definition of the shortcut will not be refreshed as there is no change in existing DataObjects - e.g. the file is created on filesystem level only. From this point of view the implementation in BrokenShadowsAdapter is unsufficient.
cvs -q ci -m "#38348: BrokenDataShadows are refreshed also if there is a change in filesystems, no data object needs to exist" ? X.diff Checking in loaders/src/org/openide/loaders/BrokenDataShadow.java; /cvs/openide/loaders/src/org/openide/loaders/BrokenDataShadow.java,v <-- BrokenDataShadow.java new revision: 1.11; previous revision: 1.10 done Checking in loaders/src/org/openide/loaders/DataObjectPool.java; /cvs/openide/loaders/src/org/openide/loaders/DataObjectPool.java,v <-- DataObjectPool.java new revision: 1.27; previous revision: 1.26 done Processing log script arguments... More commits to come... Checking in test/unit/src/org/openide/loaders/DataShadowSlowness39981Test.java; /cvs/openide/test/unit/src/org/openide/loaders/DataShadowSlowness39981Test.java,v <-- DataShadowSlowness39981Test.java new revision: 1.7; previous revision: 1.6 done Checking in test/unit/src/org/openide/loaders/DataShadowTest.java; /cvs/openide/test/unit/src/org/openide/loaders/DataShadowTest.java,v <-- DataShadowTest.java new revision: 1.9; previous revision: 1.8
Verified.