Is there any way how to add the simplest (text, xml) editor to my e4 rcp application? I would like to just reuse basic eclipse editor, without any further changes if it is possible. All I found are tutorials probably using e3 rcp, which is not recommended for a new development. I built basic app by this tutorial, but there is nothing about editors: http://www.vogella.com/tutorials/EclipseRCP/article.html#exercise-creating-an-eclipse-rcp-application. I have found this answer stating that it is not possible (How to build a pure e4 RCP Text Editor), but I hope there is some progress in rcp4 in this area.
Asked
Active
Viewed 570 times
2
-
1You can't use the 3.x editor, this hasn't changed. You can use the JFace code such as `TextViewer`, `SourceViewer` and `Document` but not the org.eclipse.ui code or things like IFile. **Note** It is **not** the case that e3 is not recommended for new development - for many things it is still the correct solution. e4 is for RCPs which don't need the full weight of 3.x code. – greg-449 May 22 '18 at 11:45
-
It also depends what you mean by a 'basic editor'. A Part which just uses `TextViewer` is only a few lines but is **extremely** basic – greg-449 May 22 '18 at 13:35
-
@greg-449 i would like to have something like xml editor in eclipse ide (view, edit xmls, highlight syntax and if possible even validation). What part/JFace class is best match? – tomm May 22 '18 at 13:38
-
1Editors with syntax coloring, content assist and all those other things are immensely complex. You start with `SourceViewer` but have to use/write many additional classes. Most tutorials use 3,x code and well as JFace so cant be used directly. – greg-449 May 22 '18 at 13:42
-
@greg-449 First of all, I appreciate your help. Thank you. Hopefully, last question. If I want to build rcp app, on left side with view part showing folders, files and on the right side editor part to edit, view this xml files, what would be your recommendation to use? Rcp 4 with rcp3 parts, pure rcp3, or rcp4 with jface? If I want my view and editor to work and look similar like the ones in eclipse IDE, should i rather make eclipse plugin and just use directly eclipse IDE project/file explorer and eclipse IDE editors? – tomm May 23 '18 at 06:06
-
1Tradtional e3 perhaps using things like `e4view` to access some of the e4 stuff. I do have an e4 RCP like you describe but it was a lot of extra work and I only did it to learn about e4. – greg-449 May 23 '18 at 06:52