Java Code Examples for org.netbeans.api.queries.FileEncodingQuery#setDefaultEncoding()
The following examples show how to use
org.netbeans.api.queries.FileEncodingQuery#setDefaultEncoding() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SourceFoldersPanel.java From netbeans with Apache License 2.0 | 5 votes |
private void encodingComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_encodingComboBoxActionPerformed Object selItem = encodingComboBox.getModel().getSelectedItem(); if (selItem instanceof Charset) { model.setEncoding(((Charset) selItem).name()); // XXX Should we set this here? FileEncodingQuery.setDefaultEncoding((Charset) selItem); } else { model.setEncoding(selItem.toString()); } }
Example 2
Source File: PhpProjectGenerator.java From netbeans with Apache License 2.0 | 4 votes |
private static void configureEncoding(ProjectProperties projectProperties, EditableProperties sharedProperties, EditableProperties privateProperties) { Charset charset = projectProperties.getCharset(); sharedProperties.setProperty(PhpProjectProperties.SOURCE_ENCODING, charset.name()); // #136917 FileEncodingQuery.setDefaultEncoding(charset); }