Unable to access class methods/constants via IntelliPrompt

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 11 years ago by Devel
Avatar
Version : 4.0.274.0
Platform: Windows XP / .Net 2.0/ 32 bit

I have a C# library with a class like
public class XYZClass
{
public const int TESTCONST = 1;
public static void StaticTest(string message)
{
}
public void InstanceTest(string message)
{
}
}

We have set up SyntaxEditor's language to use VBSyntaxLanguage to write VB code, however the External libraries added are in C#

What needs to be done so that when one types "XYZClass." and Ctrl + Space we can see all the static members and constants of the class like in this case I should see 1) TESTCONST and 2) StaticTest in the MemberList drop down

Also when I create an instance of XYZClass like
Dim abc as New XYZClass()
For abc I should be able to see InstanceTest in the MemberList drop down

Thanks
Devel

[Modified at 10/03/2008 04:31 PM]

[Modified at 10/03/2008 05:18 PM]

[Modified at 10/09/2008 08:06 AM]

Comments (11)

Posted 11 years ago by Devel
Avatar
Also if there were two methods Test1() and Test2() and I want to expose only one method to the intellisense, is there a way to tag that method via an attribute similar to EditorBrowsable?
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi,

I tested this in our latest code here with the .NET Reflection QuickStart and it all worked fine. I made an assembly with XYZClass and compiled it then loaded it via the Add Reference button in the .NET Reflection QuickStart. When I use it I saw the static and instance members correctly.

For your other question, you can put this attribute on any member (in the source code) to hide it:
EditorBrowsable(EditorBrowsableState.Never)

Also there is a documentation topic on filtering member list items which you can do if you don't want to add the attribute.


Actipro Software Support

Posted 11 years ago by Devel
Avatar
I meant not by AddReference button but by calling AddExternalReference method on the DotNetProjectResolver instance after the Syntax Editor is set up.

these are the options we set up on the SyntaxEditor

syntaxEditor.Document.Outlining.Mode = OutliningMode.Automatic;
syntaxEditor.BracketHighlightingVisible = true;
syntaxEditor.Document.SemanticParsingEnabled = true;
syntaxEditor.Document.LexicalParsingEnabled = true;
syntaxEditor.IntelliPrompt.DropShadowEnabled = true;
syntaxEditor.IntelliPrompt.SmartTag.MultipleSmartTagsEnabled = false;
syntaxEditor.IntelliPrompt.SmartTag.ClearOnDocumentModification = false;
syntaxEditor.LineNumberMarginVisible = true;
syntaxEditor.Document.Language = new VBSyntaxLanguage();
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Right but the Add Reference button in our .NET Reflection QuickStart does call DotNetProjectResolver.AddExternalReference directly, so please do try the QuickStart and see if it works for you there.

If it does, then there is something in your configuration that is incorrect. Please read the Key Steps for Getting Started part of the main .NET add-on documenation topic for what you may be missing.


Actipro Software Support

Posted 11 years ago by Devel
Avatar
I downloaded new version 4.0.0276 of Syntax Editor and I verified using your test C# application that static members do not show up even for System Dlls

Here are the steps I followed. I launched the main application and started QuickStart .NET Language Reflection app. I have verified that the static methods do not work even for System dlls. For Example in System.Text.RegularExpressions.Regex class has a static method "IsMatch" defined by

public static bool IsMatch(string input, string pattern, System.Text.RegularExpressions.RegexOptions options)
Member of System.Text.RegularExpressions.Regex


When I use visual studio 2008 professional edition I am able to see all the static members via intellisense when I type System.Text.RegularExpressions.Regex followed by ".". I would expect the same behavior with Syntax editor.

Thanks
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I see, you were doing it outside of a member within the main type declaration area. Right now, the IntelliPrompt works fine if called within a member like a method but not in the type declaration area. We've updated our code to allow it for the next maintenance release.


Actipro Software Support

Posted 11 years ago by Devel
Avatar
May I know when is the next maintenance release?
We are kind of held up without that functionality and would appreciate if you act on and give us a new maintenance release as soon as possible.
Thanks
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We're trying for this week. We're doing builds now to do some testing on.


Actipro Software Support

Posted 10 years ago by Lisa
Avatar
Hi,

I am using v4.0.281 of the Syntax editor and .NET addon and just discovered that static members are not showing up in the IntelliPrompt member list. I verfied this using your .NET Language Reflection sample app by adding an external reference to an assembly that declares a class with both public instance members and static members. Only the instance members are displayed when I create an instance of that class and type '.' to bring up the member list. Did you change something on your end that caused this to break?

Thanks,
Lisa
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Lisa,

If I open the reflection QuickStart and type "Control." in there I see static members fine. I don't think anything has changed recently with that.

If you think there is a problem, then please email us with a simple sample project that shows the issue. Thanks!


Actipro Software Support

Posted 10 years ago by Lisa
Avatar
Sorry, my mistake. Everything is working as it should. :-)

Thanks,
Lisa
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.