public class DefaultEncodingSupport extends java.lang.Object implements IEncodingSupport
IEncodingSupport.| Constructor and Description |
|---|
DefaultEncodingSupport()
Creates a new encoding support.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createStatusEncodingChangeControl(Composite parent,
IStatus status)
Creates the control which allows to change the encoding.
|
void |
dispose()
Disposes this encoding support.
|
java.lang.String |
getDefaultEncoding()
Returns the default character encoding.
|
java.lang.String |
getEncoding()
Returns the character encoding.
|
java.lang.String |
getStatusBanner(IStatus status)
Returns a banner for the given status.
|
java.lang.String |
getStatusHeader(IStatus status)
Returns a status header for the given status.
|
java.lang.String |
getStatusMessage(IStatus status)
Returns a status message if any.
|
void |
initialize(StatusTextEditor textEditor)
Associates this encoding support to the given text editor and initializes this encoding.
|
boolean |
isEncodingError(IStatus status)
Returns
true if the given status is an
encoding error. |
void |
reset()
Resets this encoding support.
|
void |
setEncoding(java.lang.String encoding)
Sets the character encoding.
|
protected void |
setEncoding(java.lang.String encoding,
boolean overwrite)
Sets the encoding of the editor's input to the given value.
|
public DefaultEncodingSupport()
public void initialize(StatusTextEditor textEditor)
textEditor - the editorpublic void dispose()
public void reset()
protected void setEncoding(java.lang.String encoding,
boolean overwrite)
overwrite is
true the value is set even if the encoding is already set.encoding - the new encodingoverwrite - true if current encoding should be overwrittenpublic void setEncoding(java.lang.String encoding)
IEncodingSupportsetEncoding in interface IEncodingSupportencoding - the character encodingpublic java.lang.String getEncoding()
IEncodingSupportgetEncoding in interface IEncodingSupportpublic java.lang.String getDefaultEncoding()
IEncodingSupportgetDefaultEncoding in interface IEncodingSupportpublic java.lang.String getStatusHeader(IStatus status)
status - the statuspublic java.lang.String getStatusBanner(IStatus status)
status - the statuspublic java.lang.String getStatusMessage(IStatus status)
status - the statusnull otherwisepublic boolean isEncodingError(IStatus status)
true if the given status is an
encoding error.status - the status to checktrue if the given status is an encoding errorpublic void createStatusEncodingChangeControl(Composite parent, IStatus status)
parent - the parent controlstatus - the status
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.