This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 247508 - IllegalArgumentException: No folders selected
Summary: IllegalArgumentException: No folders selected
Status: NEW
Alias: None
Product: third-party
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: issues@third-party
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-26 22:41 UTC by lochoagar
Modified: 2014-12-04 10:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 207612


Attachments
stacktrace (2.36 KB, text/plain)
2014-09-26 22:41 UTC, lochoagar
Details
stacktrace (2.36 KB, text/plain)
2014-11-19 09:06 UTC, horvpeter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lochoagar 2014-09-26 22:41:26 UTC
Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.65-b04, Java(TM) SE Runtime Environment, 1.7.0_67-b01
OS: Windows 7

User Comments:
GUEST: When I try to create a new Groovy script or file I receive this error.  I do have a folder selected in the Files pane.

GUEST: Was trying to create a Groovy class under buildSrc in a Gradle project.

GUEST: Trying to create a new groovy script file in the 'file tab'. Also installed the lastest gradle plugin 1.2.9

lochoagar: I was creating a groovy file in a Web project. In a folder i clicked with the right button then i selected the groovy file and the error showed up.

GUEST: Actually I do have a folder selected




Stacktrace: 
java.lang.IllegalArgumentException: No folders selected
   at org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createPackageChooser(JavaTemplates.java:110)
   at org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createPackageChooser(JavaTemplates.java:89)
   at org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createPackageChooser(JavaTemplates.java:72)
   at org.netbeans.modules.groovy.support.wizard.AbstractFileWizard.createPanels(AbstractFileWizard.java:121)
   at org.netbeans.modules.groovy.support.wizard.AbstractFileWizard.initialize(AbstractFileWizard.java:94)
   at org.netbeans.modules.groovy.support.wizard.AbstractGroovyWizard.initialize(AbstractGroovyWizard.java:84)
Comment 1 lochoagar 2014-09-26 22:41:27 UTC
Created attachment 149549 [details]
stacktrace
Comment 2 horvpeter 2014-11-19 09:06:57 UTC
Created attachment 150562 [details]
stacktrace

try to add a new groovy class
Comment 3 Tomas Zezula 2014-12-04 10:06:03 UTC
The problem is in:
org.netbeans.modules.groovy.support.wizard.AbstractFileWizard.createPanels()
which passes empty SourceGroup[] array to org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createPackageChooser(JavaTemplates.java:72) which in Javadoc states:
@param folders a list of possible Java package roots to create the new file in (must be nonempty)