File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -814,6 +814,13 @@ impl SyncOdoo {
814
814
pub fn get_symbol_of_opened_file ( session : & mut SessionInfo , path : & PathBuf ) -> Option < Rc < RefCell < Symbol > > > {
815
815
let path_in_tree = path. to_tree_path ( ) ;
816
816
for entry in session. sync_odoo . entry_point_mgr . borrow ( ) . iter_main ( ) {
817
+ let sym_in_data = entry. borrow ( ) . data_symbols . get ( path. sanitize ( ) . as_str ( ) ) . cloned ( ) ;
818
+ if let Some ( sym) = sym_in_data {
819
+ if let Some ( sym) = sym. upgrade ( ) {
820
+ return Some ( sym) ;
821
+ }
822
+ continue ;
823
+ }
817
824
if ( entry. borrow ( ) . typ == EntryPointType :: MAIN || entry. borrow ( ) . addon_to_odoo_path . is_some ( ) ) && entry. borrow ( ) . is_valid_for ( path) {
818
825
let tree = entry. borrow ( ) . get_tree_for_entry ( path) ;
819
826
let path_symbol = entry. borrow ( ) . root . borrow ( ) . get_symbol ( & tree, u32:: MAX ) ;
@@ -826,6 +833,13 @@ impl SyncOdoo {
826
833
//Not found? Then return if it is matching a non-public entry strictly matching the file
827
834
let mut found_an_entry = false ; //there to ensure that a wrongly built entry would create infinite loop
828
835
for entry in session. sync_odoo . entry_point_mgr . borrow ( ) . custom_entry_points . iter ( ) {
836
+ let sym_in_data = entry. borrow ( ) . data_symbols . get ( path. sanitize ( ) . as_str ( ) ) . cloned ( ) ;
837
+ if let Some ( sym) = sym_in_data {
838
+ if let Some ( sym) = sym. upgrade ( ) {
839
+ return Some ( sym) ;
840
+ }
841
+ continue ;
842
+ }
829
843
if !entry. borrow ( ) . is_public ( ) && & path_in_tree == & PathBuf :: from ( & entry. borrow ( ) . path ) {
830
844
found_an_entry = true ;
831
845
let tree = entry. borrow ( ) . get_tree_for_entry ( path) ;
You can’t perform that action at this time.
0 commit comments