1 11 package org.eclipse.pde.internal.ui.editor.product; 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.PDEFormPage; 20 import org.eclipse.swt.widgets.Composite; 21 import org.eclipse.ui.PlatformUI; 22 import org.eclipse.ui.forms.IManagedForm; 23 import org.eclipse.ui.forms.editor.FormEditor; 24 import org.eclipse.ui.forms.widgets.FormToolkit; 25 import org.eclipse.ui.forms.widgets.ScrolledForm; 26 27 28 public class LaunchingPage extends PDEFormPage { 29 30 public static final String PAGE_ID = "launcher"; 32 public LaunchingPage(FormEditor editor) { 33 super(editor, PAGE_ID, PDEUIMessages.LauncherPage_title); 34 } 35 36 39 protected String getHelpResource() { 40 return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/launching.htm"; } 42 43 46 protected void createFormContent(IManagedForm managedForm) { 47 super.createFormContent(managedForm); 48 ScrolledForm form = managedForm.getForm(); 49 FormToolkit toolkit = managedForm.getToolkit(); 50 form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PRODUCT_LAUNCHING)); 51 form.setText(PDEUIMessages.LauncherPage_title); 52 fillBody(managedForm, toolkit); 53 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.BRANDING_PAGE); 54 } 55 56 private void fillBody(IManagedForm managedForm, FormToolkit toolkit) { 57 Composite body = managedForm.getForm().getBody(); 58 body.setLayout(FormLayoutFactory.createFormGridLayout(false, 2)); 59 60 managedForm.addPart(new JRESection(this, body)); 61 managedForm.addPart(new LauncherSection(this, body)); 62 managedForm.addPart(new ArgumentsSection(this, body)); 63 } 64 65 66 } 67 | Popular Tags |