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