Microsoft Developer Network > 포럼 홈 > Visual Studio Extensibility > How to extend javascript language service ?
질문하기질문하기
 

답변됨How to extend javascript language service ?

  • 2009년 7월 1일 수요일 오후 2:03guaike 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     코드 있음

    I know VS2008 has already been done exisit language service for Javascript(*.js),Now i need to implement support for collapsible regions  on Javascript,just like follow statement:
    //region
    ...
    ...
    //endregion
    


    guaike

답변

  • 2009년 7월 1일 수요일 오후 4:52Ed DoreMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    Currently, language services are not extensible. You would need to replace the existing language service with your own. Authoring a language service isn't trivial. The most comprehensive example would be the IronPythonIntegration sample that ships with the Visual Studio SDK.

    A simpler implementation is the RegEx Language service sample. It's pretty lightweight, but is a good starting point. There's also a pretty good writeup on the sample at http://code.msdn.microsoft.com/RegExLangSvcDD.

    Sincerely,


    Ed Dore

모든 응답

  • 2009년 7월 1일 수요일 오후 4:52Ed DoreMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    Currently, language services are not extensible. You would need to replace the existing language service with your own. Authoring a language service isn't trivial. The most comprehensive example would be the IronPythonIntegration sample that ships with the Visual Studio SDK.

    A simpler implementation is the RegEx Language service sample. It's pretty lightweight, but is a good starting point. There's also a pretty good writeup on the sample at http://code.msdn.microsoft.com/RegExLangSvcDD.

    Sincerely,


    Ed Dore
  • 2009년 7월 1일 수요일 오후 5:59guaike 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi,Ed

    Thank you for your reply.
    If language services are not extensible,
    How about create Visual Studio Integration Package and Is it possible to implement collapsible region,set text color etc. ?

    Btw:I have noticed this post,

        Rustam Kulenov  said:
    Hi,

    Can you give an example of using your language service with already registered extension?
    I suppose, that users of JavaScript Language Service might use it by explicitly specifying it's GUID.
    You can also provide [ProvideEditorExtension(typeof(...), ".js", 100)] attribute and create your own editor factory for javaScript files.

    guaike
  • 2009년 7월 1일 수요일 오후 6:25Ed DoreMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    You need to create a language service. A language service is implemented in a VS SDK Package.

    Sincerely,


    Ed Dore
  • 2009년 7월 2일 목요일 오전 9:32guaike 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    @Ed Dore

    How to custom  Add region to code?I mean not in  language service project

    guaike