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)?

4 comments

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);
controlPkgText.setText(chooserDialog.getSelectedPackage().getName());

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

0

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
http://www.jetbrains.com/
"Develop with Pleasure!"


0

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)?

0

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?

0

Please sign in to leave a comment.