c# - How to add completion words dynamically to VS2013 Syntax Extension (MEF) -


it's possible don't understand problem space, i'm having trouble figuring out mef (editor classifier project).

i've created (piecing walkthrough guides msdn https://msdn.microsoft.com/en-us/library/ee197665.aspx) syntax highligher informix stored procedure language.

one major problem have - want able find instances of keyword "define" , populate word directly following statement completion extension have (currently it's populated defined list of words).

much c#'s native support - when define variable, becomes available in autocompletion dropdown.

i got rid of in class hardcoding (from walkthrough) , completion words defined this:

list<completion> completions = new list<completion>();  completiontags completiontags = new completiontags();  foreach (string completiontag in completiontags.completiontags) {     completions.add(new completion(completiontag)); }; 

my completiontags class pretty simple:

class completiontags { public list completiontags;

public completiontags() {     this.completiontags = new list<string> {         // sql keywords         "count",         "from",         "having",     }; } 

i know need do. somehow need hijack buffer when changes , find occurrences of 'define ([a-za-z0-9_]{1,})' , add \1 completiontags list.

i have no idea how this. pointers in right (or any) direction @ point appreciated.

be kind - we've been out of our depth @ stage (i've been programming in c# 3 days)...

reading this answer helpful. at:

xml editor intellisense features

schema cache


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -