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.
Product Version = NetBeans IDE Dev (Build 20111007-b3664ef5103c) Operating System = Mac OS X version 10.6.8 running on x86_64 Java; VM; Vendor = 1.6.0_26 Runtime = Java HotSpot(TM) 64-Bit Server VM 20.1-b02-384 1.) register a listener via TopComponent.getRegistry().addPCL() and listen for TopComponent.Registry.PROP_TC_OPENED 2.) open a file with a MV editor in the IDE (e.g. .java) - the event will be fired, and there will be a DataObject in the TCs lookup 3.) open another file with a MV editor in the IDE - the event will be fired, but: - there _won't_ be a DataObject in the TCs lookup - calls like e.g. TC.getDisplayName() return null - applies also for all following MV files being opened. 4.) close all files, open another (not yet opened) MV file - DO will be present in the lookup with other words - a MVCTC lookup contains a DataObject in it's lookup on PROP_TC_OPENED only if it there is no file opened in the moment.
Don't you want to turn your instructions to unit test?
Created attachment 112617 [details] test
see testNoDOInLookup in attached file. While i wasn't able to reproduce the reported scenario, the test consistently behaves like: - first opened TC - no DO in lookup - next opened TC - DO in lookup in case the previous TC was closed - or DO not in lookup in case the previous TC wasn't closed anyway - the question here is if it is ok, that a there is no usefull data in a TC lookup in the moment the PROP_TC_OPENED is fired. feel free to close in case you think it is.
ergonomics#bce2273f2168
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/bce2273f2168 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #203308: Make sure MultiView component lookup is always populated with one of the elements.