Display only static methods when creating new node without self-argument (#7632)

close #7503

Implemented @jdunkerley's proposal https://github.com/enso-org/enso/issues/7503#issuecomment-1678852541 of filtering non-static methods when creating a new node without self-argument.

# Important Notes
![2023-08-22-162717_971x765_scrot](https://github.com/enso-org/enso/assets/357683/69a7106f-a071-4163-91c2-54aae437396e)
This commit is contained in:
Dmitry Bushev 2023-08-23 11:21:59 +01:00 committed by GitHub
parent c32bfad2b1
commit 4203a6e778
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -666,7 +666,7 @@ impl Searcher {
let this = self.clone_ref();
executor::global::spawn(async move {
let this_type = this_type.await;
let is_static = this_type.is_some().then_some(false);
let is_static = Some(this_type.is_none());
info!("Requesting new suggestion list. Type of `self` is {this_type:?}.");
let file = graph.module.path().file_path();
let response =
@ -964,7 +964,7 @@ pub mod test {
result: &[SuggestionId],
) {
let completion_response = completion_response(result);
let is_static = self_type.is_some().then_some(false);
let is_static = Some(self_type.is_none());
expect_call!(client.completion(
module = self.graph.module.path.file_path().clone(),
position = self.code_location,