1 11 package org.eclipse.pde.internal.ui.editor.feature; 12 13 import org.eclipse.pde.internal.ui.IHelpContextIds; 14 import org.eclipse.pde.internal.ui.IPDEUIConstants; 15 import org.eclipse.pde.internal.ui.PDEPlugin; 16 import org.eclipse.pde.internal.ui.PDEPluginImages; 17 import org.eclipse.pde.internal.ui.PDEUIMessages; 18 import org.eclipse.pde.internal.ui.editor.FormLayoutFactory; 19 import org.eclipse.pde.internal.ui.editor.PDEFormEditor; 20 import org.eclipse.pde.internal.ui.editor.PDEFormPage; 21 import org.eclipse.swt.layout.GridData; 22 import org.eclipse.swt.widgets.Composite; 23 import org.eclipse.ui.PlatformUI; 24 import org.eclipse.ui.forms.IManagedForm; 25 import org.eclipse.ui.forms.widgets.FormToolkit; 26 import org.eclipse.ui.forms.widgets.ScrolledForm; 27 28 public class FeatureAdvancedPage extends PDEFormPage { 29 public static final String PAGE_ID = "advanced"; 31 private InstallSection fInstallSection; 32 33 private HandlerSection fHandlerSection; 34 35 private DataSection fDataSection; 36 37 private DataDetailsSection fDataDetailsSection; 38 39 private DataPortabilitySection fDataPortabilitySection; 40 41 public FeatureAdvancedPage(PDEFormEditor editor, String title) { 42 super(editor, PAGE_ID, title); 43 } 44 45 48 protected String getHelpResource() { 49 return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/installation.htm"; } 51 52 protected void createFormContent(IManagedForm managedForm) { 53 super.createFormContent(managedForm); 54 ScrolledForm form = managedForm.getForm(); 55 FormToolkit toolkit = managedForm.getToolkit(); 56 57 form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_OPERATING_SYSTEM_OBJ)); 59 60 Composite body = form.getBody(); 61 body.setLayout(FormLayoutFactory.createFormGridLayout(true, 2)); 62 63 Composite left = toolkit.createComposite(body); 64 left.setLayout(FormLayoutFactory.createFormPaneGridLayout(false, 1)); 65 left.setLayoutData(new GridData(GridData.FILL_BOTH)); 66 67 fInstallSection = new InstallSection(this, left); 68 fDataSection = new DataSection(this, left); 69 fDataPortabilitySection = new DataPortabilitySection(this, left); 70 71 Composite right = toolkit.createComposite(body); 72 right.setLayout(FormLayoutFactory.createFormPaneGridLayout(false, 1)); 73 right.setLayoutData(new GridData(GridData.FILL_BOTH)); 74 75 fHandlerSection = new HandlerSection(this, right); 76 fDataDetailsSection = new DataDetailsSection(this, right); 77 78 managedForm.addPart(fInstallSection); 79 managedForm.addPart(fHandlerSection); 80 managedForm.addPart(fDataSection); 81 managedForm.addPart(fDataDetailsSection); 82 managedForm.addPart(fDataPortabilitySection); 83 84 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(),IHelpContextIds.MANIFEST_FEATURE_INSTALLATION); 85 86 form.setText(PDEUIMessages.FeatureEditor_AdvancedPage_heading); 87 fDataSection.fireSelection(); 88 } 89 } 90 | Popular Tags |