languageservice

How to get property info by using the Typescript language service

☆樱花仙子☆ 提交于 2020-12-05 17:23:19
问题 How to get the type of a property of an object with Typescript 1.4.0. I'm searching for something similar to C# it has the possibility to look up the properties of an object. var properties = typeof(T).GetProperties(); foreach( var property in properties){} What I have so far is: var ls = ts.createLanguageService(host, ts.createDocumentRegistry()) var nav = ls.getNavigationBarItems(host.fileName); Given the example Interface: interface Example { firstname: string; lastname: string; age:

Supporting user-specified file extensions in custom Visual Studio language service

霸气de小男生 提交于 2019-12-18 01:04:36
问题 I'm working on a custom Visual Studio language service, and have several questions regarding the way file extensions are bound to a particular language service. Source files for the language "Example Language" has two primary file extensions: .e1 and .e2 . My extension has a class ExampleLanguagePackage which extends Package. When you use the File → Open command and select a C# file (for example), the "Open" button has a dropdown arrow which allows you to select "Open With...". When you click

How to create a new language for use in Visual Studio

戏子无情 提交于 2019-12-17 06:22:04
问题 I want to write a new templating language, and I want Visual Studio to "support" it. What I need to know is: How do I parse my new language? Given some code in my new template language, how do I translate it into HTML? Right now I'm using regular expressions to parse it token by token, but I don't think this is going to scale very well as the language gets more complicated, and there's no error checking. I've heard of ANTLR but never used it. Would that be the right tool for this job, or is

Implementing a Language Service By Using the Managed Package Framework

╄→гoц情女王★ 提交于 2019-12-12 17:05:31
问题 I've followed the steps listed in the walk through (http://msdn.microsoft.com/en-us/library/bb166360.aspx) for implementing and registering a LanguageService and I simply can't get it to work. My package loads correctly, I can add functioning menu items and option pages, but I cannot open files registered to my service. When I attach a debugger, I can see my VSPackage being constructed, loaded, and having its FDoIdle method called twice. After that, experimental Visual Studio session goes off

Visual Studio 2010 Extensibility, MPF and language services

主宰稳场 提交于 2019-12-07 00:13:25
问题 I am trying to extend Visual Studio 2010 RC to be able to use a custom programming language. The first two things I've tried to do is a syntax highlight/Intellisense feature (easily done, thanks to "Ook!" sample from PDC09) and a possibility to create new project templates (i.e. be able to open *.myproj files). For this second task, I can't find any easy tutorials or samples. Most samples are for Visual Studio 2008 (as for IronPython integration) or even VS2003. The few samples available for

Visual Studio 2010 Extensibility, MPF and language services

匆匆过客 提交于 2019-12-05 03:08:34
I am trying to extend Visual Studio 2010 RC to be able to use a custom programming language. The first two things I've tried to do is a syntax highlight/Intellisense feature (easily done, thanks to "Ook!" sample from PDC09) and a possibility to create new project templates (i.e. be able to open *.myproj files). For this second task, I can't find any easy tutorials or samples. Most samples are for Visual Studio 2008 (as for IronPython integration) or even VS2003. The few samples available for VS2010 do not work (including MPFProj) or do not compile, and are too hard to understand. Is there any

Installing a Custom Visual Studio Language Service

浪子不回头ぞ 提交于 2019-12-04 14:32:58
问题 I've written a new Visual Studio language service for my software studio's internal scripting language following the directions from a very useful article Writing Your First Visual Studio Language Service. I've got my grammar working great, some simple goto cases up and running, and text coloring. I've done my testing both in the Irony GrammarExplorer and the Visual Studio Experimental Hive, and I feel I'm ready to use it normally in visual studio and deploy it out to a few other programmers

Installing a Custom Visual Studio Language Service

徘徊边缘 提交于 2019-12-03 10:00:39
I've written a new Visual Studio language service for my software studio's internal scripting language following the directions from a very useful article Writing Your First Visual Studio Language Service . I've got my grammar working great, some simple goto cases up and running, and text coloring. I've done my testing both in the Irony GrammarExplorer and the Visual Studio Experimental Hive, and I feel I'm ready to use it normally in visual studio and deploy it out to a few other programmers for some early testing and feedback. The problem is I don't know how to install the language service.

Issues Proffering Language Service

给你一囗甜甜゛ 提交于 2019-12-02 08:29:01
I have found two ways of proffering a language service on the internet. The first way involves using a IOleComponentManager and registering a timer to call my service during idle times. The second way involves casing my service as an IServiceContainer and adding a ServiceCreatorCallback to "proffer the service on demand". Supposedly the second way is now the "preferred way" of doing things. Unfortunately, when I use this method, OnSynchronizeDropdowns never gets called on my TypeAndMembersDropdownBars implementation. In addition, when my LanguageService finds errors in the file, it uses

Add Syntax Highlighting to IElisonBuffer

假装没事ソ 提交于 2019-12-02 06:25:01
问题 I'm working on a project where we've split up C# code into functions and stored these functions within IElisonBuffers. I've got Intellisense hooked up, and the buffers interact with other extensions fine as shown below: However, I cannot get syntax highlighting to work within these editors. I embed these editors via the following steps: Create an IVsInvisibleEditor for the file. Get the IVsTextLines for this IVsInvisibleEditor Create an IVsCodeWindow and set the buffer for this IVsCodeWindow