Extension functions and intellisense

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 12 years ago by 7Alpha7
Version: 11.2.0550
Avatar
It seems extensions functions are not covered by intellisense yet. With the huge use of Linq, it's really ennoying. Is this planned to be covered soon ?

[Modified at 12/05/2011 04:35 PM]

Comments (4)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Extension methods should currently be supported. Linq statements are still on the TODO list. I will write your request with the Linq TODO item.


Actipro Software Support

Posted 12 years ago by 7Alpha7
Avatar

Hi,

I am still not convinced that extension methods are working properly. For example, I have this case :

In some sys.dll I have :

namespace sys {
    public static class Extensions {
        public static string getDeepErrorMessage(this Exception e) {
            StringBuilder sb = new StringBuilder();
            ...
            return sb.ToString();
        }
    }
}

 the sys.dll is added in the parsing context with :

IProjectAssembly projectAssembly = language.GetService<IProjectAssembly>();
projectAssembly.AssemblyReferences.AddFrom(reference.assemblyPath.Value);

 then in a source file like this :

using System;
using sw7.sys;

namespace test {
    public class Test {

        Exception e; 
        string s = Extensions.getDeepErrorMessage(e); //THIS WORKS WITH INTELLISENSE
        s = e. //THIS DOES NOT DISPLAYS THE  getDeepErrorMessage WITH INTELLISENSE

the Extensions class is seen with its static methods because they are displayed correctly behind the Extensions. ; but straight behind the Exception the extension methods are not seen.

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi,

I pasted your Extensions definition inside our sample project and ran it and then added code in our demo similar to what you have in the third snippet and getDeepErrorMessage showed in both cases for me. 

If you can't figure it out then please make a new very simple sample project that shows the issue and email that to our support address.  Rename any .zip file extensions so they don't get spam blocked.


Actipro Software Support

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

I just wanted to let you know that we expect LINQ automated IntelliPrompt features to be added in the next maintenance release per this blog post.


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.