Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method declarations in .ml files should link to their implementations #323

Open
jfehrle opened this issue Apr 23, 2021 · 7 comments
Open

Comments

@jfehrle
Copy link
Collaborator

jfehrle commented Apr 23, 2021

plugin version: 0.99-2021.1

source_buffer and the other declarations should have gutter icons linking to their implementations. Similarly, implementations should link back to their declarations.

image

@giraud
Copy link
Owner

giraud commented Dec 1, 2022

Fixed in 0.108

@giraud giraud closed this as completed Dec 1, 2022
@jfehrle
Copy link
Collaborator Author

jfehrle commented Dec 2, 2022

Great, thanks! I noticed a tiny glitch: the very first time I open the .ml file I only see one gutter icon, like this:

image

then if I click on the gutter icon, it add icons on the detail items like this (rather than jumping to the mli file):

image

At that point it seems to be persistent, e.g. if I close and reopen the file and the project, all the icons are there immediately.

It would be cool to be able to jump from method clear : unit -> unit to the implementation (method clear () = buffer#set_text ""). Perhaps another day.

@giraud giraud reopened this Dec 2, 2022
@giraud
Copy link
Owner

giraud commented May 29, 2023

@jfehrle can you try with 0.113 ? code for gutter navigation has been rewritten

@jfehrle
Copy link
Collaborator Author

jfehrle commented May 29, 2023

That addresses my Dec 1 comment above, thanks!

However, my original suggestion still applies: it would be great to have additional icons that link from the declaration in the .ml file to the implementation of each method. (The declaration could show both an up arrow icon and a down arrow icon in the gutter.)

@giraud giraud self-assigned this Dec 20, 2023
@giraud
Copy link
Owner

giraud commented Dec 20, 2023

@jfehrle I don’t know OCaml 'class type', can you point me where the implementation of 'proof_view' can be found ?

@jfehrle
Copy link
Collaborator Author

jfehrle commented Dec 20, 2023

The file is available as https://github.com/coq/coq/blob/master/ide/coqide/wg_ProofView.ml. Note the class declaration in the file no longer exactly matches the image in the description.

refresh in the class declaration should link to:

  let pf = object(self)
     :
    method refresh ~force =    (* ON THIS LINE *)
     :
  end

@giraud
Copy link
Owner

giraud commented Dec 21, 2023

thanks, I need to read more about objects and class types 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants