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.
[ BUILD # : 200906142201 ] [ JDK VERSION : 1.6.* ] Hello I had 6.5.1 and I've created a toolbar shortcut for one of my ant tasks. shortcut was added to the standard toolbar debug. After I've imported the settings 6.7 did not show that shortcut on the toolbar. I did it manually and it added the shortcut but there appeared another one (exactly the same) (possibly from the 6.5.1 config).
the problem is that the custom ant task in the toolbar points to <userdir>/config/Actions folder which isn't in import list. so the import routine has to either ignore .shadow files when importing toolbar settings or import config/Actions folder as well. cc'ing jskrivanek to provide additional evaluation
Ant module owners should decide. I recommend to add config/Actions/Build folder to toolbars import.
Can easily export config/Actions/Build/.*[.]xml, but that is not enough; would also need to export config/(Menu|Toolbars|Shortcuts)/.*[.]shadow, i.e. the GUI presentations of those shortcuts. And doing that could accidentally export other things unrelated to Ant shortcuts, especially keybindings, but perhaps also stuff in menus and toolbars that I don't know about. Since there is no facility for programmatic hooks in the export list, I cannot filter the entries to check that they are actually Ant shortcuts.
wouldn't it better to filter out all .shadow files when importing toolbars? at least as a temporary solution
core-main #d771899750fd Beware that this only works if both the exporting _and_ importing IDEs contain this fix, i.e. will not be useful for people importing 6.7 settings.
I don't like this solution. As you wrote it can accidentally import menu items unrelated to ant shortcuts. And we don't have UI to correct possible misconfigurations in main menu layout. Better would be just adding config/Actions/Build/.*[.]xml to Toolbars item in layer in core.windows. It satisfies ant shortcuts in toolbar are exported if user selects Toolbars for export. Ant shortcuts in menu will never be exported and ant shortcuts in config/Shortcuts will be exported with other keymaps.
Exporting Ant shortcuts added to toolbars, but not to menus, seems like a clear bug to me. Also, adding config/Actions/Build/.*[.]xml under "toolbars" means that Ant keyboard shortcuts will be exported only if "toolbars" are exported, which is clearly wrong. AFAIK the Ant module is the only code in the NB standard distribution which modifies Menu/ in the SFS. There could be third-party modules which do so as well. Again, could solve perfectly if there were some facility to programmatically produce (or filter) items for export. I have never really understood the purpose of the export format being static.
OK, if you think, let it as it is now. > Again, could solve perfectly if there were some facility to programmatically produce (or filter) items for export. I have never really understood the purpose of the export format being static. It is because we need to have just static list while doing initial import after new installation. o.n.upgrader does the import when modules are not loaded and any filter would not be available.
I don't really like the current solution either, but the proposed alternative seems worse to me. Not sure. Regarding import - a mixture of static and dynamic would allow import to work only off static lists, while export could be more dynamic. For example, keep current format but add an optional dynamic export filter which could eliminate some items at runtime. There would still be a theoretical possibility of two entries from different modules overlapping in the static list, the export filters resolving the ambiguity, and the user upon import checking only one of the entries but having settings imported from the other entry...but I think this is unlikely to be a practical problem.
Integrated into 'main-golden', will be available in build *200911041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/d771899750fd User: Jesse Glick <jglick@netbeans.org> Log: #167803: option to export Ant shortcuts.
Yes, this could work for ad-hoc export to zip file and then import from this zip file. But still doesn't solve import from existing userdir after new installation. It this case only the static list is always available. The only option is to package runtime export/import filters to a separate jar. Similarly like the static etc/netbeans.import list is generated during the build of whole IDE. Then this jar could be available for o.n.upgrader. I considered this option when I was designing export/import feature. But I abandoned it because I didn't have use case for it. Static list was enough for all known cases. Here are my early thoughts http://wiki.netbeans.org/ExportImportOptions?version=4#section-ExportImportOptions-ImplementationDetails.