Package com._1c.g5.v8.dt.compare.ui
Class StringBasedTypedElement
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.ui.AbstractCompareTypedElement
-
- com._1c.g5.v8.dt.compare.ui.StringBasedTypedElement
-
- All Implemented Interfaces:
org.eclipse.compare.IEditableContent
,org.eclipse.compare.IEncodedStreamContentAccessor
,org.eclipse.compare.IStreamContentAccessor
,org.eclipse.compare.ITypedElement
public class StringBasedTypedElement extends AbstractCompareTypedElement implements org.eclipse.compare.IEditableContent
TheAbstractCompareTypedElement
extension storing content asString
.
-
-
Constructor Summary
Constructors Constructor Description StringBasedTypedElement(String name, String content, boolean isEditable)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
convertToByteContent(String content)
Converts the string content to byte representation.InputStream
getContents()
boolean
isEditable()
org.eclipse.compare.ITypedElement
replace(org.eclipse.compare.ITypedElement dest, org.eclipse.compare.ITypedElement src)
void
setContent(byte[] newContent)
-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.AbstractCompareTypedElement
getCharset, getImage, getName, getType, setCharset, setImage, setType
-
-
-
-
Method Detail
-
getContents
public InputStream getContents() throws org.eclipse.core.runtime.CoreException
- Specified by:
getContents
in interfaceorg.eclipse.compare.IStreamContentAccessor
- Throws:
org.eclipse.core.runtime.CoreException
-
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interfaceorg.eclipse.compare.IEditableContent
-
setContent
public void setContent(byte[] newContent)
- Specified by:
setContent
in interfaceorg.eclipse.compare.IEditableContent
-
replace
public org.eclipse.compare.ITypedElement replace(org.eclipse.compare.ITypedElement dest, org.eclipse.compare.ITypedElement src)
- Specified by:
replace
in interfaceorg.eclipse.compare.IEditableContent
-
convertToByteContent
public byte[] convertToByteContent(String content)
Converts the string content to byte representation.- Parameters:
content
- the string content, may benull
-
-