public class EclipseProjectPropertiesEncodingProvider extends IEncodingProvider.Runtime
org.eclipse.core.internal.preferences.EclipsePreferences
.IEncodingProvider.Runtime
Constructor and Description |
---|
EclipseProjectPropertiesEncodingProvider() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEncoding(org.eclipse.emf.common.util.URI uri)
Returns the encoding that should be used to read a resource
from the given uri.
|
protected java.lang.String |
getFromProperties(org.eclipse.emf.common.util.URI uri) |
protected java.lang.String |
getValue(java.util.Properties properties,
org.eclipse.emf.common.util.URI resourceUri,
java.lang.String prefix) |
protected java.util.Properties |
loadProperties(org.eclipse.emf.common.util.URI projectURI) |
getDefaultEncoding, setDefaultEncoding
public EclipseProjectPropertiesEncodingProvider()
public java.lang.String getEncoding(org.eclipse.emf.common.util.URI uri)
IEncodingProvider
null
, the default encoding for the language
is returned.
At runtime, the default encoding was either configured externally or
it is obtained from the class Charset
.
In the UI environment, the encoding should usually be read from the workspace
metadata.getEncoding
in interface IEncodingProvider
getEncoding
in class IEncodingProvider.Runtime
uri
- the uri of the specific resource or null
to obtain the default encoding.protected java.lang.String getFromProperties(org.eclipse.emf.common.util.URI uri) throws java.io.IOException
java.io.IOException
protected java.util.Properties loadProperties(org.eclipse.emf.common.util.URI projectURI) throws java.io.IOException
java.io.IOException
protected java.lang.String getValue(java.util.Properties properties, org.eclipse.emf.common.util.URI resourceUri, java.lang.String prefix)