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 101686 - Rest WS template should be limited to Java
Summary: Rest WS template should be limited to Java
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-19 06:01 UTC by Pavel Buzek
Modified: 2007-06-22 22:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Buzek 2007-04-19 06:01:44 UTC
It should not be offered for Rails project, it should be limited only for
project that support Java templates (I guess). In Rails project it throws:

java.lang.IllegalArgumentException: No folders selected
	at
org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createPackageChooser(JavaTemplates.java:85)
	at
org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createPackageChooser(JavaTemplates.java:64)
	at
org.netbeans.modules.websvc.rest.wizard.RESTServicesFromEntitiesIterator.initialize(RESTServicesFromEntitiesIterator.java:129)
Comment 1 Peter Liu 2007-04-19 18:05:07 UTC
Actually, this template should only appear in a web project, so we also need to
make sure it doesn't show up in ejb, java projects, etc.
Comment 2 Pavel Buzek 2007-04-19 18:37:53 UTC
OK, then try adding this into the layer file where template is registered

        <attr name="templateCategory" stringvalue="web-types"/>
Comment 3 Nam Nguyen 2007-04-19 19:01:13 UTC
Thanks Pavel, this works.  I will checked in the changes soon after the meeting.
Comment 4 Pavel Buzek 2007-04-20 00:35:11 UTC
OK, Nam, I already fixed that. Review if you want.

/cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/resources/layer.xml,v  <--
 layer.xml
new revision: 1.10; previous revision: 1.9
/cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/wizard/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.8; previous revision: 1.7
/cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/wizard/resources/RESTServicesFromEntities.html,v
 <--  RESTServicesFromEntities.html
new revision: 1.2; previous revision: 1.1
Comment 5 Nam Nguyen 2007-04-20 01:19:44 UTC
It's works perfectly. Thanks.
Comment 6 Lukas Jungmann 2007-06-22 22:51:25 UTC
v.