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 31 public class FeatureIncludesPage extends PDEFormPage { 32 public static final String PAGE_ID = "includes"; 34 private IncludedFeaturesSection fIncludedSection; 35 36 private IncludedFeaturesDetailsSection fIncludedDetailsSection; 37 38 private IncludedFeaturesPortabilitySection fIncludedPortabilitySection; 39 40 45 public FeatureIncludesPage(PDEFormEditor editor, String title) { 46 super(editor, PAGE_ID, title); 47 } 48 49 52 protected String getHelpResource() { 53 return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/included_features.htm"; } 55 56 protected void createFormContent(IManagedForm managedForm) { 57 ScrolledForm form = managedForm.getForm(); 58 FormToolkit toolkit = managedForm.getToolkit(); 59 form.getBody().setLayout(FormLayoutFactory.createFormGridLayout(true, 2)); 60 61 form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_FEATURE_OBJ)); 63 64 GridData gd; 65 66 Composite left = toolkit.createComposite(form.getBody()); 67 left.setLayout(FormLayoutFactory.createFormPaneGridLayout(false, 1)); 68 gd = new GridData(GridData.FILL_BOTH); 69 left.setLayoutData(gd); 70 71 Composite right = toolkit.createComposite(form.getBody()); 72 right.setLayout(FormLayoutFactory.createFormPaneGridLayout(false, 1)); 73 gd = new GridData(GridData.FILL_BOTH); 74 right.setLayoutData(gd); 75 76 fIncludedSection = new IncludedFeaturesSection(this, left); 77 fIncludedDetailsSection = new IncludedFeaturesDetailsSection(this, 78 right); 79 80 alignSectionHeaders(fIncludedSection.getSection(), 83 fIncludedDetailsSection.getSection()); 84 85 fIncludedPortabilitySection = new IncludedFeaturesPortabilitySection( 86 this, right); 87 88 managedForm.addPart(fIncludedSection); 89 managedForm.addPart(fIncludedDetailsSection); 90 managedForm.addPart(fIncludedPortabilitySection); 91 form.setText(PDEUIMessages.FeatureEditor_IncludesPage_heading); 92 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.MANIFEST_FEATURE_ADVANCED); 93 fIncludedSection.fireSelection(); 96 super.createFormContent(managedForm); 97 } 98 } 99 | Popular Tags |