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

Add Export Package menu item in popup menu when right-click a package in a jigsaw modular Java project

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 9.0
    • Next
    • java - Project
    • JDK 9 and later

    Description

      As of Java 9, modules have been introduced in the Java language. One can export a package in a Java module by adding an exports command in the module descriptor. Then the package's icon in the Project Explore turns into an open lock.

      A nice enhancement would be to add a new menu item Export package like in the attachment, when displaying the popup menu on right-clicking on a package of a modularized Java application, that would do the job for you, i.e. add the line

      exports <package name>;

      in the module descriptor. The menu action will then be replaced by an Unexport package to revert the action and remove the above line from the module descriptor, should the user wishes to.

      This functionality already exists in NetBeans RCP module system and it would be a nice addition for jigsaw modules too.

      These menu items should only be visible for jigsaw modularized projects, i.e. projects with a module descriptor.

       

       

      Attachments

        1. NB-export-package.png
          77 kB
          John Kostaras

        Activity

          People

            Unassigned Unassigned
            jkost John Kostaras
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: