Community
Participate
Working Groups
Build Identifier: Version 0.3M1 When implementing an own ContentAssistProvider the getKeywords() method has to be implemented. The method signature includes the following parameter: prefix, buffer, selection But they are always null. The cause for this is, that in orion.editor.ContentAssist.getKeywords() (contentAssist.js) the parameters are not passed through. This is the original code snippet: ... getKeywords: function(prefix, buffer, selection) { var keywords = []; // Add keywords from directly registered providers dojo.forEach(this.activeContentAssistProviders, function(provider) { keywords = keywords.concat(provider.getKeywords() || []); }); ... The bug can be fixed by changing the code to: ... getKeywords: function(prefix, buffer, selection) { var keywords = []; // Add keywords from directly registered providers dojo.forEach(this.activeContentAssistProviders, function(provider) { keywords = keywords.concat(provider.getKeywords(prefix, buffer, selection) || []); }); ... Reproducible: Always Steps to Reproduce: 1. Define a own ContentAssistProvider like this: MyContentAssistProvider.prototype = { getKeywords: function(prefix, buffer, selection) { // prefix / buffer / selection always null } }; 2. Every time the getKeywords is called the parameter are null.
Thanks for the bug. This was fixed by commit f8eab0e [1]. I tested with the latest code in HEAD and found the parameters were passed correctly to content assist providers. Any recent (after 08/16) integration build of 0.3 should have the fix. [1] http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f8eab0e43cd36c58cae0483825ae8a57d3d16769