Package selector dialog

is there any dialog component to select a Project package (like the ones you have in the run application dialog to choose a class with main method)?


I got the PackageChooserDialog
but I have a null pointer exception on this

final Project defaultProject = ProjectManager.getInstance().getDefaultProject();

PackageChooserDialog chooserDialog = new PackageChooserDialog("Select package", defaultProject);

and after that how can I translate tha package in the a path / VirutalFile?


Hello Sam,

SR> I got the PackageChooserDialog

This is not part of OpenAPI, so it is unsupported.

SR> but I have a null pointer exception on this
SR> final Project defaultProject =
SR> ProjectManager.getInstance().getDefaultProject();

getDefaultProject() returns a dummy project which doesn't have any packages
(or anything else useful) in it.

Dmitry Jemerov
Software Developer
"Develop with Pleasure!"


I try to use the TextFieldWithBrowseButton for package selection. The one way is add listener that shows PackageChooserDialog. Is there another way, without adding listener (another component, or method call that configures component)?


I use the code below to create text field with browse package button:

Do Idea libraries contain code like this and provide helper method for text field creation?


Please sign in to leave a comment.