How to refer to definitions in multiple source codes.

SyntaxEditor .NET Languages Add-on for WPF Forum

The latest build of this product (v21.1.3) was released 16 days ago, which was before this thread was created.
Posted 15 days ago by Seito Shirata
Version: 19.1.0684
Avatar

Hello, 

In SytaxEditor,
I would like to refer to definitions between multiple codes in a project, get QuickInfo, use completion functionality. 

For example, there are two codes as SyntaxEditor's text like bellow, and they are displayed in a docking window.

namespace MyNamespace{

    class ClassA {
        
        public ClassB(){
            this.classA = new ClassA();
        }

        public int PropertyA;
    }
}
namespace MyNamespace{

    class ClassB {

        ClassA classA;

        public ClassB(){
            this.classA = new ClassA();
            classA.PropertyA = 1;
        }
    }
}

I cannot refer to definitions in the other code.
Thus, I cannot get QuickInfo, or cannot use the completion functionality like Ctrl + Space after entering 'classA.', etc.

How can I solve this problem?

Thanks.

Comments (2)

Posted 14 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Source code documents are managed by the ISourceFile interface. In your scenario, you'd have one ISourceFile for the file containing ClassA and another ISourceFile for the file containing ClassB.  The IProjectAssembly interface is used to manage all source files and assembly references (just like a Visual Studio project), and you can use the IProjectAssembly.SourceFiles collection to include one or more sources. The SyntaxEditor IntelliPrompt feature is driving off the IProjectAssembly, so properly including all the SourceFiles will enable the IntelliPrompt functionality.

Please refer to the following documentation topic for working with source files and let us know if you still have questions about how to achieve what you are looking for:

.NET Languages Add-on Assemblies


Actipro Software Support

Posted 9 days ago by Seito Shirata
Avatar

Hello,

I've solved this issue by meeting the conditions described in the reference document.

Thanks.

Add Comment

Please log in to a validated account to post comments.