1 11 package org.eclipse.pde.ui.launcher; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.core.ILaunchConfiguration; 15 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; 16 import org.eclipse.jface.dialogs.Dialog; 17 import org.eclipse.pde.internal.ui.IHelpContextIds; 18 import org.eclipse.pde.internal.ui.PDEPlugin; 19 import org.eclipse.pde.internal.ui.PDEPluginImages; 20 import org.eclipse.pde.internal.ui.PDEUIMessages; 21 import org.eclipse.pde.internal.ui.launcher.OSGiBundleBlock; 22 import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkBlock; 23 import org.eclipse.swt.SWT; 24 import org.eclipse.swt.graphics.Image; 25 import org.eclipse.swt.layout.GridLayout; 26 import org.eclipse.swt.widgets.Composite; 27 import org.eclipse.ui.PlatformUI; 28 29 37 public class BundlesTab extends AbstractLauncherTab { 38 39 private Image fImage; 40 private OSGiBundleBlock fPluginBlock; 41 OSGiFrameworkBlock fFrameworkBlock; 42 43 public BundlesTab() { 44 fImage = PDEPluginImages.DESC_PLUGINS_FRAGMENTS.createImage(); 45 fPluginBlock = new OSGiBundleBlock(this); 46 fFrameworkBlock = new OSGiFrameworkBlock(this); 47 } 48 49 53 public void dispose() { 54 fPluginBlock.dispose(); 55 fImage.dispose(); 56 super.dispose(); 57 } 58 59 63 public void createControl(Composite parent) { 64 Composite composite = new Composite(parent, SWT.NONE); 65 composite.setLayout(new GridLayout(2, false)); 66 67 fFrameworkBlock.createControl(composite); 68 fPluginBlock.createControl(composite, 2, 5); 69 70 setControl(composite); 71 Dialog.applyDialogFont(composite); 72 PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.LAUNCHER_ADVANCED); 73 } 74 75 80 public void initializeFrom(ILaunchConfiguration config) { 81 try { 82 fFrameworkBlock.initializeFrom(config); 83 fPluginBlock.initializeFrom(config); 84 } catch (CoreException e) { 85 PDEPlugin.log(e); 86 } 87 } 88 89 93 public void setDefaults(ILaunchConfigurationWorkingCopy config) { 94 fPluginBlock.setDefaults(config); 95 } 96 97 101 public void performApply(ILaunchConfigurationWorkingCopy config) { 102 fFrameworkBlock.performApply(config); 103 fPluginBlock.performApply(config); 104 } 105 106 110 public String getName() { 111 return PDEUIMessages.BundlesTab_title; 112 } 113 114 118 public Image getImage() { 119 return fImage; 120 } 121 122 126 public void activated(ILaunchConfigurationWorkingCopy config) { 127 } 128 129 133 public void validateTab() { 134 } 135 136 } 137 | Popular Tags |