I’m looking at the new Python Language Add-on for SyntaxEditor sample.
First of all, looks really good!
Second, I want to implement a small test program for this evaluation and to do that I have 3 things I wish to try:
1. I would like to add a standard capability of static python code analysis (like in other IDEs):
Assuming a parameter “count” is received in a function, I would like to enable the auto-complete on it, and usually it is done by making an assert statement before using that parameter (obviously this example is not the best one but just replace the type and it becomes more meaningful...):
def __init__(self, count): assert isinstance(count, int) or even: assert isinstance(count, (int, long))
Is it possible to add that capability to the parser and allow him to understand these kind of hints?
If so can you provide me with some pointers or starters on how to do that?
2. I would also like to provide some more variables which are not present in the document, and will be at run-time, to the auto-completion mechanism. Is it possible?
Reading the documentation, I think the best way to go is to make a decoration around the PythonCompletionProvider class. Am I in the right way?
3. I wish also try and split the entire document to several active modules (ModuleDefinition), is it possible to do that (as the returned Context for the entire document)?