Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] changes to all command framework clients

I just finished a massive clean-up pass in the command framework. [1]
It touched just about every command callback. Callback data has been consolidated into a data structure rather than the random assortment of parameters we were growing. So everything gets hit now, but this lets us add stuff more easily and not be worried about callback parameter order anymore, and naming callback parameters you don't care about.

I ran every page and tried to invoke every command, but I think there is certainly a chance that I missed something. (Yes, we should have automated tests, I opened a bug for it [2]).

If you see a command fail to run, check the console. The most likely failure is a callback expecting an "item" parameter. The old pattern was:

callback: function(item) {
// do a bunch of work on item
}

the new pattern is

callback: function(data) {
var item = data.items;
// do a bunch of work on item
}

susan

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=363763
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=364530


Back to the top