How to beautify code in SyntaxEditor

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Jean Versailles
Avatar
Hello, EveryOne


is there a method or property to call to beautify codes in syntaxEditor.

For example a beautify code would like this

<?xml version="1.0" encoding="utf-8" ?>
<Companies>
  <Company name="Microsoft">
    <Employees>
      <Employee name="Anderson" department="Accounting"/>
    </Employees>
  </Company>
</Companies>
where a code the is not beautify would look like this

<?xml version="1.0" encoding="utf-8" ?>
<Companies>
<Company name="Microsoft">
<Employees>
<Employee name="Anderson" department="Accounting"/>
</Employees>
</Company>
</Companies>
[Modified at 01/13/2006 08:45 AM]

Comments (5)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jean,

Not yet however since we are working on our 4.0 version and would like to add features like this when we improve our language design for 4.0, we'd love to hear any implementation ideas you have.


Actipro Software Support

Posted 14 years ago by Jean Versailles
Avatar
alright
Posted 14 years ago by László Mohácsi
Avatar
Would it be possible to have such a syntax formatter as we have in VS2005? Where you can format the whole document, format the current line on ';' trigger, and format pasted code. I guess the new language format could open up doors like this ?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
One of the 4.0 goals is to make it possible to do all your language handling within classes that you create which inherit SyntaxLanguage. So you could manage things like IntelliPrompt, formatting (as you said above), indentation, word wrap, etc. from methods on the SyntaxLanguage and your code would be specific to that language. Therefore languages become more of a plug-in and encapsulate all the language-specific functionality.

The end result is that you don't handle nearly as many SyntaxEditor events since that code would be moved to methods on SyntaxLanguage that would be called.


Actipro Software Support

Posted 14 years ago by NSXDavid
Avatar
Spectacular. :) Bring it!

-- David
The latest build of this product (v2018.1 build 0342) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.