Community
Participate
Working Groups
Version: 4.2.0 Build id: I20120524-2100 1. Install the Live Model Editor or CSS Spy. 2. Switch to a brand new workspace. 3. Notice that the "Show running app model" (live editor) or "Open CSS Spy" have no key bindings. Bindings can be set for both and persisted however.
(In reply to comment #0) > 3. Notice that the "Show running app model" (live editor) or "Open CSS Spy" > have no key bindings. Have no *listed* key bindings — the bindings do work. And continue to work even if they're changed to something else.
If they're created through the model, they're expected to show up and work. If they're created at runtime ... they're not part of the model system, and won't show up anywhere ... they're unlikely to be persisted either. They may still work, depending on how they were created. PW
Basically, if they're not created through the model, I won't guarantee them. If they're created in the model and they're not being persisted, then that's a more serious problem. PW
(In reply to comment #3) > Basically, if they're not created through the model, I won't guarantee them. What does that mean, exactly? These are MCommands, MHandlers, and MKeyBindings, all created through the legit factories and added to the MApplication instance. If that's not the model, then where does the model end? (Or do you mean the compat/bridging layer?)
(In reply to comment #4) > (In reply to comment #3) > > Basically, if they're not created through the model, I won't guarantee them. > > What does that mean, exactly? These are MCommands, MHandlers, and > MKeyBindings, all created through the legit factories and added to the > MApplication instance. If that's not the model, then where does the model end? > Yes, that's all model (I'm refering to ECommanService or EBindingService, that's runtime only). If you get to the point where you add the MKeyBinding and it doesn't work, that's a problem. Or do you just mean the existing bindings don't show up in the Keys pref page? PW
(In reply to comment #5) > Yes, that's all model (I'm refering to ECommanService or EBindingService, > that's runtime only). Phew! :) > If you get to the point where you add the MKeyBinding and it doesn't work, > that's a problem. > > Or do you just mean the existing bindings don't show up in the Keys pref page? That's the problem. The key bindings are there, and they work (fortunately), but they aren't listed in the keys page. (And rebinding doesn't necessarily remove the old binding — though I suspect that may be a separate issue due to using M1/M2/M3/M4 in the key-sequence.)
The link below contains a change that fixes two problems: 1. Programmatically created bindings are now visible in preferences. 2. When user changes the key sequence in preferences, the old sequence stops working. https://git.eclipse.org/r/21626 However I found more problems: 1. The key binding list in preferences is not correctly updated when schema (default/emacs) is changed multiple times (occurs in 3.x too). 2. If a key binding is added through fragment model, any changes to the key binding are lost (or duplicates occur) after application restart because of the bug 389663. 3. Key bindings for Event Spy and Live Application Model plugins still don't work correctly. I think they may register the key bindings incorrectly. I will take a look at them.
(In reply to Wojciech Sudol from comment #7) > 3. Key bindings for Event Spy and Live Application Model plugins still don't > work correctly. I think they may register the key bindings incorrectly. I > will take a look at them. The Live Application Model registers its keybinding in the ModelProcessor class in org.eclipse.e4.tools.emf.liveeditor
The key binding for Live Model Editor (LME) does not work because after LME adds its key binding to the model, the BindingToModelProcessor removes all key bindings that do not have "type:user" tag (I suppose it clears binding tables before merging the model with fragments and processors). There are several ways to make the LME key binding working: 1. Run LME processor after BindingToModelProcessor (I am not sure if it is possible) 2. Add the "type:user" tag to the key binding - but this is against the purpose of the tag 3. Wait for the fix for the bug 389663. The fix may enforce some changes in BindingToModelProcessor and BindingProcessingAddon. For now, I think that we can temporarily apply workaround #2 (add the "type:user" tag).
Created attachment 239741 [details] Fix for Event Spy I attach a patch with a fix for Event Spy key binding bug. The problem is that if the default key binding is changed, Event Spy recreates the original key binding after restart.
(In reply to Wojciech Sudol from comment #9) > The key binding for Live Model Editor (LME) does not work because after LME > adds its key binding to the model, the BindingToModelProcessor removes all > key bindings that do not have "type:user" tag (I suppose it clears binding > tables before merging the model with fragments and processors). > There are several ways to make the LME key binding working: > 1. Run LME processor after BindingToModelProcessor (I am not sure if it is > possible) > 2. Add the "type:user" tag to the key binding - but this is against the > purpose of the tag > 3. Wait for the fix for the bug 389663. The fix may enforce some changes in > BindingToModelProcessor and BindingProcessingAddon. > > For now, I think that we can temporarily apply workaround #2 (add the > "type:user" tag). What change caused this? Our keybindings used to work in Eclipse 4.2. Also any keybinding extension for the IDE based on processors would be affected.
Created attachment 239769 [details] Fix for Live Model Editor (In reply to Lars Vogel from comment #11) > Our keybindings used to work in Eclipse 4.2. What is the last version of LME in which the key binding was working? I tried Eclipse 4.2.0 + e4 Tools 0.12 - 0.15 without success. > Also any keybinding extension for the IDE based on processors would be affected. That is true for processors with the "beforefragment" property set to "true" (like LME). CSS spy and Event spy are configured to run after fragments so they are not affected. BTW. I think I have found a bug in LME processor. See attachment.
(In reply to Wojciech Sudol from comment #12) > Created attachment 239769 [details] > Fix for Live Model Editor > > (In reply to Lars Vogel from comment #11) > > Our keybindings used to work in Eclipse 4.2. > What is the last version of LME in which the key binding was working? I > tried Eclipse 4.2.0 + e4 Tools 0.12 - 0.15 without success. Maybe this is a misunderstanding. In RCP applications the keybinding works out of the box *just tested) but not in the IDE. > BTW. I think I have found a bug in LME processor. See attachment. I think we fixed that in Bug 427048. Are you using the latest version of the e4 tools? Can be found here: http://download.vogella.com/luna/e4tools
(In reply to Lars Vogel from comment #13) > (In reply to Wojciech Sudol from comment #12) I adjusted the Live Model Editor with https://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=f62aac7e4ce0f1b2383804236e3b291b8bae1640. CSS spy seem to be configured correctly (after fragments). Any suggestion how to fix the keybindings for the CSS spy?
(In reply to Wojciech Sudol from comment #7) > The link below contains a change that fixes two problems: > 1. Programmatically created bindings are now visible in preferences. > 2. When user changes the key sequence in preferences, the old sequence stops > working. > > https://git.eclipse.org/r/21626 I've released http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=507a271d3f852c9b50fc9c9fb8a3338189b81e07 Wojtek, could you please test the initial usecases against the next nightly build? PW
Tested with N20140212-2000. Works as expected, I don't see any side effects.
(In reply to Lars Vogel from comment #13) > Maybe this is a misunderstanding. In RCP applications the keybinding works > out of the box *just tested) but not in the IDE. (In reply to Lars Vogel from comment #14) > CSS spy seem to be configured correctly (after fragments). Any suggestion > how to fix the keybindings for the CSS spy? I tested e4 Tools in the IDE and Contacts demo application based on the current state of code. I haven't noticed any problem with key bindings. Lars, could you try to reproduce these bugs?
(In reply to Wojciech Sudol from comment #17) > (In reply to Lars Vogel from comment #13) > > Maybe this is a misunderstanding. In RCP applications the keybinding works > > out of the box *just tested) but not in the IDE. > > (In reply to Lars Vogel from comment #14) > > CSS spy seem to be configured correctly (after fragments). Any suggestion > > how to fix the keybindings for the CSS spy? > > I tested e4 Tools in the IDE and Contacts demo application based on the > current state of code. > I haven't noticed any problem with key bindings. > Lars, could you try to reproduce these bugs? Thanks Wojciech, tested with N20140216-2000 and everything works correctly.
Thank you Lars. I mark the bug as fixed.
Verified in I20140303-2000.