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 97854 - Provide FileEncodingQueryImplementation for freeform projects
Summary: Provide FileEncodingQueryImplementation for freeform projects
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Freeform (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milan Kubec
URL:
Keywords:
Depends on: 120508
Blocks: 97848
  Show dependency tree
 
Reported: 2007-03-14 16:06 UTC by Tomas Zezula
Modified: 2007-10-31 18:08 UTC (History)
4 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 Tomas Zezula 2007-03-14 16:06:27 UTC
The project should provide FileEncodingQueryImplementation in its lookup and
javac task should use encoding argument.
Comment 1 Petr Jiricka 2007-03-14 16:26:37 UTC
If this is implemented, will the web freeform be fixed automatically as well? Or
is an additional implementation needed for web freeform? Thanks.
Comment 2 Jesse Glick 2007-04-03 15:33:22 UTC
I would suggest

<xsd:complexType name="maybe-typed-source-root">
 <xsd:sequence>
  <xsd:element name="label" type="xsd:token"/>
  <xsd:element name="type" type="xsd:NMTOKEN" minOccurs="0"/>
  <xsd:element name="location" type="substitutable-text"/>
  <xsd:element name="includes" type="substitutable-text" minOccurs="0"/>
  <xsd:element name="excludes" type="substitutable-text" minOccurs="0"/>
  <!-- Added: -->
  <xsd:element name="encoding" type="substitutable-text" minOccurs="0"/>
 </xsd:sequence>
</xsd:complexType>

You would need to modify at least

ant/freeform/src/org/netbeans/modules/ant/freeform/resources/freeform-project-general-2.xsd
www/www/ns/freeform-project/2.xsd
ant/freeform/samples/javahelp/org/netbeans/modules/ant/freeform/samples/docs/format-general-folders.html
ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java
ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformFileEncodingQuery.java
java/freeform/src/org/netbeans/modules/java/freeform/JavaProjectGenerator.java
java/freeform/src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.*
java/freeform/src/org/netbeans/modules/java/freeform/JavaActions.java

Probably there should be one combo box for all sources in the project, applying
to everything in the project directory as well as any external source roots,
though project.xml would as usual be more flexible.

Be sure to have some choice in the customizer for "unspecified" encoding, which
would be the default (no <encoding>), for compatibility with pre-6.0 projects
(which would need to use the /1 schema).

web/freeform would probably not need anything additional, though you should
confirm that external source roots of non-Java type (docroot?) pick up
<encoding> correctly.
Comment 3 Milan Kubec 2007-04-12 14:21:08 UTC
Fixed.

Checking in
ant/freeform/samples/javahelp/org/netbeans/modules/ant/freeform/samples/docs/format-general-folders.html;
/cvs/ant/freeform/samples/javahelp/org/netbeans/modules/ant/freeform/samples/docs/format-general-folders.html,v
 <--  format-general-folders.html
new revision: 1.4; previous revision: 1.3
done
RCS file:
/cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformFileEncodingQueryImpl.java,v
done
Checking in
ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformFileEncodingQueryImpl.java;
/cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformFileEncodingQueryImpl.java,v
 <--  FreeformFileEncodingQueryImpl.java
initial revision: 1.1
done
Checking in ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java;
/cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java,v 
<--  FreeformProject.java
new revision: 1.49; previous revision: 1.48
done
Checking in
ant/freeform/src/org/netbeans/modules/ant/freeform/resources/freeform-project-general-2.xsd;
/cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/resources/freeform-project-general-2.xsd,v
 <--  freeform-project-general-2.xsd
new revision: 1.3; previous revision: 1.2
done
Checking in
java/freeform/src/org/netbeans/modules/java/freeform/JavaProjectGenerator.java;
/cvs/java/freeform/src/org/netbeans/modules/java/freeform/JavaProjectGenerator.java,v
 <--  JavaProjectGenerator.java
new revision: 1.12; previous revision: 1.11
done
Checking in
java/freeform/src/org/netbeans/modules/java/freeform/ui/Bundle.properties;
/cvs/java/freeform/src/org/netbeans/modules/java/freeform/ui/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.21; previous revision: 1.20
done
Checking in
java/freeform/src/org/netbeans/modules/java/freeform/ui/ProjectModel.java;
/cvs/java/freeform/src/org/netbeans/modules/java/freeform/ui/ProjectModel.java,v
 <--  ProjectModel.java
new revision: 1.14; previous revision: 1.13
done
Checking in
java/freeform/src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.form;
/cvs/java/freeform/src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.form,v
 <--  SourceFoldersPanel.form
new revision: 1.13; previous revision: 1.12
done
Checking in
java/freeform/src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.java;
/cvs/java/freeform/src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.java,v
 <--  SourceFoldersPanel.java
new revision: 1.24; previous revision: 1.23
done
RCS file:
/cvs/java/freeform/test/unit/src/org/netbeans/modules/java/freeform/FileEncodingQueryTest.java,v
done
Checking in
java/freeform/test/unit/src/org/netbeans/modules/java/freeform/FileEncodingQueryTest.java;
/cvs/java/freeform/test/unit/src/org/netbeans/modules/java/freeform/FileEncodingQueryTest.java,v
 <--  FileEncodingQueryTest.java
initial revision: 1.1
done
Checking in www/www/ns/freeform-project/2.xsd;
/cvs/www/www/ns/freeform-project/2.xsd,v  <--  2.xsd
new revision: 1.2; previous revision: 1.1
done
Comment 4 Ken Frank 2007-07-07 18:55:37 UTC
verified that new freeform j2se project uses the global encoding value

also, when changing the encoding value of a freeform project, that encoding
value is used for new freeform project or regular j2se project.