-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better domains - autocompletion, diagnostics, hover #167
base: master
Are you sure you want to change the base?
Conversation
02e2c6c
to
1cb2e18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice really cool!
Just one question on a comment, otherwise looks great!
server/src/features/completion.rs
Outdated
let from_module = file.borrow().find_module().clone(); | ||
Symbol::all_members(&parent, session, &mut all_symbols, true, from_module, &mut None, false); | ||
for (_symbol_name, symbols) in all_symbols { | ||
//we could use symbol_name to remove duplicated names, but it would hide functions vs variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we cannot have functions and variables with the same name, can we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could. Some would be shadowed, but as we are searching here in classes, inheritance, co-models,... we could find different symbols type with the same name
a69760d
to
fdbf24f
Compare
52385d1
to
b8f641e
Compare
on models, get_symbols returns all symbols that build the model, but there was no easy way to get all symbols that build the model with inherited models. get_full_model_symbols do it now. It doesn't contain inheritS howevers.
Add return values for with_company, with_context, with_prefetch, with_user, with_env, exists
…search domain tuple
Contexts was not really consistent and wrongly used. This rework will state that contexts passed as parameters to functions like follow_ref are global contexts linked to the evaluation of the current expression. EvaluationSymbolWeak now contains a Context, that is a local Context to this symbol, able to hold specific informations that would not be in the tree. It is mostly used for hooks and odoo code. For example, it will store used __init__ parameter in my_field = fields.Many2one("a_model"), so we can know the linked a_model to that field later on. This commit also include some rework on EvaluationSymbolWeak and Ptr and most functions now returns Ptr instead of Weak, to be able to express different kind of values.
…ttribute evaluation
4a8cc89
to
4558aab
Compare
The PR contains all changes and fixs about search domains.