How To Disable the AutoIntellisennce window while editing multi line comment.

SyntaxEditor for WPF Forum

Posted 5 years ago by Ranjit
Version: 15.1
Avatar

{ First line in the multi line comment

 Second line in the multi line comment

}

I didnt see intellisence pop up window while typing the text in the first line of multi line text.

But i see the intelisence pop up window in the subsequent lines which is not required for us.

Can you please let us know is there any way to acheive this behaviour.

[Modified 5 years ago]

Comments (2)

Posted 5 years ago by Ranjit
Avatar

Now i am able to disable the popup window during the multile comment input. But all the characters after the multiline comment section ({}) are appearing in the green.

I have tried to mody the code as below

  lexicalState.DefaultTokenKey = "MultiLineCommentText";
            lexicalScope = new DynamicLexicalScope();
            lexicalState.LexicalScopes.Add(lexicalScope);
            lexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Explicit, "MultiLineCommentStartDelimiter", null);
            lexicalPatternGroup.TokenId = QuickScriptTokenId.MultiLineCommentStartDelimiter;
            lexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern("{"));
            lexicalScope.StartLexicalPatternGroup = lexicalPatternGroup;
            lexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Explicit, "MultiLineCommentEndDelimiter", null);
            lexicalPatternGroup.TokenId = QuickScriptTokenId.MultiLineCommentEndDelimiter;
            lexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern("}"));
            lexicalScope.EndLexicalPatternGroup = lexicalPatternGroup;
            lexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Regex, "MultiLineCommentLineTerminator", null);
            lexicalPatternGroup.TokenId = QuickScriptTokenId.MultiLineCommentLineTerminator;
            lexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern("}"));
            lexicalState.LexicalPatternGroups.Add(lexicalPatternGroup);
            lexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Regex, "MultiLineCommentText", null);
            lexicalPatternGroup.TokenId = QuickScriptTokenId.MultiLineCommentText;
            lexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern("[^}]+"));
            lexicalState.LexicalPatternGroups.Add(lexicalPatternGroup);

Can you please let me know if there is any change required while creating the lexical patterns ?

Regards

Ranjit

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

Hi Ranjit,

If you would make the language definition's dynamic lexer using our Language Designer app instead, you'd be able to load up a Live Test in that app where you can type text and it tells you which token is at the caret and where tokens start.  It's handy for debugging pattern issues like what you're experiencing.  The app can also code generate the code like what you have above if desired.

It's hard to say what the problem is without debugging it but my guess is that your end lexical pattern isn't getting picked up.  You have another "MultiLineCommentLineTerminator" that is also defined as "}" which seems like that's a bug.  You can probably remove everything for that particular pattern group.  Maybe see if that helps.  But in general I'd recommend designing the dynamic lexer in the Language Designer app so that you can get access to its Live Test feature for debugging.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.