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 - influence from the project type where to create Bundle.properties file
Summary: influence from the project type where to create Bundle.properties file
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 89008
  Show dependency tree
 
Reported: 2006-11-13 13:34 UTC by Milos Kleint
Modified: 2007-02-08 08:36 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
api part of the change (3.03 KB, patch)
2007-01-30 13:17 UTC, Milos Kleint
Details | Diff
implementation part of the change (3.82 KB, patch)
2007-01-30 13:17 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Kleint 2006-11-13 13:34:32 UTC
in maven based projects, creating a Bundle.properties 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
integrated

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