Java Packages Explorer has no public API for that, but that was done for Project Explorer View which is based on Common Navigator Framework and thus extendable by nature.
http://community.jboss.org/servlet/JiveServlet/downloadImage/3032/358-521/webroot-src.png