mirror of
https://github.com/enso-org/enso.git
synced 2024-11-23 08:08:34 +03:00
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:
parent
c32bfad2b1
commit
4203a6e778
@ -666,7 +666,7 @@ impl Searcher {
|
|||||||
let this = self.clone_ref();
|
let this = self.clone_ref();
|
||||||
executor::global::spawn(async move {
|
executor::global::spawn(async move {
|
||||||
let this_type = this_type.await;
|
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:?}.");
|
info!("Requesting new suggestion list. Type of `self` is {this_type:?}.");
|
||||||
let file = graph.module.path().file_path();
|
let file = graph.module.path().file_path();
|
||||||
let response =
|
let response =
|
||||||
@ -964,7 +964,7 @@ pub mod test {
|
|||||||
result: &[SuggestionId],
|
result: &[SuggestionId],
|
||||||
) {
|
) {
|
||||||
let completion_response = completion_response(result);
|
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(
|
expect_call!(client.completion(
|
||||||
module = self.graph.module.path.file_path().clone(),
|
module = self.graph.module.path.file_path().clone(),
|
||||||
position = self.code_location,
|
position = self.code_location,
|
||||||
|
Loading…
Reference in New Issue
Block a user