Skip to content

Conversation

dklilley
Copy link
Member

These changes address two issues:

  1. "Go to Definition" does not seem to work when using package folders MATLAB-extension-for-vscode#5 - Improves navigation to files within packages when those packages are not on the MATLAB path
  2. Definition jumps to local functions that should not be able to be referenced MATLAB-extension-for-vscode#31 - Prevents navigation to private/local functions from other files

For (1), we first try to resolve an identifier via the MATLAB path (as before). But now, if that resolution fails, we temporarily cd into the source file's directory, thereby forcing it onto the path. We then attempt a name resolution again before cding back to the original directory. If the name resolution still fails, we fall back to the code data cache.

For (2), a check was added to ensure that 'private' functions in other files cannot be matched when searching for a definition.

@dklilley dklilley requested a review from gauravsavadi June 15, 2023 17:45
@dklilley dklilley self-assigned this Jun 15, 2023
@dklilley dklilley merged commit 707810b into main Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants