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 89204

Summary: influence from the project type where to create file
Product: guibuilder Reporter: Milos Kleint <mkleint>
Component: CodeAssignee: Milos Kleint <mkleint>
Severity: blocker CC: tpavek
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Bug Depends on:    
Bug Blocks: 89008    
Attachments: api part of the change
implementation part of the change

Description Milos Kleint 2006-11-13 13:34:32 UTC
in maven based projects, creating a file next to the java file
is wrong as Maven separates compilable sources and "resources". A bundle file in
source tree won't end up in the final jar and needs to be created in separate
folder structure.

We need some API or improved algorithm for deciding where to create the new
bundle file.
Comment 1 Tomas Pavek 2006-11-13 16:41:03 UTC
I think the API should be somewhere else and form would just use it. E.g. if 
org.netbeans.api.project.Sources defined a standard source group type for 
resources, we might try to always look for it and create the Bundle file in 
there if it exists; otherwise in standard sources. Just an idea...
Comment 2 Milos Kleint 2006-11-13 21:33:56 UTC
yup, that was exactly my line of thinking. I filed against form as it's the only
place I know of currently that would use such api..
Comment 3 Milos Kleint 2007-01-30 13:17:00 UTC
Created attachment 37817 [details]
api part of the change
Comment 4 Milos Kleint 2007-01-30 13:17:42 UTC
Created attachment 37818 [details]
implementation part of the change
Comment 5 Milos Kleint 2007-01-30 13:18:51 UTC
tpavek: can you please review my patch before I submit it to apireviews?
Comment 6 Tomas Pavek 2007-01-30 13:45:26 UTC
The API part looks good to me. The impl covers the automatic 
internationalization. It does not cover migration (if a project is upgraded to 
start using separate resources root), but that's probably not a real use case.

We may need to use the API on more places - e.g. in the Swing Application 
Framework support which creates properties files for resources. Should file a 
new issue once the API is integrated.
Comment 7 Milos Kleint 2007-01-30 17:05:22 UTC
please review this minor change to java projects apis.
Comment 8 Milos Kleint 2007-02-07 12:21:44 UTC
thanks for review, I will integrate tomorrow.
Comment 9 Milos Kleint 2007-02-08 08:36:02 UTC

IDE: [2/8/07 9:31 AM] Committing Files started
Checking in i18n/form/src/org/netbeans/modules/i18n/form/;
/cvs/i18n/form/src/org/netbeans/modules/i18n/form/,v  <--
new revision: 1.8; previous revision: 1.7
Checking in java/project/apichanges.xml;
/cvs/java/project/apichanges.xml,v  <--  apichanges.xml
new revision: 1.16; previous revision: 1.15
Checking in java/project/;
/cvs/java/project/,v  <--
new revision: 1.21; previous revision: 1.20
Checking in i18n/form/nbproject/project.xml;
/cvs/i18n/form/nbproject/project.xml,v  <--  project.xml
new revision: 1.16; previous revision: 1.15
Checking in
new revision: 1.8; previous revision: 1.7
IDE: [2/8/07 9:31 AM] Committing Files finished