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.PDEUIMessages; 15 import org.eclipse.pde.internal.ui.editor.PDEFormPage; 16 import org.eclipse.swt.layout.GridLayout; 17 import org.eclipse.swt.widgets.Composite; 18 import org.eclipse.ui.PlatformUI; 19 import org.eclipse.ui.forms.IManagedForm; 20 import org.eclipse.ui.forms.editor.FormEditor; 21 import org.eclipse.ui.forms.widgets.FormToolkit; 22 import org.eclipse.ui.forms.widgets.ScrolledForm; 23 24 25 public class LauncherPage extends PDEFormPage { 26 27 public static final String PAGE_ID = "launcher"; 29 public LauncherPage(FormEditor editor) { 30 super(editor, PAGE_ID, PDEUIMessages.LauncherPage_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.LauncherPage_title); 41 fillBody(managedForm, toolkit); 42 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.BRANDING_PAGE); 43 } 44 45 private void fillBody(IManagedForm managedForm, FormToolkit toolkit) { 46 Composite body = managedForm.getForm().getBody(); 47 GridLayout layout = new GridLayout(); 48 layout.numColumns = 2; 49 layout.marginWidth = 10; 50 layout.verticalSpacing = 15; 51 layout.horizontalSpacing = 10; 52 body.setLayout(layout); 53 54 managedForm.addPart(new LauncherSection(this, body)); 56 managedForm.addPart(new ArgumentsSection(this, body)); 57 } 58 59 60 } 61 | Popular Tags |