public class CoreEncodingProjectManager extends EncodingProjectManager
PROP_NATIVE2ASCII_SWITCH, PROP_PROPERTIES_FILES_ENCODING
Constructor and Description |
---|
CoreEncodingProjectManager() |
Modifier and Type | Method and Description |
---|---|
java.nio.charset.Charset |
getCachedCharsetFromContent(Document document) |
java.nio.charset.Charset |
getDefaultCharset() |
java.nio.charset.Charset |
getDefaultCharsetForPropertiesFiles(VirtualFile virtualFile) |
java.lang.String |
getDefaultCharsetName() |
java.nio.charset.Charset |
getEncoding(VirtualFile virtualFile,
boolean useParentDefaults) |
java.util.Collection<java.nio.charset.Charset> |
getFavorites() |
boolean |
isNative2Ascii(VirtualFile virtualFile) |
boolean |
isNative2AsciiForPropertiesFiles() |
void |
setDefaultCharsetForPropertiesFiles(VirtualFile virtualFile,
java.nio.charset.Charset charset) |
void |
setDefaultCharsetName(java.lang.String name)
Sets Project encoding (configured in Settings|File Encodings|Project Encoding).
|
void |
setEncoding(VirtualFile virtualFileOrDir,
java.nio.charset.Charset charset) |
void |
setNative2AsciiForPropertiesFiles(VirtualFile virtualFile,
boolean native2Ascii) |
getInstance
getInstance, shouldAddBOMForNewUtf8File
doActionAndRestoreEncoding
public boolean isNative2Ascii(VirtualFile virtualFile)
isNative2Ascii
in class EncodingRegistry
public java.nio.charset.Charset getDefaultCharset()
getDefaultCharset
in class EncodingProjectManager
public java.nio.charset.Charset getEncoding(VirtualFile virtualFile, boolean useParentDefaults)
getEncoding
in class EncodingRegistry
virtualFile
- file to get encoding foruseParentDefaults
- true to determine encoding from the parentpublic void setEncoding(VirtualFile virtualFileOrDir, java.nio.charset.Charset charset)
setEncoding
in class EncodingRegistry
public boolean isNative2AsciiForPropertiesFiles()
isNative2AsciiForPropertiesFiles
in class EncodingManager
public java.util.Collection<java.nio.charset.Charset> getFavorites()
getFavorites
in class EncodingManager
public void setNative2AsciiForPropertiesFiles(VirtualFile virtualFile, boolean native2Ascii)
setNative2AsciiForPropertiesFiles
in class EncodingManager
public java.lang.String getDefaultCharsetName()
getDefaultCharsetName
in class EncodingProjectManager
public java.nio.charset.Charset getDefaultCharsetForPropertiesFiles(VirtualFile virtualFile)
getDefaultCharsetForPropertiesFiles
in class EncodingManager
public void setDefaultCharsetForPropertiesFiles(VirtualFile virtualFile, java.nio.charset.Charset charset)
setDefaultCharsetForPropertiesFiles
in class EncodingManager
public java.nio.charset.Charset getCachedCharsetFromContent(Document document)
getCachedCharsetFromContent
in class EncodingManager
public void setDefaultCharsetName(java.lang.String name)
EncodingProjectManager
setDefaultCharsetName
in class EncodingProjectManager