Community
Participate
Working Groups
I20080205-0010 The org.eclipse.ui.bindings extension point's key element will cause trouble when cocoa becomes a supported platform. We already have a lot of redundancy in our contributions for redefinitions from M2+M3+* to COMMAND+ALT+* for platform="carbon". If we have to do the same also for platform="cocoa", the plugin.xml becomes really unmanageable. Possible solutions: a) allow multiple attributes in the platform attribute, e.g. platform="carbon,cocoa". b) add a new attribute 'os', which would be compared to the value of org.eclipse.core.runtime.Platform.getOS(), e.g. os="macosx". c) add something like a sequenceModifier element to the bindings extension point to support transformations like this on a broader level, e.g. (syntax would have to be polished!): <extension point="org.eclipse.ui.bindings"> <sequenceModifier find="M2+M3" replace="COMMAND+ALT" platforms="carbon,cocoa" /> ...
Another candidate will be the new WPF version. Not sure whether there will be a win64 as well.
(In reply to comment #0) > Possible solutions: > > a) allow multiple attributes in the platform attribute, e.g. > platform="carbon,cocoa". I'm inclined to implement this solution. comma separated platforms would need to be provided instead of the single carbon platform, but can easily be used to generate the correct binding objects and the same solution can be applied to windows. Another suggestion that could also be implemented in addition to the above is to simply honour the carbon bindings on cocoa as well. The big plus for this is that it simplifies the migration path for everybody downstream. But some of the drawbacks are 1) everything from carbon will propagate to cocoa, making it difficult for them to go their separate ways in the future 2) it is not an obvious property of the windowing system "platform" represents (carbon == cocoa?). This would really more be about creating the os="mac" property and the same for windows, but that would defeat the point of providing a simplified migration path. 3) a similar hack would need to be put in place if we were doing the same thing for win32->wpf, with the same drawbacks. For now I'm going to go with the platform="carbon,cocoa" and not the second suggestion, but I'm open to other opinions/suggestions. PW
Solution a) would be sufficient to close this bug (allows us to do a global search/replace to add cocoa, and then proceed as before). Making cocoa a sub-platform of carbon (and wpf a sub-platform of win32) would be hard to understand, and if you just hardcode this in Platform/UI, then other SWT ports could not use a similar mechanism. I wouldn't do that. If you could also implement something like solution c), then our plugin.xmls would become even more readable, since most of the exceptions we currently have are replacing M2+M3+* with COMMAND+ALT+* on the Mac. But if you don't find time to do this, I can also copy it into a new enhancement request.
OK, I'll go ahead with solution a) for now. We can talk about a possible transform enhancement in bug 248752 PW
Created attachment 114124 [details] platform bindings v01 Allow platform="carbon,cocoa" to be used in keybindings. PW
Released to HEAD >20081002 PW
(In reply to comment #6) > Released to HEAD >20081002 > PW Thank you!
Since we're looking at a transform enhancement in Bug 248752, the value of this change is less than I had hoped. I talked to Dani, and I think for M3 I'm going to back out this change, and simply honour "carbon" keybindings on "cocoa". This will allow carbon and cocoa keybindings to work in M3 but the contributors will only have to change their code once in M4. PW
Created attachment 114218 [details] Revert some of the binding platform change This will revert parts of the change related to the new binding persistence but not the Util.split(*) upgrade. PW
(In reply to comment #9) > Created an attachment (id=114218) [details] > Revert some of the binding platform change Released revert. PW
Created attachment 114306 [details] Simply honour the carbon bindings on cocoa v03
Created attachment 114314 [details] Simply honour the carbon bindings on cocoa v04
(In reply to comment #12) > Created an attachment (id=114314) [details] > Simply honour the carbon bindings on cocoa v04 > Released to HEAD >20081006 PW
In I20081027-1800 PW