Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3115

Netbeans (gradle) opens sources from source-jar files instead of (opened) projects

    XMLWordPrintableJSON

Details

    Description

      I'm using many independent gradle (java-library style) projects opened in NB. 

      They are not part of a big multi module project!

      Whenever I want to navigate to a source file from another project relative to the current one, Netbeans opens the source from ~/.m2/repository.../project.jar and not from the local file of the referenced  project which is of course also opened in NB.

      The same goes for debugging, I have to set breakpoints in .m2 sources (opened from projects configurations navigator items). Debugging libraries from local sources is not possible.

      I already tried to disable all ~/.m2 Sources under Window->Debugging->Sources.

      This doesn't change the behavior though (also not after restarting).

      Even if it would change the behavior I then would have to disable all those automatically added ~/.m2 (which are somehow preferred) references for every project.

      Maybe I'm just to stupid to find the right (global) option but ATM I think this behavior is a bug.

      Attached Test Case:

      • open both projects in Netbeans
      • deploy both project to local maven repo via custom rungradle action (clean build publishToMavenLocal)
      • go to NewClass in justalib
      • ctrl click on the new Lib2Class statement

      Expectation: Lib2Class gets opened from local filesystem, one can directly edit the referenced file.

      Actual: Lib2Class gets opened from local maven repo, read only.

       

       

       

      Attachments

        1. nbtest2.tbz2
          1 kB
          Björn Schmidt

        Activity

          People

            lkishalmi Laszlo Kishalmi
            BES Björn Schmidt
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h