Using namespace type detection

SyntaxEditor for Windows Forms Forum

Posted 9 years ago by Alexnaldo Santos
Version: 4.0.0289
Avatar
Hi,

In Visual Studio when I write a type like "ICollection s;" and the namespace for the type is not declared in "using" VS shows me the option do include the correct namespace.

Is it possible to do it with SyntaxEditor ? How ?


Regards,
Alexnaldo Santos

Comments (3)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Alexnaldo,

I'm sorry but we don't have that feature at this time.


Actipro Software Support

Posted 9 years ago by Alexnaldo Santos
Avatar
To implement this feature we need to know that the current Token is a "Unknown", but your parse said that is "IdentifierToken".

Code example :

using System;

namespace Test
{
public class MyCustomer
{
PropertyChangedEventArgs e;
}
}

The parse show me that "PropertyChangedEventArgs" is a IdentifierToken. If the parse show my that is "unknown" I can look for this class in all namespaces. SharpDeveloper uses this technique.
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Alexnaldo,

I'm assuming you are talking about the .NET Languages Add-on here. I'm sorry but our syntax lexer/parser doesn't resolve identifiers, so text words such as PropertyChangedEventArgs will be returned as generic identifier tokens.

You can get a context for a specific offset to have it try to resolve an identifier at that offset.


Actipro Software Support

The latest build of this product (v2020.1 build 0403) 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.