Posted 13 years ago by Erik Pepping - RADVenture B.V
Version: 4.0.0246
Avatar
Hi,

As soon as I try to get the content from the DotNetProjectResolver, like the _DotNetProjectResolver.SourceProjectContent.GetTypes(null, pProject.ProjectTemplate.NameSpace, DomBindingFlags.Public). It will return different results when it has not finished parsing, it returns an incomplete result.

How do I use functions like GetTypes correctly?
It would really help if the post-condition of these retrieval functions like GetTypes() will always return the same results regardless of the parsing state. So perhaps it should wait for the parser to finish before returning a incomplete result?

Erik Pepping

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes that is true, it can only return results for data that it knows about.

What we do sometimes is call this before looking for results:
// Try and ensure the compilation unit is up-to-date
SemanticParserService.WaitForParse(SemanticParserServiceRequest.GetParseHashKey(syntaxEditor.Document, syntaxEditor.Document));
That will wait briefly if the document is queued for parsing. If the parsing is taking too long it will continue on. There is an overload where you can specify a custom max wait time.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.