debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/OtherSettingsSection.java
equal
deleted
inserted
replaced
19 |
19 |
20 import org.eclipse.core.runtime.Status; |
20 import org.eclipse.core.runtime.Status; |
21 import org.eclipse.swt.widgets.Composite; |
21 import org.eclipse.swt.widgets.Composite; |
22 import org.eclipse.swt.widgets.Shell; |
22 import org.eclipse.swt.widgets.Shell; |
23 |
23 |
24 import com.nokia.cdt.internal.debug.launch.newwizard.LaunchWizardData.EBuildBeforeLaunchOption; |
24 import com.nokia.cdt.internal.debug.launch.newwizard.IOtherSettingsWizardData.EBuildBeforeLaunchOption; |
25 |
25 |
26 /** |
26 /** |
27 * Present the "Build before debug" section with a short description. |
27 * Present the "Build before debug" section with a short description. |
28 */ |
28 */ |
29 public class OtherSettingsSection extends AbstractLaunchWizardSection { |
29 public class OtherSettingsSection extends AbstractLaunchWizardSection { |
30 |
30 |
|
31 private IOtherSettingsWizardData otherSettingsWizardData; |
|
32 |
31 /** |
33 /** |
32 * |
34 * |
33 */ |
35 */ |
34 public OtherSettingsSection(LaunchWizardData data, AbstractUnifiedLaunchOptionsPage launchOptionsPage) { |
36 public OtherSettingsSection(IWizardData data, AbstractUnifiedLaunchOptionsPage launchOptionsPage) { |
35 super(data, Messages.getString("OtherSettingsSection.Title"), launchOptionsPage); //$NON-NLS-1$ |
37 super(data, Messages.getString("OtherSettingsSection.Title"), launchOptionsPage); //$NON-NLS-1$ |
36 |
38 otherSettingsWizardData = (IOtherSettingsWizardData) data; |
37 } |
39 } |
38 |
40 |
39 /* (non-Javadoc) |
41 /* (non-Javadoc) |
40 * @see com.nokia.cdt.internal.debug.launch.wizard2.IWizardSection#createComposite(org.eclipse.swt.widgets.Composite) |
42 * @see com.nokia.cdt.internal.debug.launch.wizard2.IWizardSection#createComposite(org.eclipse.swt.widgets.Composite) |
41 */ |
43 */ |
49 @Override |
51 @Override |
50 protected void dispose() { |
52 protected void dispose() { |
51 } |
53 } |
52 |
54 |
53 public void initializeSettings() { |
55 public void initializeSettings() { |
54 data.setBuildBeforeLaunchOption(EBuildBeforeLaunchOption.USE_WORKSPACE_SETTING); |
56 otherSettingsWizardData.setBuildBeforeLaunchOption(EBuildBeforeLaunchOption.USE_WORKSPACE_SETTING); |
55 } |
57 } |
56 |
58 |
57 /* (non-Javadoc) |
59 /* (non-Javadoc) |
58 * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#validate() |
60 * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#validate() |
59 */ |
61 */ |
68 @Override |
70 @Override |
69 protected void updateUI() { |
71 protected void updateUI() { |
70 String msg; |
72 String msg; |
71 |
73 |
72 String ifWorkspace = ""; //$NON-NLS-1$ |
74 String ifWorkspace = ""; //$NON-NLS-1$ |
73 if (data.getBuildBeforeLaunch() == EBuildBeforeLaunchOption.USE_WORKSPACE_SETTING) |
75 if (otherSettingsWizardData.getBuildBeforeLaunch() == EBuildBeforeLaunchOption.USE_WORKSPACE_SETTING) |
74 ifWorkspace = Messages.getString("OtherSettingsSection.WorkspaceLabel"); //$NON-NLS-1$ |
76 ifWorkspace = Messages.getString("OtherSettingsSection.WorkspaceLabel"); //$NON-NLS-1$ |
75 |
77 |
76 if (data.isCurrentBuildBeforeLaunch()) |
78 if (otherSettingsWizardData.isCurrentBuildBeforeLaunch()) |
77 msg = Messages.getString("OtherSettingsSection.BuildBeforeLabel"); //$NON-NLS-1$ |
79 msg = Messages.getString("OtherSettingsSection.BuildBeforeLabel"); //$NON-NLS-1$ |
78 else |
80 else |
79 msg = Messages.getString("OtherSettingsSection.NoBuildBeforeLabel"); //$NON-NLS-1$ |
81 msg = Messages.getString("OtherSettingsSection.NoBuildBeforeLabel"); //$NON-NLS-1$ |
80 |
82 |
81 descriptionLabel.setText(msg + ifWorkspace + "."); //$NON-NLS-1$ |
83 descriptionLabel.setText(msg + ifWorkspace + "."); //$NON-NLS-1$ |
84 /* (non-Javadoc) |
86 /* (non-Javadoc) |
85 * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#createChangeSettingsDialog(org.eclipse.swt.widgets.Shell, com.nokia.cdt.internal.debug.launch.wizard2.LaunchOptionsData) |
87 * @see com.nokia.cdt.internal.debug.launch.wizard2.AbstractLaunchWizardSection#createChangeSettingsDialog(org.eclipse.swt.widgets.Shell, com.nokia.cdt.internal.debug.launch.wizard2.LaunchOptionsData) |
86 */ |
88 */ |
87 @Override |
89 @Override |
88 protected AbstractLaunchSettingsDialog createChangeSettingsDialog( |
90 protected AbstractLaunchSettingsDialog createChangeSettingsDialog( |
89 Shell shell, LaunchWizardData dialogData) { |
91 Shell shell, IWizardData dialogData) { |
90 return new OtherSettingsDialog(shell, dialogData); |
92 return new OtherSettingsDialog(shell, dialogData); |
91 } |
93 } |
92 |
94 |
93 protected void refresh() { |
95 protected void refresh() { |
94 validate(); |
96 validate(); |