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 97851 - Provide FileEncodingQueryImplementation.
Summary: Provide FileEncodingQueryImplementation.
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks: 97848
  Show dependency tree
 
Reported: 2007-03-14 16:01 UTC by Tomas Zezula
Modified: 2007-07-07 18:44 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 Tomas Zezula 2007-03-14 16:01:41 UTC
The project type should provide FileEncodingQueryImplementation in its loookup.
The javac task should use encoding argument.
Comment 1 J Bachorik 2007-05-30 09:29:14 UTC
done necessary changes

Checking in EjbJarProject.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java,v
 <--  EjbJarProject.java
new revision: 1.68; previous revision: 1.67
done
RCS file:
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/queries/EjbJarProjectEncodingQueryImpl.java,v
done
Checking in queries/EjbJarProjectEncodingQueryImpl.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/queries/EjbJarProjectEncodingQueryImpl.java,v
 <--  EjbJarProjectEncodingQueryImpl.java
initial revision: 1.1
done
Checking in resources/build-impl.xsl;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.69; previous revision: 1.68
done
Checking in ui/customizer/CustomizerSources.form;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/CustomizerSources.form,v
 <--  CustomizerSources.form
new revision: 1.5; previous revision: 1.4
done
Checking in ui/customizer/CustomizerSources.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/CustomizerSources.java,v
 <--  CustomizerSources.java
new revision: 1.7; previous revision: 1.6
done
Checking in ui/customizer/EjbJarProjectProperties.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java,v
 <--  EjbJarProjectProperties.java
new revision: 1.32; previous revision: 1.31
done
Checking in ui/customizer/Bundle.properties;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.25; previous revision: 1.24
done
Checking in api/EjbJarProjectGenerator.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/api/EjbJarProjectGenerator.java,v
 <--  EjbJarProjectGenerator.java
new revision: 1.9; previous revision: 1.8
done
Comment 2 Ken Frank 2007-06-18 22:14:25 UTC
reopening as it seems the ejb or application client does not seem to read or write the global encoding set from project
properties
completely - this is just related to that part

1. create new j2se project (j2se project known to read/write global encoding value ok

2.  change the encoding value to something else.

3. create new ejb module  project

4. look at the encoding property - it does seem to be the one created in step 2.

5. change the encoding value of this ejb module project

6. create new ejb module project

7. the new project encoding property is not the one changed in step 5.

8. do same steps for application client - results are the same except that 
for step 4, the value is not the same.



PS - please  also review the code also for the following situations:

a. that the project encoding will be used for compilation  and all other activities in using form editor functionality
where sense
of encoding is needed to process files and data.

b. that when it does change the encoding, that new files created in the project use the new encoding
(besides html, jsp and xml - see c. below - this would be for all file->new choices that are active when the project is
an ejb module or application client.

c. as per spec/infoTomas provided, and as part of other tasks, 97871 and 97873
the charset tag, if present, in jsp and html files will be used for the
encoding versus that of the project encoding -- please make sure these
2 senses of encoding work together in the project.

d. We are assuming that for java and other non html and jsp files,
that the project encoding will be used.

for text files,  97861 was done for properties, but 97867 related to
autodetect encoding of text files is not done, so expectation
is just that text files are created and processed in the encoding
of the project.

e. The enterprise application project itself does not have an encoding project property - is this ok ?

ken.frank@sun.com
Comment 3 Ken Frank 2007-06-19 00:15:31 UTC
am reopening 97862 on appclient and will refer to this issue for the details.
didn't realize there was a separate one for appclient.

ken.frank@sun.com
Comment 4 Tomas Zezula 2007-06-21 09:25:46 UTC
The J2EE project generator should use FileEncodingQuery.getDefaultEncoding() when creating the project as a initial
value of the source.encoding property. The project should also update the default encoding (FEQ.setDefaultEncoding())
when the encoding is changed in the project's customizer.
Comment 5 J Bachorik 2007-06-25 15:46:58 UTC
The J2EE project generator now does use FileEncodingQuery.getDefaultEncoding() when creating the project as a initial
value of the source.encoding property. The project also does update the default encoding (FEQ.setDefaultEncoding())
when the encoding is changed in the project's customizer.

Checking in api/EjbJarProjectGenerator.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/api/EjbJarProjectGenerator.java,v  <-- 
EjbJarProjectGenerator.java
new revision: 1.15; previous revision: 1.14
done
Checking in ui/customizer/EjbJarProjectProperties.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java,v  <-- 
EjbJarProjectProperties.java
new revision: 1.35; previous revision: 1.34
Comment 6 Ken Frank 2007-07-07 18:44:18 UTC
verifying -

opening ejb project - it uses the global encoding value

and when changing the project encoding, the next project uses that encoding

ken.frank@sun.com