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.
GSF is using DataLoaders API in multiple places for quite simple scenarios. Mostly these seem to involve relationships between JTextComponent <--> Document <--> FileObject and only in rare ocasions actual DataObject (for listeners as far as I see and a few cookies). I'd like to suggest that we isolate the DataLoaders access into a few methods in bridge class. This will have the advantage that will reduce duplicate code across the GSF modules (copy-paste) and will also allow the future decoupling of GSF from DataLoaders if needed. My actual need is trying to make GSF usable in a standalone (outside the Platform) situation so DataLoaders usually gets in the way. Having all this code in a separate place allows alternative implementations and stubbing out, reducing the need to actually patch a lot of GSF classes. Attaching the current patch for the GSF classes. Please note the new org.netbeans.modules.gsf.api.DataLoadersBridge which hold the common methods. Please note that not all DataLoaders usage has been moved. The are a few other that need changing (like SourceFileObject, Source and LookupBasedSourceTaskFactory).
Created attachment 65133 [details] A new API class: DataLoadersBridge and refactored code to make use of it
Thanks for the patch Emilian.
Created attachment 65363 [details] New patch against the latest head (as of 22nd July)
Thank you for the patch. I just applied it (changeset 52a83f34d7d9).
'ruby/gsf -> editor/csl' mass-move to be able to deleted gsf/ruby. Having to change the version and platform of all closed moved issues to the same due to Issuezilla deficiencies - choosing version == 6.5 and TM = 7.0.