RCP MultiPageEditorPart Wizard

Subclasses of the RCP MultiPageEditorPart class can be created using the RCP MultiPageEditorPart wizard. The wizard can be selected from the drop down wizard menu or from the Eclipse New wizard.

To use the wizard, select the project source folder and package to contain the class. Then enter the class name, use the Add button to add individual EditorParts that have already been created, and hit the Finish button.


 


The wizard generates the following code.

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.MultiPageEditorPart;

public class RcpMultiPageEditorTtest extends MultiPageEditorPart {
   
public static final String ID = "sample.rcp.RcpMultiPageEditorTtest"; //$NON-NLS-1$

   
public RcpMultiPageEditorTtest() {
    }

   
protected void createPages() {
       
try {
            addPage(
new FirstEditorPage(), (org.eclipse.ui.IEditorInput) null);
            addPage(
new SecondEditorPage(), (org.eclipse.ui.IEditorInput) null);
            addPage(
new ThirdEditorPage(), (org.eclipse.ui.IEditorInput) null);
        }
catch (PartInitException e) {
        }
    }

   
public boolean isSaveAsAllowed() {
       
return false;
    }

   
public void doSave(IProgressMonitor monitor) {
    }

   
public void doSaveAs() {
    }
}