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 EnvironmentPage extends AbstractTargetPage { 26 27 private EnvironmentSection fEnvSection; 28 29 public static final String PAGE_ID = "environment"; 31 public EnvironmentPage(FormEditor editor) { 32 super(editor, PAGE_ID, PDEUIMessages.EnvironmentPage_title); 33 } 34 35 protected void createFormContent(IManagedForm managedForm) { 36 super.createFormContent(managedForm); 37 ScrolledForm form = managedForm.getForm(); 38 form.setText(PDEUIMessages.EnvironmentPage_title); 39 form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_ENVIRONMENT)); 40 FormToolkit toolkit = managedForm.getToolkit(); 41 fillBody(managedForm, toolkit); 42 43 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.ENVIRONMENT_PAGE); 44 } 45 46 private void fillBody(IManagedForm managedForm, FormToolkit toolkit) { 47 Composite body = managedForm.getForm().getBody(); 48 body.setLayout(FormLayoutFactory.createFormGridLayout(false, 2)); 49 50 managedForm.addPart(fEnvSection = new EnvironmentSection(this, body)); 51 managedForm.addPart(new JRESection(this, body)); 52 managedForm.addPart(new ArgumentsSection(this, body)); 53 managedForm.addPart(new ImplicitDependenciesSection(this, body)); 54 } 55 56 protected void updateChoices() { 57 fEnvSection.updateChoices(); 58 } 59 60 protected String getHelpResource() { 61 return "/org.eclipse.pde.doc.user/guide/tools/editors/target_definition_editor/environment.htm"; } 63 64 } 65 | Popular Tags |