.NET Framework Developer Center > .NET Development Forums > Microsoft SQL Server Modeling > How to create statement completion, tooltips and friendly validation messages for textual DSLs in IntelliPad?
Ask a questionAsk a question
 

AnswerHow to create statement completion, tooltips and friendly validation messages for textual DSLs in IntelliPad?

  • Wednesday, October 21, 2009 1:47 PMVincentH_Macaw Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I would like to create a number of textual DSLs for our factory (http://solutionsfactory.macaw.nl/) to offer developers and product specialists a more productive and user-friendly editing experience than editing XML files in Visual Studio. E.g. a textual DSL for deployment configuration and a textual DSL for SharePoint configuration.

    When I specify an XSD in an XML file, Visual Studio offers the following features when editing the XML file:
    1) Colorizing / syntax highlighting
    2) Validation (squiggles)
    3) Statement completion (on elements and attribute names)
    4) Tooltips (on elements and attribute names)

    To make switching from XML editing in Visual Studio to editing M-based textual DSLs in Intellipad an actual improvement for editing, I need to offer comparable features - I assume IntelliPad is the editor to do this in.

    1) I've already achieved colorizing / syntax highlighting for a textual DSL in IntelliPad using MGrammar. No questions here.

    However, these questions remain:

    2) Validation : I've got squiggles, but how can I provide more user-friendly validation messages in Intelllipad? The standard MGrammar validation messages are good to the language developer, but incomprehensible to the language user. Visual Studio XML + XSD validation messages can easily be understood by users typing XML. Is there some way to hook into mgrammar validation with custom validation logic and/or custom messages?

    3) Statement completion: I've seen it working when editing M in IntelliPad when specifying foreign key values (a listbox pops up with values to select from). How can I provide statement completion in my custom textual DSL - for my static DSL keywords but if possible also for user-supplied values like the foreign key value example?

    4) Tooltips. How can I display a description text (in a tooltip or otherwise) when users hover over a DSL keyword?

    I'm perfectly willing to customize IntelliPad if that is what t takes (what are the best resources to master this?).
    However, is any of the above is planned as a standard feature for future versions of Intellipad (or another mgrammar aware editor) I'd like to know.

    I know it's a lot of questions to ask, but if anyone can shed some light on any part of this, I'd really appreciate.

Answers

  • Friday, October 23, 2009 2:32 PMKraig BrockschmidtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Thanks for your post, Vincent.

    As you can see from the tests you've been doing with "M" and "Intellipad," there are still a number of areas in the tooling that we've still to work on. The goal as I understand it is to have the full syntax highlighting, IntelliSense, etc., experience with "M" and DSLs that developers have come to expect, both in Visual Studio and "Intellipad".

    But again, as you can see, we aren't there yet. Do remember that "M" and "Intellipad" and the rest of "Oslo" are not shipping/released technologies--they are still strictly in CTP status.

    Being in CTP means (a) the technologies are not by any means feature-complete (or even complete in specifications), (b) anything might change in the future, and (c) these technologies are neither ready nor allowed to be used in production environments, as specified in the CTP license agreement.

    Your message suggests that you're looking to utilize "Oslo" technologies in your product in the near future. If this is true, that last point I made is a really important one to remember. Because "Oslo" is in CTP only, none of its assemblies, tools, or binaries are redistributable at this time, and won't be until version 1. Since we haven't announced any dates for that at all, the most you can really do is evaluate the possibilities for longer-term planning. In the near term you'll unfortunately need to find other options for these kinds of features.

    But again, when "Oslo" technologies are released, my understanding is that the language-integration features like those you mention are on the radar.

    .Kraig

All Replies

  • Friday, October 23, 2009 2:32 PMKraig BrockschmidtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Thanks for your post, Vincent.

    As you can see from the tests you've been doing with "M" and "Intellipad," there are still a number of areas in the tooling that we've still to work on. The goal as I understand it is to have the full syntax highlighting, IntelliSense, etc., experience with "M" and DSLs that developers have come to expect, both in Visual Studio and "Intellipad".

    But again, as you can see, we aren't there yet. Do remember that "M" and "Intellipad" and the rest of "Oslo" are not shipping/released technologies--they are still strictly in CTP status.

    Being in CTP means (a) the technologies are not by any means feature-complete (or even complete in specifications), (b) anything might change in the future, and (c) these technologies are neither ready nor allowed to be used in production environments, as specified in the CTP license agreement.

    Your message suggests that you're looking to utilize "Oslo" technologies in your product in the near future. If this is true, that last point I made is a really important one to remember. Because "Oslo" is in CTP only, none of its assemblies, tools, or binaries are redistributable at this time, and won't be until version 1. Since we haven't announced any dates for that at all, the most you can really do is evaluate the possibilities for longer-term planning. In the near term you'll unfortunately need to find other options for these kinds of features.

    But again, when "Oslo" technologies are released, my understanding is that the language-integration features like those you mention are on the radar.

    .Kraig
  • Thursday, October 29, 2009 2:03 PMCeyhun Ciper Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I think the tooling is closely related to VS10; the clue about this is the "Microsoft.VisualStudio.Platform.Editor.dll" DLL of Intellipad.

    Of course MS is not going to write VS10's editor twice: one for Intellipad and one for VS. As long as MS gives the same (or somewhat reduced) functionalty to IntelliPad regarding language services (by including a subset of the VS editor service DLLs, for such things as autocomplete, intellisense, etc.), we are cool; meaning that iPad can replace Notepad for many of us (as we have already taken the road to FW3.x, MEF, etc).

    MS has a unique opportunity to do the right thing for language developers, bio-engineers, natural language researchers, cryptographers and countless many others.

    iPad can supplant (and even up the ante of) Emacs, except that it does not have lisp...

    ...wait a minute, is there no lisp in the panoply of .NET languages?

    -Ciper