Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Multipage XML editor
Multipage XML editor [message #456739] Wed, 08 June 2005 09:24 Go to next message
Eclipse UserFriend
Originally posted by: Langerjo.de.ibm.com

Hi @ all!

Anyone knows a nice tutorial how to create a multi page editor, which
edits an xml File like the plugin.xml?

And which eclipse plugin defines the functionality for editing the
plugin.xml?

Thanks in advance

Johannes
Re: Multipage XML editor [message #456787 is a reply to message #456739] Wed, 08 June 2005 15:16 Go to previous message
kiran is currently offline kiranFriend
Messages: 15
Registered: July 2009
Junior Member
Check with the forms plugin for creating a multipage editor similar what
the plugin.xml provides.

Create a MultiPageEditor class which extends
org.eclipse.ui.forms.editor.FormEditor class. Within this class add the
method

protected void addPages() {
// org.eclipse.ui.forms.editor.FormPage or subclass instances
addPage( /* instance */ );
addPage( /* instance */ );
addPage( /* instance */ );
}

Within each FormPage class override the method

protected void createFormContent(IManagedForm managedForm) {
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
form.setText( getResourceString( Constants.CONFIG_TITLE ) );
form.setBackgroundImage( getImage(IMG_FORM_BANNER ) );
toolkit.createCompositeSeparator( form );

GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.marginWidth = 10;
form.getBody().setLayout(layout);
}

Hope this helps.
Previous Topic:Remove Taskbar presence completely on parent shell
Next Topic:Problems with TreeViewer and java.io.File.listRoots()
Goto Forum:
  


Current Time: Thu Apr 25 23:43:51 GMT 2024

Powered by FUDForum. Page generated in 0.03263 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top