Skip to content
Advertisement

Eclipse plug-in: Custom plugin.xml like editor

I’ve been trying to mimic the plugin.xml editor in my own Eclipse plug-in. I want a graphical editor for a custom file type. The same way in which PDE has a specific form/editor to open plugin.xml.

From what I understand I can implement a text Editor and link a file type to open in a particular editor. To add a graphical aspect I can make a Form.

What I don’t understand is how to link this Form to my custom file type.

Advertisement

Answer

You can use FormEditor for this (org.eclipse.ui.forms.editor.FormEditor). This extends the more basic MultiPageEditorPart.

FormEditor supports multiple pages, these can be form based using the FormPage class, or based on an ordinary text editor, or even just an arbitary set of SWT controls. So this allows you to have a arrangement like the plugin.xml editor (which is a FormEditor).

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement