Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
9.0
-
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.