cleanup:
- avoid using internal class SWTFactory while maintaining the two kinds of layout (bold/unbold heading)
- a bit of documenting.
diff --git a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTDebugUILaunchingAdaptor.java b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTDebugUILaunchingAdaptor.java
index 8b0c45a..98e1c6a 100644
--- a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTDebugUILaunchingAdaptor.java
+++ b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTDebugUILaunchingAdaptor.java
@@ -16,7 +16,7 @@
**********************************************************************/
package org.eclipse.objectteams.otdt.internal.debug.adaptor.launching;
-import org.eclipse.jdt.internal.debug.ui.jres.JREsComboBlock;
+import org.eclipse.jdt.internal.debug.ui.jres.JREsComboBlock; // type is accessed only in one parameter mapping
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -61,7 +61,8 @@
Group createOTRESection(Composite parent) <- after void createControl(Composite parent);
public Group createOTRESection(Composite parent) {
Composite enclosingComposite = (Composite) this.getJREControl();
- Group group = super.createOTRESection(enclosingComposite, true/*useSWTFactory*/);
+ Group group = super.createOTRESection(enclosingComposite);
+ group.setFont(parent.getFont()); // without this the heading would be bold, what other sections don't have
return group;
}
@@ -91,7 +92,8 @@
public Group createOTRESection(Composite parent) {
Composite enclosingComposite = (Composite) this.getControl();
createVerticalSpacer(enclosingComposite, 10);
- Group group = super.createOTRESection(enclosingComposite, true/*useSWTFactory*/);
+ Group group = super.createOTRESection(enclosingComposite);
+ group.setFont(parent.getFont()); // without this the heading would be bold, what other sections don't have
return group;
}
diff --git a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTLaunchingAdaptor.java b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTLaunchingAdaptor.java
index ac093d4..4d06867 100644
--- a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTLaunchingAdaptor.java
+++ b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/JDTLaunchingAdaptor.java
@@ -44,7 +44,7 @@
* <li>Add BCEL and otre_min to the classpath (role {@link ClasspathExtender})
* <li>Maintain an OTVMRunnerAdaptor for adapting vm- and program args (role {@link JDTLaunchingAdaptor.AbstractJavaLaunchConfigurationDelegate}).
* </ul>
- * Role {@link JDTLaunchingAdaptor.JavaLaunchDelegate} only binds the above behavior into Java launches.
+ * Role {@link JDTLaunchingAdaptor.AbstractJavaLaunchConfigurationDelegate} only binds the above behavior into Java launches.
* See {@link JUnitLaunchingAdaptor.JUnitLaunchConfigurationDelegate} for equal binding to JUnit launches.
*
* @author stephan
diff --git a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/OTREBlock.java b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/OTREBlock.java
index f698b5b..9b411d2 100644
--- a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/OTREBlock.java
+++ b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/OTREBlock.java
@@ -23,7 +23,6 @@
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.debug.internal.ui.SWTFactory;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.objectteams.otdt.debug.OTDebugPlugin;
import org.eclipse.objectteams.otdt.internal.debug.adaptor.DebugMessages;
@@ -46,7 +45,6 @@
* @author stephan
* @since 1.2.2
*/
-@SuppressWarnings("restriction")
public abstract class OTREBlock
{
protected String enableCheckboxLabel = DebugMessages.OTLaunching_OTRE_checkbox_label; // overidable default
@@ -59,18 +57,13 @@
public abstract void updateLaunchConfigurationDialog();
// create the "Object Teams Runtime" section:
- public Group createOTRESection(Composite parent, boolean useSWTFactory) {
- Group group;
- if (useSWTFactory) {
- group = SWTFactory.createGroup(parent, DebugMessages.OTLaunching_OTRE_group_title+':', 1, 1, GridData.FILL_HORIZONTAL);
- } else {
- group = new Group(parent, SWT.NONE);
- group.setText(DebugMessages.OTLaunching_OTRE_group_title);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
+ public Group createOTRESection(Composite parent) {
+ Group group = new Group(parent, SWT.NONE);
+ group.setLayout(new GridLayout(1, false));
+ group.setText(DebugMessages.OTLaunching_OTRE_group_title+':');
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ group.setLayoutData(gd);
this._otreToggleButton = createCheckButton(group, this.enableCheckboxLabel);
this._otreToggleButton.addSelectionListener(new SelectionAdapter()
diff --git a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/PDELaunchingAdaptor.java b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/PDELaunchingAdaptor.java
index b651668..20cadec 100644
--- a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/PDELaunchingAdaptor.java
+++ b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/src/org/eclipse/objectteams/otdt/internal/debug/adaptor/launching/PDELaunchingAdaptor.java
@@ -202,7 +202,7 @@
base when (PDELaunchingAdaptor.this.currentTab != null); // only within the LauncherTab#launcherTabCFlow() (see below)
void appendOTOption(Composite parent) {
- PDELaunchingAdaptor.this.currentTab.createOTRESection(parent, false/*useSWTFactory*/);
+ PDELaunchingAdaptor.this.currentTab.createOTRESection(parent);
}
}