1 11 package org.eclipse.pde.ui.launcher; 12 13 import org.eclipse.debug.core.ILaunchConfiguration; 14 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; 15 import org.eclipse.jface.dialogs.Dialog; 16 import org.eclipse.pde.internal.ui.IHelpContextIds; 17 import org.eclipse.pde.internal.ui.PDEPlugin; 18 import org.eclipse.pde.internal.ui.PDEPluginImages; 19 import org.eclipse.pde.internal.ui.PDEUIMessages; 20 import org.eclipse.pde.internal.ui.launcher.TracingBlock; 21 import org.eclipse.swt.SWT; 22 import org.eclipse.swt.graphics.Image; 23 import org.eclipse.swt.layout.GridLayout; 24 import org.eclipse.swt.widgets.Composite; 25 import org.eclipse.ui.PlatformUI; 26 27 35 public class TracingTab extends AbstractLauncherTab { 36 37 private Image fImage; 38 private TracingBlock fTracingBlock; 39 40 44 public TracingTab() { 45 fTracingBlock = new TracingBlock(this); 46 PDEPlugin.getDefault().getLabelProvider().connect(this); 47 fImage = PDEPluginImages.DESC_DOC_SECTION_OBJ.createImage(); 48 } 49 50 54 public void createControl(Composite parent) { 55 Composite container = new Composite(parent, SWT.NULL); 56 container.setLayout(new GridLayout()); 57 fTracingBlock.createControl(container); 58 setControl(container); 59 Dialog.applyDialogFont(container); 60 PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.LAUNCHER_TRACING); 61 } 62 63 67 public void activated(ILaunchConfigurationWorkingCopy workingCopy) { 68 fTracingBlock.activated(workingCopy); 69 } 70 71 75 public void dispose() { 76 fTracingBlock.dispose(); 77 if (fImage != null) 78 fImage.dispose(); 79 PDEPlugin.getDefault().getLabelProvider().disconnect(this); 80 super.dispose(); 81 } 82 83 87 public void initializeFrom(ILaunchConfiguration config) { 88 fTracingBlock.initializeFrom(config); 89 } 90 91 95 public void performApply(ILaunchConfigurationWorkingCopy config) { 96 fTracingBlock.performApply(config); 97 } 98 99 103 public void setDefaults(ILaunchConfigurationWorkingCopy config) { 104 fTracingBlock.setDefaults(config); 105 } 106 107 111 public String getName() { 112 return PDEUIMessages.TracingLauncherTab_name; 113 } 114 115 119 public Image getImage() { 120 return fImage; 121 } 122 123 127 public void validateTab() { 128 } 129 } 130 | Popular Tags |