• Products
  • Download
  • Purchase
  • Support
  • Company
Actipro Software company logo
Twitter Follow Actipro RSS Subscribe (RSS Feed)

The Actipro Blog

Tag Cloud

  • blog
  • docking
  • editors
  • intelliprompt
  • micro charts
  • navigation
  • propertygrid
  • ribbon
  • shared library
  • silverlight
  • syntaxeditor
  • themes
  • views
  • web site
  • winforms
  • winrt
  • wpf

Latest Twitter News

May 14, 2012 at 2:50 PM
IntelliPrompt code snippet features have been added to our VS-like code editor control for #WPF and #Silverlight. http://t.co/1IchOJrr

May 10, 2012 at 9:40 PM
Our new Micro Charts control products for #WPF and #Silverlight are out now. Come build some dashboards with them! http://t.co/EEERvff0

May 7, 2012 at 6:47 AM
Today we look at bar charts, for our upcoming #WPF, #Silverlight, and #WinRT Micro Charts product. http://t.co/gxHuPS6B

May 4, 2012 at 6:25 AM
See a gallery of micro area charts in our upcoming release for #WPF, #Silverlight, and #WinRT. http://t.co/qDXGwW8B

May 3, 2012 at 6:32 AM
See a variety of line charts that are easy to make with our upcoming #WPF, #Silverlight, #WinRT Micro Charts product. http://t.co/mbkX6tJd

Twitter Follow us on Twitter

Month List

  • 2012
    • May (9)
    • April (6)
    • March (11)
    • February (11)
    • January (2)
  • 2011
    • December (2)
    • November (7)
    • October (2)
    • September (1)
    • August (5)
    • July (3)
    • June (6)
    • May (5)
    • April (8)
    • March (4)
    • February (5)
    • January (9)
  • 2010
    • December (9)
    • November (10)
    • October (4)
    • September (8)
    • August (12)
    • July (9)
    • June (7)
    • May (6)
    • April (7)
    • March (6)
    • February (6)
    • January (4)
  • 2009
    • December (2)
    • November (2)
    • October (12)
    • September (3)
    • August (11)
    • July (10)
    • June (6)
    • May (3)
    • April (7)
    • March (6)
    • February (8)
    • January (10)
  • 2008
    • December (10)
    • November (2)
    • October (3)
    • September (5)
    • August (5)
    • July (8)
    • June (4)
    • May (4)
    • April (10)
    • March (8)
    • February (1)
    • January (2)

Category List

  • RSS feed for ActiproActipro (321)
  • RSS feed for Blog SummaryBlog Summary (15)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (164)
  • RSS feed for New featuresNew features (155)
  • RSS feed for New productNew product (38)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (90)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (22)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (9)
  • RSS feed for WPFWPF (257)
  • RSS feed for XAMLXAML (23)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, Silverlight, and WinForms frameworks, and is most well-known for their SyntaxEditor syntax-highlighting code editor control.

Please take some time to learn more about us and our product offerings.

Progress on a SyntaxEditor Web Languages Add-on for WPF and Silverlight

July 27, 2010 at 10:16 AM
by Bill Henning (Actipro)

As mentioned in a previous post we have been working very hard on developing a custom grammar and AST object model that will be an optional free part of SyntaxEditor for WPF/Silverlight products going forward, hopefully starting with the 2010.2 version.

We’ve been using this new grammar/AST design to prototype out a WPF version of an advanced XML syntax language implementation.  The XML language will eventually contain the same or better feature set as those found in the WinForms Web Languages Add-on.

Today I’d like to give a quick glimpse into some initial features we have working.

AST (abstract syntax tree) construction

Our new grammar has a tree construction syntax that makes it very easy to create an AST of a document.  Take this XML code for example…

Valid

The grammar parser we built for XML will construct an AST that looks like this when output to a string:

CompilationUnit[
    Element[
        "a"
        Nodes[
            Element[
                "b"
                Nodes[
                    Comment[]
                ]
                EndTag[]
            ]
        ]
        EndTag[]
    ]
]

Each node in the AST automatically gets assigned an offset range based on what generated it, which becomes important when we get into features below such as code outlining. 

Parse error reporting

As the XML parser (which runs based on our XML grammar) executes, it will report errors if it detects any.  You also can inject code to report your own errors when appropriate.

Take this example code that is invalid XML:

SyntaxErrors

You’ll see that errors are automatically marked with squiggles.  The specific parse errors can be listed in an Error List tool window.  If we would show the errors, we’d see:

  • Tag was not closed. (1,5)
  • Expecting end tag </b>. (1,9)

Both of those are parse errors we insert when we detect invalid XML.

Code outlining (folding)

One of the best features of having an AST that stores location data is that you can use it to drive code outlining.  Here is some example XML loaded in SyntaxEditor:

Outlining

We have a custom outliner that takes our AST data and converts it to outlining node ranges.  If we collapse the somevalue element, we see:

OutliningCollapsed

You can mouse over the collapsed block to see the collapsed text.  Also if attributes were set on the start tag, the first line of them would show up before the … in the collapsed text.

Summary

This is just the beginning for the actual add-on.  We still need to add a number of other features such as validation and automated IntelliPrompt.  But with the grammar/AST features that we’re developing, we finally have the tools available to implement those features.

It’s important to note that all of what you see here is built using the public SyntaxEditor object model along with the new grammar/AST features that will also be public.  This means that you are able to build similar syntax language implementations for your own languages too.

We’ll post some more information as development progresses.

Tags: wpf, silverlight, syntaxeditor
Filed under: Actipro, In development, New product, WPF, Silverlight
Submit to DotNetKicks...
Permalink | Comments (1)

Related posts

The future of WPF, Silverlight, and HTML5 - Are they dead?As I’m sure you are all aware, last week’s PDC 2010 conference set off a firestorm of tweets and new...SyntaxEditor .NET Languages Add-on for WPF Progress - Part 2 Today I’d like to post a status update on the progress of the SyntaxEditor .NET Languages Add-on...SyntaxEditor for WPF - HTML editor sample preview using Web Languages Add-onWe’ve been hard at work on WPF Studio 2010.2, which we should have out in September.  One new p...

Comments

October 3, 2010 at 23:52  

trackback

Actipro Blog 2010 Q3 posting summary

Actipro Blog 2010 Q3 posting summary

The Actipro Blog - WPF and WinForms Development

Comments are closed
Copyright © 1999-2012 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us