You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/12/23 19:12:25 UTC

[GitHub] [netbeans] matthiasblaesing commented on issue #5120: "Navigate > GoToDeclaration" fails if target is in gradle project

matthiasblaesing commented on issue #5120:
URL: https://github.com/apache/netbeans/issues/5120#issuecomment-1364251932

   From my experience the maven approach is sane: If the project version matches the dependency version, then "Goto Declaration" takes you into the project. If it does not match, it goes to the source associated with the dependency.
   
   1. Clone `https://github.com/mwiede/jsch.git`
   2. Open the `jsch` project
   3. Create a new maven project
   4. Add a dependency on [com.github.mwiede:jsch:0.1.72](https://search.maven.org/artifact/com.github.mwiede/jsch/0.1.72)
   5. Download sources for dependency
   6. Create a `main` method, insert `System.out.println(JSch.VERSION);`
   7. Invoke "Goto Declaration" on `VERSION`
   
   You are taken to the read-only version of the source, you downloaded in step 5.
   
   ![image](https://user-images.githubusercontent.com/2179736/209395531-68b9229b-df6f-41c1-a0b8-b718b9ffcf99.png)
   
   8. Checkout the tag `jsch-0.1.72`
   9. Go back to your `main` method and  invoke "Goto Declaration" again
   
   You are taken to the checked out file.
   
   ![image](https://user-images.githubusercontent.com/2179736/209395628-0c173042-ef6e-4e7c-8844-4c357b7b2298.png)
   
   For me this is the logical approach and works beautifully. When I have this situation where I have the same version checked out in a project, I'm not interested in the generated source jar, but the live code, as that is what I'm working on.
   
   So without a very convincing argument changing the maven behavior would be a regression in my mind.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists