Fragment editing

SyntaxEditor for WPF Forum

Posted 13 years ago by Arash Sahami
Version: 10.2.0533
Avatar
The Syntax editor in windows forms supports the so called fragment editing where only a part of the code could be edited. Is this supported by the new WPF version of syntax editor?

/Arash

Comments (7)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Arash,

Sorry but that feature isn't available yet in WPF. It is something we will want to support in one form or another. We'll likely work on a way to support it for our WPF .NET Languages Add-on later but may consider another approach for achieving fragment editing. I'll write down your post and perhaps we can ask for feedback on our ideas when we start working on that feature.


Actipro Software Support

Posted 13 years ago by Arash Sahami
Avatar
Hi

I get the feeling that you guys have a lot of work ahead in order to achieve the same functionality in the new WPF syntax editor as the Windows form version.

Currently we use the windows form version of Syntax editor in our product to edit C# code, which is by the way an excellent product.

We purchased the new WPF version of syntax editor hoping to be able to replace the current windows form version with the new WPF version. It is disappointing to discover that the WPF syntax editor at this point is not as nearly developed as we thought it would to be.

Is there any roadmap or release date set for the WPF Syntax editor with full .NET language support (with intelliprompt and all other features)? It would be useful for our planning.

Regards
Arash
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Arash,

Well as we have been writing the WPF/Silverlight versions we have implemented a next generation object model that is completely extensible and has a number of advanced features we don't offer in WinForms. As we convert feature areas over from WinForms we don't just clone them, we look for ways to improve the design and add new capabilities. For instance our completion lists in WPF are much more powerful than in WinForms. But since we are in some areas doing large redesigns and adding features, it does take longer than just copying code.

Per our blog posts, we have already started the .NET Languages Add-on and it is currently our top new-development priority. We have a new innovative parser framework in WPF/Silverlight and we're rewriting the C#/VB parsers to use that. It provides much better support for features like syntax error reporting. See this post for instance:
http://blog.actiprosoftware.com/post.aspx?id=590155b2-2f6a-4579-a16e-b6cd3b7f38fb

Our first phase of the add-on will be complete with the release of the first 2011.1 version. That will provide full C#/VB parsing, AST construction, syntax error reporting, and automatic outlining.

After that, the next phase is to start to build ways to get contextual information about what is at an offset (what type/members contains it, etc.). This sort of information allows us to then add automated IntelliPrompt features.

Anyhow, back onto your original question on fragment editing. Can you provide more details on what you do with that in C#? Do you just need the fragments to achieve automated IntelliPrompt (like if you are only editing within a method, etc.? Or do you also require the complete resulting AST to be available when editing other files as well, so that IntelliPrompt can work on the header/document/footer content together from other editor instances?


Actipro Software Support

Posted 13 years ago by Arash Sahami
Avatar
We need automated Intelliprompt as well as the complete resulting AST from Header/document/footer content.

Do you have any planned release date for the intelliprompt feature?

regards
Arash
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Can you give a small snippet showing what you edit with fragments in WinForms? That will help us decide how to implement them in the future.

We don't have any dates at this time but as mentioned it is a top new-development priority for us. We're spending a lot of time on the C#/VB grammar design right now to make sure we have a solid AST object model, excellent error handling/recovery/reporting, and tons of unit tests. We hope to have phase 1 done in the coming weeks. Then we'll move onto phase 2, which involves building context info about an offset, storing/obtaining reflection data, and then populating IntelliPrompt. Those pieces each are pretty large and will take several weeks to complete. We have ideas for improving them over the WinForms design too. We want them to be as extensible and open as the rest of SyntaxEditor for WPF/Silverlight.


Actipro Software Support

Posted 13 years ago by Arash Sahami
Avatar
In our case we provide our users ability to write their own code expressions.
The user is not aware that the expression he/she writes is actually the body (fragment part) of a static method of a static class because the header and footer part of the class is not visible to the user. The user has access to intelliprompt which lists the types in the assemblies that we have chosen to refer to.
The entire class is then compiled and used in our runtime.

Example:

//Start of the header part
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CustomCodeBesideClass
{
   public static class MyCodeBeside
   {
      public static string Name
      {
         get
         {
            // ..Code to access some value in our internal data model 
         }
      }

      public static string GetExpression()
      {
         return 
//End of header part. Start of fragment part. Here the user will add code
            "Hello " + Name + "!";
//End of fragment part. Start of footer part
      }
   }
}
//End of footer part.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Just FYI, as described in this blog post, we've implemented new code fragment editing features for the upcoming 2011.2 version of SyntaxEditor for WPF/Silverlight.
http://blog.actiprosoftware.com/post/2011/08/18/SyntaxEditor-Code-Fragments.aspx


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.