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.pde.internal.ui.editor.text.ColorManager; 22 import org.eclipse.pde.internal.ui.editor.text.IColorManager; 23 import org.eclipse.ui.PlatformUI; 24 import org.eclipse.ui.forms.IManagedForm; 25 import org.eclipse.ui.forms.widgets.ScrolledForm; 26 27 31 public class InfoFormPage extends PDEFormPage { 32 public static final String PAGE_ID = "info"; private IColorManager colorManager = ColorManager.getDefault(); 34 private InfoSection infoSection; 35 40 public InfoFormPage(PDEFormEditor editor, String title) { 41 super(editor, PAGE_ID, title); 42 } 43 44 47 protected String getHelpResource() { 48 return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/information.htm"; } 50 51 protected void createFormContent(IManagedForm managedForm) { 52 super.createFormContent(managedForm); 53 ScrolledForm form = managedForm.getForm(); 54 form.getBody().setLayout(FormLayoutFactory.createFormGridLayout(false, 1)); 55 56 form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_DOC_SECTION_OBJ)); 58 59 infoSection = new InfoSection(this, form.getBody(), colorManager); 60 managedForm.addPart(infoSection); 61 62 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.MANIFEST_FEATURE_INFO); 63 initialize(); 64 } 65 public void dispose() { 66 colorManager.dispose(); 67 super.dispose(); 68 } 69 public void initialize() { 70 getManagedForm().getForm().setText(PDEUIMessages.FeatureEditor_InfoPage_heading); 71 } 72 } 73 | Popular Tags |