1 11 package org.eclipse.pde.internal.ui.editor.target; 12 13 import org.eclipse.pde.internal.ui.IHelpContextIds; 14 import org.eclipse.pde.internal.ui.PDEPlugin; 15 import org.eclipse.pde.internal.ui.PDEPluginImages; 16 import org.eclipse.pde.internal.ui.PDEUIMessages; 17 import org.eclipse.pde.internal.ui.editor.FormLayoutFactory; 18 import org.eclipse.swt.widgets.Composite; 19 import org.eclipse.ui.PlatformUI; 20 import org.eclipse.ui.forms.IManagedForm; 21 import org.eclipse.ui.forms.editor.FormEditor; 22 import org.eclipse.ui.forms.widgets.FormToolkit; 23 import org.eclipse.ui.forms.widgets.ScrolledForm; 24 25 public class ContentPage extends AbstractTargetPage { 26 27 public static final String PAGE_ID = "content"; 29 public ContentPage(FormEditor editor) { 30 super(editor, PAGE_ID, PDEUIMessages.TargetContentPage_title); 31 } 32 33 36 protected void createFormContent(IManagedForm managedForm) { 37 super.createFormContent(managedForm); 38 ScrolledForm form = managedForm.getForm(); 39 FormToolkit toolkit = managedForm.getToolkit(); 40 form.setText(PDEUIMessages.TargetContentPage_title); 41 form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_FEATURE_OBJ)); 42 fillBody(managedForm, toolkit); 43 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_OVERVIEW_PAGE); 44 45 } 46 47 private void fillBody(IManagedForm managedForm, FormToolkit toolkit) { 48 Composite body = managedForm.getForm().getBody(); 49 body.setLayout(FormLayoutFactory.createFormGridLayout(false, 1)); 50 51 managedForm.addPart(new ContentSection(this, body)); 52 } 53 54 protected String getHelpResource() { 55 return "/org.eclipse.pde.doc.user/guide/tools/editors/target_definition_editor/content.htm"; } 57 58 } 59 | Popular Tags |