Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Content assist, request help

If you are just using the stand alone editor, you can add content assist as follow:

self.editor = orionEditorClass({ parent: self.parentDomId, lang: 'aaa'});

var contentAssist = editor.getContentAssist ? editor.getContentAssist() : editor._contentAssist;        
contentAssist.addEventListener("Activating", function() {
        contentAssist.providers.push(.. our content assist provider ..);
});


Let me know if you need more info and I will send a complete example.

Silenio




From:        Mattan Bitner <bitner.mattan@xxxxxxxxx>
To:        orion-dev@xxxxxxxxxxx,
Date:        10/24/2013 03:15 PM
Subject:        [orion-dev] Content assist, request help
Sent by:        orion-dev-bounces@xxxxxxxxxxx




Hi!
I've seen that you are a contributor to eclipse orion. 
I've been trying to add a content assist provider to my editor, but failed one time after another. 
The editor is for a new language (let's call it "aaa"), and I wrote a content assist plugin for the language, but have no clue on how to add it if I use the editor the way I do (I only need the editor, not the Orion Shell)

my code is:

[...]
init = function()
{
var self = this;
require(["orion/editor/edit"], function (orionEditorClass) 
{
        /* Create editor */
    self.editor = orionEditorClass({ parent: self.parentDomId, lang: 'aaa', contentassist: true});    
                
};
[...]

Any help would be highly appreciated! 

Best Regards,
Mattan Bitner.
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev


Back to the top