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.
Summary: | Some platform apps cannot use ide/applemenu because of dependencies on editor | ||
---|---|---|---|
Product: | ide | Reporter: | _ tboudreau <tboudreau> |
Component: | Code | Assignee: | issues@ide <issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | apireviews, jtulach, tor, vstejskal |
Priority: | P2 | Keywords: | API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Patch removing editor dependencies from ide/applemenu
Module to unzip into ide/applemenu (also delete the keybinding xml files from ide/applemenu) Improved ide/applemenu/editor (category & descriptions added) Patch to nbbuild to move ide/applemenu to platform cluster and ide/applemenu/editor to an appropriate place Diff to ide/ including changes in golden deps files |
Description
_ tboudreau
2007-03-21 10:16:55 UTC
Created attachment 39741 [details]
Patch removing editor dependencies from ide/applemenu
Created attachment 39742 [details]
Module to unzip into ide/applemenu (also delete the keybinding xml files from ide/applemenu)
The attached patches need testing on a mac, but should do the job. Only other thing should be to add it to nbbuild. I guess we need a new bridge module which bridges ide/applemenu and java/editor providing the java specific keybindings? Pretty much. That's what the zip attachment is (though not marked as eager). Created attachment 40053 [details]
Improved ide/applemenu/editor (category & descriptions added)
Created attachment 40054 [details]
Patch to nbbuild to move ide/applemenu to platform cluster and ide/applemenu/editor to an appropriate place
I'd be happy to integrate this; I'm not sure anyone looks at issues filed against the ide component in IZ. Adding Jarda to cc since this change affects the contents of the platform and other clusters, and I'm not sure if that means we need to rev the version number for that or something such. Jarda, could you review the nbbuild patch? Well, one problem with it: I get a popup message that no module providing the capability org.openide.modules.os.MacOSX is installed. Any idea how to make that go away (or why ide/applemenu does fail silently but this module doesn't - is something hardcoded somewhere?). Created attachment 40055 [details]
Diff to ide/ including changes in golden deps files
Y01 Move ide/applemenu to core/applemenu - traditionally ide.netbeans.org contains things that go to nbX.Y cluster. Moreover right now platform is placed in core,openide,projects,libs,nbbuild and nowhere else. That is why I suggest to move the platform part into core. Y02 Would not it be better to work on a branch in CVS? The editor keybindings files don't have to be placed in ide/applemenu anymore. They can go to their respective modules (editor and java/editor). In fact the ide/applemenu no longer depends on editor and java/editor modules and the only reason why I didn't move the keybindings files was that I tried to minimize my changes. So, if people are happy with it I'll move the kebindings files to editor and java/editor modules. Then ide/applemenu will only contain general (core) stuff and we can add it to the platform. Re. moving ide/applemenu to core/applemenu - I don't really care, but imo it is not neccessary. Btw. editor/mimelookup is part of the platform too. Hi Vita, can you explain what a module owner needs to do to add Mac-specific keybindings to his/her module? Let's say I have an action named "foo" which I want to map to Alt-G on all platforms but Shift-Command-X on Mac. What do I put in my keybindings xml file? The editor/settings/storage module now supports platform specific files. The full description is in the module's arch document. Unfortunately, I just noticed that this module's javadoc is not published on nb.org, so I'll briefly explain it here and publish the javadoc later (or you can generate it locally if you want). Basically, you need to place Mac specific keybindings to an extra file and mark that file with nbeditor-settings-TargetOS attribute. The value of this attribute is the string name of one of the OS_* constants in o.o.util.Utilities class. Any file with this attribute is ignored on platforms that do not match the attribute, if the platform matches the file will be loaded, but *after* loading all platform independent files first. So, in your example the file would contain something like: <bindings> <bind key="O-G" remove="true"/> <bind key="S-M-X actionName="foo"/> </bindings> and in the layer the file would be defined like: <file name="whatever-you-like.xml" url="..."> <attr name="nbeditor-settings-TargetOS" stringvalue="OS_MAC"/> </file> And this mechanism lets you not only add/change keybindings, but also delete keybindings? I can't offhand think of any we need to be able to delete for Mac OS, but it would be good to know if this is a complete solution. Please do remove the keybindings files from ide/applemenu if they really don't need to be there. Yes, you can remove keybindings. The previous example *removes* 'O-G' keybinding and *adds* 'SM-X' keybinding. These two operations are independent of course. Ok, I'll move the files. Files moved. RCS file: /cvs/java/editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml,v done Checking in dev/java/editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml; /cvs/java/editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml,v <-- DefaultKeyBindings-Mac.xml initial revision: 1.1 done Checking in dev/java/editor/src/org/netbeans/modules/java/editor/resources/layer.xml; /cvs/java/editor/src/org/netbeans/modules/java/editor/resources/layer.xml,v <-- layer.xml new revision: 1.22; previous revision: 1.21 done Removing dev/ide/applemenu/src/org/netbeans/modules/applemenu/AllEditorsKeyBindings.xml; /cvs/ide/applemenu/src/org/netbeans/modules/applemenu/AllEditorsKeyBindings.xml,v <-- AllEditorsKeyBindings.xml new revision: delete; previous revision: 1.1 done Checking in dev/ide/applemenu/src/org/netbeans/modules/applemenu/layer.xml; /cvs/ide/applemenu/src/org/netbeans/modules/applemenu/layer.xml,v <-- layer.xml new revision: 1.13; previous revision: 1.12 done Removing dev/ide/applemenu/src/org/netbeans/modules/applemenu/JavaKeyBindings.xml; /cvs/ide/applemenu/src/org/netbeans/modules/applemenu/JavaKeyBindings.xml,v <-- JavaKeyBindings.xml new revision: delete; previous revision: 1.1 done Checking in dev/editor/src/org/netbeans/modules/editor/resources/layer.xml; /cvs/editor/src/org/netbeans/modules/editor/resources/layer.xml,v <-- layer.xml new revision: 1.90; previous revision: 1.89 done RCS file: /cvs/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml,v done Checking in dev/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml; /cvs/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml,v <-- NetBeans-keybindings-mac.xml initial revision: 1.1 done So I guess the dependencies are ok. I have moved the module to platfrom as part of issue 96221. |