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

Gradle project Lookup inconsistent until OpenProjects.open()

    XMLWordPrintableJSON

Details

    Description

      Gradle fallback support recognizes several plugins from the directory structure (without reading the build.gradle file): groovy, java,  scala, war.

      However project Lookup does not contain services for those Plugins, until OpenProjects.open() is called. The Project, however still untrusted, and unevaluated, starts to serve java-related services.

      This is inconsistent with project API's philosophy: https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi-base/org/netbeans/api/project/ui/OpenProjects.html

      Only certain operations should actually be aware of which projects are "open"; by default, all project functionality should be available whether it is open or not.

      In this particular situation, ClassPath.getClassPath(sourceFile, SOURCE) does not return ClassPath even though Gradle fallback support recognizes 'java' and 'java-base' plugins until the project opens in the UI. For the rest of the IDE, the project appears as not having any sources in it - the returned ClassPath is not marked as incomplete, but simply does not exist.

      Attachments

        Issue Links

          Activity

            People

              sdedic Svatopluk Dedic
              sdedic Svatopluk Dedic
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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