creating text based editor plugins for eclipse wizard page - swt

I have developed an eclipse plugin project. I need a text editor that can save, copy, paste, search. This text editor must be inserted in the wizard pages which are developed using swt.
Any suggestions?

In a plug-in you can use the JFace org.eclipse.jface.text.TextViewer.
You will to provide save and search. TextViewer does support the interface required by the Eclipse org.eclipse.ui.texteditor.FindReplaceDialog.
If you really only want SWT code then use org.eclipse.swt.custom.StyledText

Related

How to build a pure e4 RCP Text Editor

I am using the latest Eclipse 4.7 Eclipse. I am trying to build a language sensitive editor for a pure e4 RCP application. I have modeled my editor after the example XML Text Editor template project (generated from File->New->Plug-in project). I have modified it and extended it to support my custom language (loosely based on specialized XML tags/elements/attributes).
I can run this plugin on its own from the default product “org.eclipse.platform.ide” and it works just fine. But I am trying to include this plug-in into my own pure e4 RCP application and I am having a challenge in figuring out how to present my custom editor.
I try to follow the tutorial from Vogella found here: http://www.vogella.com/tutorials/EclipseEditors/article.html#add-simple-content-assist
I even purchased the Vogella book.
But that example looks nothing like the standard XML Text Editor example. From the tutorial, it mentions that to launch the editor programmatically, it implies that you need to create your own implementation of IEditorInput – but how does this relate to how the example XML Text Editor provides input for the editor through extending the FileDocuementProvider?
Perhaps the XML Text Editor example is the old 3.X way of doing things and I need to refactor my editor. I can do this – but then are there pure e4 RCP Text Editor examples similar in functionality to the XML Text Editor example? I really do need the syntax highlighting, validation, support markers, etc. found in the XML Editor example. Where can I go to learn how to do this?

Reuse standard menus in Eclipse RCP4 application

I want to reuse standard menus from the Eclipse IDE in my RCP4 application (e.g. Windows->Preferences).
In Eclipse RCP3 applications you simply have to add a menuContribution to the plugin.xml to achieve this.
I tried the same for my RCP4 application but without success. Is there another way to add standard menus to a RCP4 application?
For a pure e4 application which is not using the 3.x compatibility layer you have to construct all the menus and dialogs yourself.
For preferences you can use the JFace org.eclipse.jface.preference.PreferenceDialog which is a simpler version of the normal preferences dialog, but you don't get the preference page extension point (or any existing pages) so you have to craft all that yourself.

eclipse rcp :how to translate third-part plugin?

I am working on a eclipse rcp application.it use some third-part plugins, how can I translate text in these plugins?
In general internationalization is easy in eclipse. You can look for *.properties files which contains the strings which are used in the plugin. You can then define an own property file with your translation.
If no property files exist the plugin is not foreseen to be translated. In this case code changes are necessary.
See this howto for an example

Eclipse form based XML editor

Can anyone suggest me some reading for creating Form based editor in Eclipse?
The right Google term would probably be "Eclipse Forms", and there are a few articles available:
Eclipse Forms API - Tutorial
Revitalize your applications with Eclipse Forms
Eclipse Forms: Rich UI for the Rich Client
Also, in general a good place to start searching for Eclipse material is http://www.eclipse.org/articles/

How can I show the windows file explorer in the RCP application?

I would like to create a Eclipse RCP application, in which I need to show the Windows file Explorer in the View. Can anyone help in this?
Do you really need to show the explorer? wouldn't it be sufficient to display the contents of the file system in a standard SWT widget?
There's a tutorial on using JFace and SWT to create a file explorer you might find useful.