Additional Required Plug-ins (other than from the example):
Use the new PDE plug-in project wizard to create a project: File > New > Project > Plug in project
I named the project "org.eclipse.wst.sse.examples.multipage"
Select the multipage editor example.
specify "xml" extension
Use the defaults for everything else
add prerequisite plug-ins to the META-INF/MANIFEST.MF file:
Open MultiPageEditor.java (the following changes based on XMLMultiPageEditorPart)
Replace the TextEditor type for field "editor" with a StructuredTextEditor type.
Override the createSite() method. Add this to MultiPageEditor.java:
/** * @see org.eclipse.ui.part.MultiPageEditorPart#createSite(org.eclipse.ui.IEditorPart) */ protected IEditorSite createSite(IEditorPart page) { IEditorSite site = null; if (page == editor) { site = new MultiPageEditorSite(this, page) { public String getId() { // Sets this ID so nested editor is configured for XML source return ContentTypeIdForXML.ContentTypeID_XML + ".source"; //$NON-NLS-1$; } }; } else { site = super.createSite(page); } return site; }
Create a new XML file. Add content to the file. You should get highlighting, content assist, source validation, etc...
You now have a basic multi-page editor with a Structured Text Editor source page!