Skip to content

Commit

Permalink
Display only static methods when creating new node without self-argum…
Browse files Browse the repository at this point in the history
…ent (#7632)

close #7503

Implemented @jdunkerley's proposal #7503 (comment) 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)
  • Loading branch information
4e6 authored Aug 23, 2023
1 parent c32bfad commit 4203a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/gui/src/controller/searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4203a6e

Please sign in to comment.