learnerplates

I would like to add some of my own keywords and Types into the already existing C# language service. I'm using the SDK Example.ManageMyC as a template to create my own language service but I'd also like to use C# code in my source files. Can this be done


My code type is presently embedded in string parameters to C# classes, the strings are then manipulated at runtime, I want to provide a way to also edit my code in the same texteditor as the C# one.
One workaround I'm thinking might be to create C'# wrapper classes for my language which generates the string, which is then passed to the C# class inst.

e.g.
MyCSharpClass myCSharpInst = new MyCSharpClass();
myCSharpInst.Name = "SomeNameString";
myCSharpInst.Constraint = "newValue ;= MyLanguagesType(cast;date;(MyLanguageClassOne.Current.EffectiveDate),-MyLanguageValue)";

I would like something like (The format is irrelavent for now, I would like intellisense etc) :

myCSharpInst.Constraint = {
newValue = MyLanguagesType(cast;date;(MyLanguageClassOne.Current.EffectiveDate),-MyLanguageValue) };



Re: Visual Studio Extensibility Language Services and Extending the C# Compiler, Lexer/Parser

Ed Dore

Unfortunately, the answer is no. There are no extensibility points built into the various language services that would allow you to aggregate or extend them in such a manner.

Sincerely,






Re: Visual Studio Extensibility Language Services and Extending the C# Compiler, Lexer/Parser

Ramaswamy Ranganathan

I hope you have taken a look at this sample - Visual Studio 2005 SDK\2006.09\VisualStudioIntegration\Archive\Babel\Samples\ECMAScriptLangService. Although it may not be straightfoward as the possibility of extending an existing language service, it might be worth a shot. I have no clue as to the existance of anything equivalent to JSAuthor :(.



Re: Visual Studio Extensibility Language Services and Extending the C# Compiler, Lexer/Parser

learnerplates

Thanks guys, I'll go no further with this for now.
Thanks for the help.