Hi E4 guys,
I have noticed that you provide an OrionEditor based on 3x EditorPart + OrionEditorControl :
http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/tree/bundles/org.eclipse.e4.tools.orion.text.editor/src/org/eclipse/e4/tools/orion/text/editor/OrionEditor.java
At first why OrionEditor is not based on E4 part?
works in several context :
* RCP
* RAP
* IDE
In your case, your OrionEditor is linked to IFile and so you can just use it on IDE context and not for RCP and RAP context.
In this code, we will see that I use file.getCharset() to load the content of IFile. As you are linked to commons io, I suggest you to do the same thing than me :
-------------------------------------------------------------------------------
InputStream in = file.getContents();
try {
return IOUtils.toString(in, file.getCharset());
} finally {
if (in != null) {
in.close();
}
}
-------------------------------------------------------------------------------
I don't know if Orion has the same problem than CodeMirror, but with CodeMorrir when you want to retrieve the text value of the editor, you must pass the lineSeparator char (otherwise it uses a default value).
So I had to the getLineSeparator which comes from the Eclipse preferences to fix this problem.
Hope my feedback will be useful for you.
Regards Angelo