Permalink
Browse files

Fix for breaking plugin changes in 0.5 M1

  • Loading branch information...
1 parent 28f4f07 commit 52e02d0e0033f4cc8db72dbfd7aab1ccc1a7896f John Arthorne committed Apr 13, 2012
Showing with 6 additions and 6 deletions.
  1. +5 −5 esprimaJsContentAssist.js
  2. +1 −1 esprimaJsContentAssistPlugin.html
View
@@ -729,11 +729,11 @@ define("esprimaJsContentAssist", [], function() {
* Main entry point to provider
*/
EsprimaJavaScriptContentAssistProvider.prototype = {
- computeProposals: function(prefix, buffer, selection) {
+ computeProposals: function(buffer, offset, context) {
try {
var root = parse(buffer);
// note that if selection has length > 0, then just ignore everything past the start
- var completionKind = shouldVisit(root, selection.offset, prefix, buffer);
+ var completionKind = shouldVisit(root, offset, context.prefix, buffer);
if (completionKind) {
var environment = {
/** Each element is the type of the current scope, which is a key into the types array */
@@ -747,13 +747,13 @@ define("esprimaJsContentAssist", [], function() {
/** an array of proposals generated */
proposals : [],
/** the offset of content assist invocation */
- offset : selection.offset,
+ offset : offset,
/**
* the location of the start of the area that will be replaced
*/
- replaceStart : selection.offset - prefix.length,
+ replaceStart : offset - context.prefix.length,
/** the prefix of the invocation */
- prefix : prefix,
+ prefix : context.prefix,
/** the entire contents being completed on */
contents : buffer,
newName: function() {
@@ -13,7 +13,7 @@
var provider = new eclipse.PluginProvider();
provider.registerServiceProvider("orion.edit.contentAssist",
new esprimaContentAssistPlugin.EsprimaJavaScriptContentAssistProvider(), {
- contentType: ["text.javascript"],
+ contentType: ["application/javascript"],
name: "Esprima based JavaScript content assist",
id: "orion.edit.contentassist.esprima"
});

0 comments on commit 52e02d0

Please sign in to comment.