Add Simple Language Support to Visual Studio 2010 - visual-studio-2010

I'm developing some VBScript using Visual Studio 2010. The native support for this language isn't great, so going forwards I'm hoping to look into taking advantage of language services / VS Extensions to allow me to improve support for these languages.
For the moment however I just want to make my life simpler by adding a couple of features:
Allow the VS Task List to recognise my 'todo: comments
Allow c# like #region...#endregion functionality to make it easy to break the script up into more easily readable blocks (to comply with VBScript I'd stick an apostrophe before the hash to make it a comment).
Is there a simple way to do this through configuration in VS, or do I have to create an entire language service to get this functionality?
What I'm asking may be impossible; but thought it worth asking on the off chance.
Thanks in advance.

My bet is you could do the tasklist stuff with a simple extension:
http://msdn.microsoft.com/en-us/library/163ba701%28v=vs.80%29.aspx
But to do the #region behavior I'm fairly certain you need a simple stripped out Language Service to get to the Source's AuthoringSink
http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.package.authoringsink.addhiddenregion.aspx
and
http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.package.authoringsink%28v=vs.90%29.aspx

Related

User Interface Designing Tool for WPF using Powerbuilder

Can anyone suggest me any tool for designing user interface for WPF that can be used in Powerbuilder.
Before this I found a few tools such https://mui.codeplex.com/ and http://www.nuget.org/packages/MahApps.Metro but I got problem to use those in my Powerbuilder.net. I don't know either something I missing when try to using them or those tools really not support Powerbuilder.I want to design interface like window 8, so I need tool that can give interactive design. Thanks
Sorry for my bad English T.T
I was trying to make it work for you to show by example but I didn't have time to get it done. This should work fine.
First, make sure you add all the references (dll's) needed. In Visual Studio "NuGet" adds all the required references. I believe you need MahApps.Metro.dll, GreyscaleEffect.dll and System.Windows.Interactivity.dll at a minimum. Add them to References in your Solution Explorer.
Then in windows you need to add namespaces depending on what features you want to use, and just like in visual studio you can use the namespace "name" as prefix to use the features of the MahApps assemblies.
PowerBuilder WPF uses the Visual Studio Isolated Shell so it basically works pretty much the same.
hope this helps.
Rich

Visual Studio graphic modules designer

I want to create a smart and easy way to produce and generate code automatically.
It's not easy to explain, but what I want to do is something like what codefluent software (http://www.softfluent.com/) does. So design graphically a model and what is generated is a collection of classes in according with some rules defined for my context. Otherwise, also a tool like Telerik which is integrate in Visual Studio and through a custom menu it's possible to manage particular behaviours of the application.
I know that my request is not clear and so general, but also my acutal ideas are in an embrional state. I see that Visual Studio support a DSL SDK (vsvmsdk) which permits to specify and design an own language. But I can't understand if it is exactly what I need.
Anyone can suggest me a different tool or maybe a documentation about what I can do in Visual Studio to reach my goal?
CodeFluent Entities is a custom-made tool, it's not relying on any 3rd party software. The graphical surface is using WPF with special algorithms and specific lightweight treeviews. (disclaimer: I work for this company, and I helped develop that software).
That being said, if you want to quickly develop something, you could indeed start with the http://archive.msdn.microsoft.com/vsvmsdk you mention (VSVMSDK is the successor of the DSL SDK, aka 'DSL Tools'). It has the big advantage of being free. Note however the future of this component at Microsoft is unclear, as they seem to prefer 'Code-first' over 'Model-first' now.

Custom Intellisense Extension

I am wanting to write an addition to intellisense in Visual Studio.
Is it possible to extend at all, from my research I haven't found any samples or documentation on intellisense extensions.
How can I get intellisense to show a simple HelloWorld message like the following (where hello world is added at run time to the intellisense for String):
So in Visual Studio 2010 and later, the extensibility APIs you want to at are under the Microsoft.VisualStudio.Languages.IntelliSense namespace. At a high level, you want to MEF export a ICompletionSourceProvider which will provide the items you need. There are two good blog posts here and here that demonstrate the basic technique.
There are two problems that you'll run into if you wanted to make your screenshot be a reality. (This is why I asked for the scenario, as my advice here would change.) First, this method doesn't legally let you append to an existing completion set, but rather provide a new one. In the UI this appears as two tabs, like the Common/All tabs in the Visual Basic editor. This is a limitation of the current API. You could try to modify one of the existing completion sets in your AugmentCompletionSource but I have no idea if that'd work. It's definitely unsupported, in any case.
Second, it's really hard to know when and where to recommend things. In your example, you said "the IntelliSense for string". Sadly, there aren't any APIs (currently) in VS that let you know what the thing before the dot is. You could do some simple heuristics or try implementing some parser that is Good Enoughâ„¢ for your scenario, but you'll have to accept for now that you won't have perfect results.
The Roslyn project aims to fix the second issue, so you may find it useful to explore a bit further. Since we expect that lots of people will want to extend completion, we're also thinking about offering other extensibility APIs so you don't have to roll a ICompletionSourceProvider from scratch, but such APIs are not in the current CTP.
[Disclaimer: I'm a member of the Roslyn team who works on IntelliSense.]

Overlay graphics (aka adornments in VS2010) in VS2008

I'm writing an add-in for both VS2008 and VS2010 and I'd like to have graphical enhancements that appear on top of the code (similar to Resharper/CodeRush). Doing so in VS2010 is relatively easy using adornments, however, how do I do it in VS2008? Anyone knows a good resource/article for something in that spirit?
I know that DXCore (CodeRush) allows one to do it, however, due to license restriction (I can't bundle DXCore with my addin) I am unable to do so.
Thank you
I've ended up implementing it by myself.
The general idea is to make a transparent form (Winforms or WPF), put the adornment you want in that form, and then overlay the form at the position of the code.
Since the editor was completely rewritten between 2008 and 2010 the technique for this is going to be totally different and it seems unlikely that now, 6 months after 2010 has launched, is a good time to start writing something for 2008, especially something difficult.
That said, a great source of sample code for editor extensions is http://code.msdn.microsoft.com/vsx. This is from the VSX team and has been very helpful to me while working on extensions.

How do i implement intellisense for my language in visual studio?

I mention that i am designing a language. The plan was always to not implement it but to design it but i am considering implementing it if i think i could do it in a reasonable amount of time.
How would i have my language use intellisense in visual studios? BooLangStudio has it http://www.codinginstinct.com/2008/05/boo-in-visual-studio.html, http://www.codeplex.com/BooLangStudio
It all depends on how much time you want to spend on it. I have about 2,000 hours of work in my Visual Studio IntelliSense projects resulting in exactly one mostly-complete language service. That said, it's not your "average" IntelliSense extension to Visual Studio - see the feature set for more info.
Here are some good resources to look at. I have a tendency to write with an assumption that users are already familiar with both the Visual Studio Extensibility basics and parsing with ANTLR. If you aren't, you should probably start at www.antlr.org and with my "ANTLR port" of one of the simple Visual Studio language service tutorials.
Here are some posts showing how serious I am about the subject. :D
How does code completion work?
Smart code-completion original and revisited. Clearly I take the latter more seriously than other people (voted down and voted to close?!), but I believe doing so just gives my users a better product. :)
High-speed incremental lexing for syntax highlighting original (under IScanner-friendly lexers), cleaned up (significantly - vastly preferable to the original), and made yet again 6x faster in 1/4 the memory.
Little things like sane commenting/uncommenting and brace matching do make a difference. On a side note, once you use one that's well-behaved, the others (including the ones for some Microsoft languages in Visual Studio) are rather annoying.
If you can, read all the IntelliSense-related posts on my blog.
Smart indent is a PITA (I mean really smart, e.g. the C# language service in VS2008). I have a love/hate relationship with it. I'm annoyed now because writing this bullet made me think about it. Argh. My insight here makes me a bit forgiving of them breaking it for VS2010 Beta 1, but it doesn't keep me from missing its awesomeness.
PS: I can now build a syntax highlighter for a new language commenting/uncommenting in 1 day. In the same day I'm ofter able to get the type & member bars in as well.
This is a good place to look for Visual Studio Extensibility.
Also, here. But, the first link has a video specific to adding Intellisense to your language service.
As of 4-4-2017: This article seems to give all of the basics for creating a language extension, which includes highlighting words and providing intellisense (code completion).
https://code.visualstudio.com/docs/extensions/example-language-server

Resources