Token Properties and Referencing Guids

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Carl Gilbert
Avatar
Hi

I have a tree-like structure of objects in my system. I also have a pattern group define as follow:

<ExplicitPatternGroup TokenKey="OrganisationToken" PatternValue="Organisation" Style="ReservedWordStyle" LookAhead="{NonWordMacro}" CaseSensitivity="AutoCorrect"/>

When I detect an OrganisationToken, I am displaying a member list with all the base objects in my system.

What I want to allow the user to do is to select one of these objects and then display another member list of all its children.
This would then be recursive so the user could navigate down through the objects in my system.

The only problem is, as soon as I choose the first object, the previous token is no longer an OrganisationToken but now a IdentifierToken.

Is there anyway for a token to describe the object it references? For example, can I put the guid of the object a tag like property?

Regards, Carl Gilbert

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes, each Token has a SemanticParseData property that is null by default but you can put anything in there that you'd like. Think of it as a Tag property.


Actipro Software Support

Posted 14 years ago by Carl Gilbert
Avatar
Hi

Firstly, thanks for the quick reply.

Secondly, if I put the Guid of the object in the tag of the IntelliPromptMemberListItem, how can I get this into the SemanticParseData property of the token inserted as a result of the user choosing an item from the MemberList?

Regards, Carl
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Maybe in the member list Closed event, look at the SelectedItem's GUID. You know what text was inserted by looking at the SelectedItem's pre and post text and scan backwards from the caret for it.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.