Community
Participate
Working Groups
This is a spin-off from bug 372364. The content assist API should be updated to reorganize the parameters and to make providers less dependent on the 'prefix' parameter. The proposed API signature is: computeProposals: function(buffer, offset, context) The 'context' param is an Object with this shape: { line // String. Entire line that content assist was invoked on. prefix // String. Prefix hint. selection // Object. Current editor selection. } The "proposal objects" returned by a content assist provider will also change. Their new shape is { proposal // String. Text to insert at the offset. (required) description // String. Text to display in content assist panel. (required) escapePosition // Number. Caret position after accepting proposal. (optional) positions // Array. For entering linked mode. (optional) } Note the 'proposal' semantics have changed: the prefix is no longer chopped off a proposal when it's inserted by the content assist engine. Any provider that relied on the old behavior must now remove the prefix manually from its proposals. Current API docs, for reference: [1] http://wiki.eclipse.org/index.php?title=Orion/Documentation/Developer_Guide/Plugging_into_the_editor&oldid=295279#Service_methods_2
Pushed to master: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=da91e646a6521e3fea7dc0a02d0484ee63e073b8 While fixing this I found a bug in the CSS content assist provider. It incorrectly uses the prefix given by the content assist engine, which stops at a hyphen character. The upshot is that if you type 'font-' and invoke content assist, you don't see the expected proposals. This is fixed.