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 158246 - Cannot create domain class, controller with package
Summary: Cannot create domain class, controller with package
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 144000 159803 161024 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-10 04:54 UTC by khoinguyen
Modified: 2009-03-25 10:48 UTC (History)
2 users (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 khoinguyen 2009-02-10 04:54:28 UTC
I would like to create domain class and controller with package instead of place it in the domains, controllers
directory of Grails application. Grails allow this case, we can create domain/controller and place it in package under
domains, controllers directory of Grails application with package directive for those arterfacts.

For Netbeans 6.5 on Mac OS (not tested with other),
1. creating a domain class with the name com.example.project.Item for domain class will cause a 'Please input a valid
name' error message
2. I create a domain class with name Item, then create some folder 'com/example/project' and move Item.groovy into the
created folders, place a 'package com.example.project;' at the very top of 'Item.groovy'. But now, the 'Generate All'
and 'Generate View' in the context menu of Item.groovy is disabled.

Expected result:
1. Creating a domain class/controller accept com.example.project.Item as name, NB create com/example/project folder,
generate Item.groovy with 'package com.example.project;' at begin of Item.groovy (grails already accept
com.example.project.Item to do those thing, actually we just needs to accept com.example.project.Item and pass to grails
tool)
2. Detect an Groovy class is domain class or controller not only by the just upper directory but by
<app-dir>/grail-app/domains or <app-dir>/grail-app/controllers directory.
Comment 1 Petr Hejl 2009-02-10 15:49:20 UTC
Thanks for the report! We definitely want to fix this for 7.0.
Comment 2 Petr Hejl 2009-02-10 15:50:56 UTC
*** Issue 144000 has been marked as a duplicate of this issue. ***
Comment 3 Petr Hejl 2009-02-10 16:23:53 UTC
Usecase #2 fixed in main 47417afc5772.
Comment 4 Quality Engineering 2009-02-18 10:46:25 UTC
Integrated into 'main-golden', will be available in build *200902180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/47417afc5772
User: phejl@netbeans.org
Log: #158246 Cannot create domain class, controller with package
Comment 5 Petr Hejl 2009-03-06 16:40:55 UTC
*** Issue 159803 has been marked as a duplicate of this issue. ***
Comment 6 Petr Hejl 2009-03-16 17:08:50 UTC
Fixed in web-main 660b30053d25.
Comment 7 Quality Engineering 2009-03-17 08:42:54 UTC
Integrated into 'main-golden', will be available in build *200903170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/660b30053d25
User: phejl@netbeans.org
Log: #158246 Cannot create domain class, controller with package
Comment 8 Petr Hejl 2009-03-25 10:48:13 UTC
*** Issue 161024 has been marked as a duplicate of this issue. ***