Actipro SyntaxEditor for SilverlightSyntaxEditor is a powerful Silverlight-native text editing control that is packed with features for efficient code editing, including syntax highlighting, code outlining, parsing, line numbers, block selection, IntelliPrompt UI, zooming, adornments, and much more. |
SyntaxEditor is a powerful text editing control that is packed with features for efficient code editing, including syntax highlighting, code outlining, parsing, line numbers, block selection, IntelliPrompt UI, zooming, adornments, single-line mode, and much more. It is built on top of our next-generation extensible text/parsing framework and has many of the same code editing features found in the Visual Studio code editor. SyntaxEditor is designed for use in online IDE (integrated development environment) applications, however there are many other applications out there than can take advantage of such a control. Over 20 sample languages are included to get you started (such as C#, HTML, Javascript, and more), and optional premium add-ons with advanced functionality for editingC#, VB, and XML are available as well. For developers who need to support editing other code languages, custom syntax languages can be developed and distributed with your applications. Actipro offers a uniqueparser framework with SyntaxEditor that features grammars written in C#/VB using EBNF-like notation, customizable AST construction, advanced error handling/reporting, easy code injection, a complete debugger UI, and much more. It's also simple to integrate any external parser with SyntaxEditor. Editing and VisualizationSyntaxEditor is a syntax-highlighting code editor control that allows you to bring a Visual Studio-like code editing experience into your own applications. You'll find a wealth of editing and visualization features right out of the box. Syntax Highlighting and ThemesHighlighting styles can be completely customized by the end user for each code language. Advanced Editing CapabilitiesSyntaxEditor has all the advanced editing capabililies you'd expect to find in a premium code editor, such as:
Over 100 edit actions are included with SyntaxEditor that cover everything from basic caret movement and selection to features such as tabification, character/word/line transposition, etc. Line modification marks, block selection, visible whitespace, and a scrollbar tray button IntelliPromptCompletion ListThe completion list popup is used to display a number of code completion options to the end user, not only providing intelligent information about the code being edited, but also improving the productivity of the end user by supporting "Ctrl+Space" functionality. A completion list that has filtering UI, and a description tip displayed Completion lists support a powerful filtering mechanism that can display tabs and/or buttons to show/hide items that meet certain criteria. They include numerous matching algorithm options, including some that allow you to make matches just by typing any characters in the item text. Custom matching algorithms can be developed. Description tips show more information about items via the use of rich formatted content. Parameter InfoIntelliPrompt parameter info displays helpful popup hints about an invocation that is being typed, and its parameters. Multiple invocation overloads can be displayed in a single popup, using arrow keys to toggle between them. They support any type of content, however the most appealing way to add content is to use our mini-HTML markup language that applies rich formatting to the displayed text. Parameter info displayed for a VB function call Quick InfoQuick info tips can be used to give more information about what is at the current caret location or under the mouse. Just like parameter info, they support any type of content including our special markup language. Quick info displayed for an XML attribute Code SnippetsIntelliPrompt code snippets provide a way to insert pre-defined fragments of text into the editor. Each code snippet can declare multiple fields of text, and when a code snippet template session is activated in SyntaxEditor, the text is inserted and the end user can tab between the fields to edit their values. An active code snippet template session Any code snippets designed for Visual Studio can be loaded into SyntaxEditor since the file formats are the same. Navigable SymbolsA NavigableSymbolSelector control is included that provides two side-by-side drop-downs similar to the type/member drop-downs above the code editor in Visual Studio. One drop-down shows all available root symbols (generally types), and the other shows all available member symbols within the currently selected root symbol. The NavigableSymbolSelector showing the enclosing type and member in a C# document As the caret in a bound SyntaxEditor instance is moved, the selections in the NavigableSymbolSelector update to indicate the enclosing symbols (types/members). The end user can also select a different symbol from the drop-downs to navigate directly to the related symbol declaration. Code Outlining (Folding)SyntaxEditor has complete support for code outlining, also known as code folding. Syntax languages can automatically choose where to create outlining nodes (based on tokens, AST's, etc.) or the end user can choose to create outlining nodes via selected text. When a node is collapsed, a customizable text adornment denotes where the collapsed node is. Hover the mouse over the adornment to see the collapsed node's text. SyntaxEditor showing automatic code outlining of Javascript code, with the margin hover feature active Certain nodes such as #region nodes can be marked to collapse by default, or marked so that they auto-collapse when Collapse to Definitions is used. The outlining margin renders the outlining node hierarchy and allows for easy toggling of outlining node expansion. Hover over expanded nodes in the outlining margin to see a highlight indicating the node's line range. Single-Line Edit ModeSyntaxEditor supports a single-line mode that renders just like a regular TextBox. This enables you to have a simple TextBox but with all the syntax-highlighting, selection, IntelliPrompt and other features that make SyntaxEditor great for editing code. A SyntaxEditor in single-line edit mode, editing a HTML snippet AdornmentsA powerful adornment layer system allows for any sort of custom UI elements (images, shapes, and even controls) to be added anywhere within the text area. Animation is fully supported. Adornment layers can be set to appear before or after built-in layers, such as behind the selection, etc. Easily add squiggle lines, background highlights, or any other decoration to text. Color preview adornments that render CSS colors under the actual color specification A special kind of adornments called intra-text adornments embed themselves in-line with the text by reserving space and the text formatter adjusts the surrounding text to flow around the reserved space where the adornments render. Embed any sort of element, even popup buttons, directly in-line with text MarginsWhile the SyntaxEditor editor views have numerous built-in margins (line number, outlining, ruler, etc.), SyntaxEditor offers an extensibility point where custom margins can be created and added to editor views in any location. EditorSearchView control Searching (Find/Replace)General Search FunctionalityAll of the standard find/replace options are available, such as match case, match whole word, search up, multiple search pattern providers (regular expressions, etc.), scope options, etc. Regular expression searches return captures and support substitutions. Search Pattern ProvidersSearch pattern providers describe the format in which find and replace text can be entered when doing searches. SyntaxEditor includes normal, regular expression, wildcard, acronym, and shorthand providers but it's easy for you to build your own custom ones as well. EditorSearchView ControlAn EditorSearchView control is included that implements a complete find/replace user interface, similar to the one found in Visual Studio. PrintingDialogs and OptionsThe display of a Print dialog is as easy as a simple method call. SyntaxEditor includes a number of settings that affect printouts only, and not the editor views. MarginsBuilt-in margins include document title, line number, and page number margins. It's easy to create a custom margin and insert it anywhere in a printed page. Documents and LanguagesExtensibility is the name of the game when talking about SyntaxEditor's documents and languages. Languages are service-based objects where you can plug in any functionality you require for them. Use our free languages with your SyntaxEditor implementations, or build custom syntax language implementations if needed. Document/UI Object Model SeparationSyntaxEditor's document and language object models have been implemented in a separate assembly from UI assemblies. This allows documents, languages, and all related features (lexing, parsing, etc.) to be used independently of user interfaces. Documents and SnapshotsA document is what is "edited" by a SyntaxEditor, as it is the object that provides access to all the text being edited. It supports easy file load/save and can be tied to a syntax language to provide extended functionality. The complete document text is available any time via snapshots, where each snapshot is an immutable versioned thread-safe copy of the text at the time it was created. A sequence of text changes made, showing how new immutable snapshots and versions are created Snapshots allow you to parse text without fear of it changing in the middle of a parse. There are powerful text scanning classes included and offsets within a snapshot can be translated to their relative location in any other snapshot for the same document. This means that you can reliably locate a certain range of text, even after multiple edits have been made. Batch Text Change OperationsThe text/parsing framework's text change model is extremely powerful and provides many helper methods for doing everything from simple text replace operations to append operations. Multiple operations can be queued up into a single text change and executed as a single atomic unit. Designed to Handle Large DocumentsDocuments have been designed for speed. Large documents can load and be input-ready in SyntaxEditor nearly instantly. This is achieved via internal storage virtualization for many features. Snapshots also reuse common sections of document text to minimize memory usage. Syntax LanguagesSyntax languages are a core piece of the text/parsing framework. They basically encapsulate all functionality for a particular code language that is being used within a SyntaxEditor control. This is everything from various types of parsing all the way to simpler features like determining word breaks or performing line commenting. Over 20 full source sample language definitions are included with SyntaxEditor for common languages like Assembly, Batch files, C, C++, C#, CSS, HTML, INI files, Java, JScript, Lua, MSIL, Pascal, Perl, PHP, PowerShell, Python, RTF, SQL, VB.NET, VBScript, and XML. Custom language definition can easily be created, thereby making it possible to build a code editor for any proprietary language. Mergable LanguagesWhile SyntaxEditor's flexible dynamic language definitions allow for nearly any language to be defined, sometimes it is necessary for more than a single language to be used. An ASP.NET language would most likely have HTML as a root language with tokens that can transition into ASP.NET, CSS, JScript, and VBScript languages on the fly. A HTML language definition that makes language transitions to other languages like CSS and Javascript SyntaxEditor fully supports transitions between parent languages to child languages. This feature allows you to support the complicated language switching requirements of modern web languages and code generation templates. Lexers and ParsersLexing is the process of scanning text and breaking it up into meaningful tokens that can be examined by a higher-level parser, and used to drive syntax highlighting features in the editor. Regular expression-based and hand written lexers are supported. The flow of actions that generally take place whenever a text change occurs Parsing is the process of performing syntax and/or semantic analysis on a text, and outputing some sort of parse data, generally an AST. SyntaxEditor supports the automated calling of parsers via worker threads following text changes. Any custom or third-party parser can be called and used with SyntaxEditor. SyntaxEditor also comes packed with theLL(*) Parser Framework, which is an incredible framework for quickly building LL(*) parsers. Code FragmentsCode fragment editing is useful in situations such as where you want an end user to only see and edit the contents of a specific method or property, or perhaps only a certain statement or expression. When using any language that has a parser, this type of editing is easily achieved with SyntaxEditor. Automated IntelliPrompt features for the language continue to function normally too. Code fragment editing is achieved by setting a header and footer text property on the document. Neither the header nor footer are visible to the end user but for parsing purposes, they are pre- and post-pended to the document's text being edited by the end user. This allows for a complete, valid document to be parsed, even though the end user is only modifying a portion of it. TaggingTags that contain custom data can be applied to ranges of text, to store data with those text ranges and/or mark where special SyntaxEditor visualization features such as adornments should be rendered. Language DesignerThe Language Designer is an application that ships with SyntaxEditor and aids in the creation of syntax languages. It can perform code generation for a number of language features and even includes a debugger for grammars written using ourLL(*) Parser Framework. The Language Designer editing the lexer for a syntax language definition Export to HTML and RTFSyntaxEditor has built-in functionality for exporting syntax-highlighted text content to a string or file in HTML and/or RTF formats. Text StatisticsText statistics are a powerful feature that provide statistics about text in a document. By default, there are numerous text statistics available such as line, sentence, word, character counts, and even readability scores. Languages can choose to customize the statistics by supplying additional ones like commented-line counts, etc. LL(*) Parser FrameworkThe LL(*) Parser Framework is Actipro's own framework for constructing robust text parsers that work standalone or with code editor controls like SyntaxEditor. The framework features grammars that are written in C#/VB using EBNF-like notation, customizable AST construction, advanced error handling/reporting, easy code injection, a complete debugger UI, and much more. A parsing framework is the key to enhancing a SyntaxEditor editing experience because it gives meaningful information about what is contained in the document. This not only can be used to provide contextual information to the end user (what method is the caret in), but is used to help drive features like automated IntelliPrompt completion lists, parameter info, and quick info. Parser TypeThe parser in our framework is LL(*), meaning it is a top-down parser that can run on a subset of context-free grammars. It parses input from left to right, traces leftmost derivation, and by default uses one symbol of look-ahead. This normally would mean LL(1), however can-match callbacks allow infinite symbol look-ahead, thus making it LL(*). LL parsers do not support left recursion however grammars can generally be refactored to eliminate left recursion and turn it into right recursion instead. Ambiguity can be resolved using can-match callbacks. Feature SummaryThere are many types of parsers, each with their pros and cons. Actipro's LL(*) Parser Framework was carefully designed to be easy-to-use, provide an enormous feature set, and address the most common shortcomings encountered with other third-party parsers. Features include:
Language Designer DebuggerThe Language Designer tool includes a complete debugger for stepping your grammar-based parsers through its parsing of input text. This mechanism allows you to see how the parser is functioning so that you can quickly find and correct any problems in your grammar definition. The debugger stepping through some input text Add-onsSyntaxEditor offers a number of premium and free add-ons that can be used to integrate advanced parsers and pre-built syntax languages with your applications. Optional Premium Add-ons (Sold Separately).NET Languages Add-onThe .NET Languages Add-on provides automated IntelliPrompt completion lists, parameter info, quick info, code snippets, code outlining, parsing, AST construction, syntax error reporting, a resolver, and more for C# and Visual Basic documents. Automated IntelliPrompt features for C# and VB All you have to do is configure a "project assembly" with references to other assemblies and code, and you instantly get a Visual Studio-like editing experience. Web Languages Add-onThe Web Languages Add-on provides automated IntelliPrompt quick info, code outlining, parsing, AST construction, syntax error reporting, end tag auto-complete, formatting, and more for XML documents. Automated IntelliPrompt features for XML Quickly create advanced XML editors with SyntaxEditor and this add-on. Free Add-onsActipro LL(*) Parser FrameworkThe LL(*) Parser Framework is Actipro's own framework for constructing robust text parsers that work standalone or with code editor controls like SyntaxEditor. The framework features grammars that are written in C#/VB using EBNF-like notation, customizable AST construction, advanced error handling/reporting, easy code injection, a complete debugger UI, and much more. This add-on is the easiest way to create advanced grammar-based parsers for SyntaxEditor syntax languages. |