Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-09-02 21:25:55 +0000
committerMikhail Khodjaiants2005-09-02 21:25:55 +0000
commit7fb7da6e35c30a2b524d8ccdfab9029273ab1e7c (patch)
treecfa7887f5fd26d9abde732d38d84a528ac1a2523 /debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse
parent3df6aeb4e9b1a5c71efebf0c3c512bdc287e3da8 (diff)
downloadorg.eclipse.cdt-7fb7da6e35c30a2b524d8ccdfab9029273ab1e7c.tar.gz
org.eclipse.cdt-7fb7da6e35c30a2b524d8ccdfab9029273ab1e7c.tar.xz
org.eclipse.cdt-7fb7da6e35c30a2b524d8ccdfab9029273ab1e7c.zip
Bug 108723: Create a separate tab for gdb server's conection options.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java5
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java119
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties3
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java3
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java3
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java3
6 files changed, 26 insertions, 110 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
index f77457dfecd..654eb00f9a0 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
@@ -154,11 +154,13 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
public void createMainTab( TabFolder tabFolder ) {
TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
tabItem.setText( MIUIMessages.getString( "GDBDebuggerPage.2" ) ); //$NON-NLS-1$
- Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
+ Composite comp = ControlFactory.createCompositeEx( tabFolder, 1, GridData.FILL_BOTH );
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+ comp.setFont( tabFolder.getFont() );
tabItem.setControl( comp );
Composite subComp = ControlFactory.createCompositeEx( comp, 3, GridData.FILL_HORIZONTAL );
((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
+ subComp.setFont( tabFolder.getFont() );
Label label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "GDBDebuggerPage.3" ) ); //$NON-NLS-1$
GridData gd = new GridData();
// gd.horizontalSpan = 2;
@@ -243,6 +245,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
tabItem.setText( MIUIMessages.getString( "GDBDebuggerPage.10" ) ); //$NON-NLS-1$
Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
+ comp.setFont( tabFolder.getFont() );
tabItem.setControl( comp );
fSolibBlock = createSolibBlock( comp );
if ( fSolibBlock instanceof Observable )
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
index 7b3009b6f8b..bdeb74721b4 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.cdt.debug.mi.internal.ui;
-import java.io.File;
import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.ComboDialogField;
import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.DialogField;
@@ -22,16 +21,9 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
@@ -65,101 +57,16 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage {
fSerialBlock.addObserver( this );
}
- public void createMainTab( TabFolder tabFolder ) {
+ protected void createConnectionTab( TabFolder tabFolder ) {
TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
- tabItem.setText( MIUIMessages.getString( "GDBServerDebuggerPage.2" ) ); //$NON-NLS-1$
- Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
- ((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
- tabItem.setControl( comp );
- Composite subComp = ControlFactory.createCompositeEx( comp, 3, GridData.FILL_HORIZONTAL );
- ((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
- Label label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "GDBServerDebuggerPage.3" ) ); //$NON-NLS-1$
- GridData gd = new GridData();
- // gd.horizontalSpan = 2;
- label.setLayoutData( gd );
- fGDBCommandText = ControlFactory.createTextField( subComp, SWT.SINGLE | SWT.BORDER );
- fGDBCommandText.addModifyListener( new ModifyListener() {
-
- public void modifyText( ModifyEvent evt ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- Button button = createPushButton( subComp, MIUIMessages.getString( "GDBServerDebuggerPage.4" ), null ); //$NON-NLS-1$
- button.addSelectionListener( new SelectionAdapter() {
-
- public void widgetSelected( SelectionEvent evt ) {
- if ( !isInitializing() ) {
- handleGDBButtonSelected();
- updateLaunchConfigurationDialog();
- }
- }
-
- private void handleGDBButtonSelected() {
- FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
- dialog.setText( MIUIMessages.getString( "GDBServerDebuggerPage.5" ) ); //$NON-NLS-1$
- String gdbCommand = fGDBCommandText.getText().trim();
- int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
- if ( lastSeparatorIndex != -1 ) {
- dialog.setFilterPath( gdbCommand.substring( 0, lastSeparatorIndex ) );
- }
- String res = dialog.open();
- if ( res == null ) {
- return;
- }
- fGDBCommandText.setText( res );
- }
- } );
- label = ControlFactory.createLabel( subComp, MIUIMessages.getString( "GDBServerDebuggerPage.6" ) ); //$NON-NLS-1$
- gd = new GridData();
- // gd.horizontalSpan = 2;
- label.setLayoutData( gd );
- fGDBInitText = ControlFactory.createTextField( subComp, SWT.SINGLE | SWT.BORDER );
- gd = new GridData( GridData.FILL_HORIZONTAL );
- fGDBInitText.setLayoutData( gd );
- fGDBInitText.addModifyListener( new ModifyListener() {
-
- public void modifyText( ModifyEvent evt ) {
- if ( !isInitializing() )
- updateLaunchConfigurationDialog();
- }
- } );
- button = createPushButton( subComp, MIUIMessages.getString( "GDBServerDebuggerPage.7" ), null ); //$NON-NLS-1$
- button.addSelectionListener( new SelectionAdapter() {
-
- public void widgetSelected( SelectionEvent evt ) {
- if ( !isInitializing() ) {
- handleGDBInitButtonSelected();
- updateLaunchConfigurationDialog();
- }
- }
-
- private void handleGDBInitButtonSelected() {
- FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
- dialog.setText( MIUIMessages.getString( "GDBServerDebuggerPage.8" ) ); //$NON-NLS-1$
- String gdbCommand = fGDBInitText.getText().trim();
- int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
- if ( lastSeparatorIndex != -1 ) {
- dialog.setFilterPath( gdbCommand.substring( 0, lastSeparatorIndex ) );
- }
- String res = dialog.open();
- if ( res == null ) {
- return;
- }
- fGDBInitText.setText( res );
- }
- } );
- extendMainTab( comp );
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#extendMainTab(org.eclipse.swt.widgets.Composite)
- */
- protected void extendMainTab( Composite parent ) {
- Composite comp = ControlFactory.createCompositeEx( parent, 2, GridData.FILL_BOTH );
+ tabItem.setText( MIUIMessages.getString( "GDBServerDebuggerPage.10" ) ); //$NON-NLS-1$
+ Composite comp1 = ControlFactory.createCompositeEx( tabFolder, 1, GridData.FILL_BOTH );
+ ((GridLayout)comp1.getLayout()).makeColumnsEqualWidth = false;
+ comp1.setFont( tabFolder.getFont() );
+ tabItem.setControl( comp1 );
+ Composite comp = ControlFactory.createCompositeEx( comp1, 2, GridData.FILL_BOTH );
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+ comp.setFont( comp1.getFont() );
fConnectionField.doFillIntoGrid( comp, 2 );
((GridData)fConnectionField.getComboControl( null ).getLayoutData()).horizontalAlignment = GridData.BEGINNING;
PixelConverter converter = new PixelConverter( comp );
@@ -169,7 +76,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage {
fConnectionStack.setLayout( stackLayout );
((GridData)fConnectionStack.getLayoutData()).horizontalSpan = 2;
fTCPBlock.createBlock( fConnectionStack );
- fSerialBlock.createBlock( fConnectionStack );
+ fSerialBlock.createBlock( fConnectionStack );
}
private ComboDialogField createConnectionField() {
@@ -267,4 +174,12 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage {
private void setInitializing( boolean isInitializing ) {
fIsInitializing = isInitializing;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#createTabs(org.eclipse.swt.widgets.TabFolder)
+ */
+ public void createTabs( TabFolder tabFolder ) {
+ super.createTabs( tabFolder );
+ createConnectionTab( tabFolder );
+ }
}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties
index abdb203d942..816414c68ec 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.properties
@@ -23,6 +23,7 @@ GDBDebuggerPage.9=(Warning: Some commands in this file may interfere with the st
GDBDebuggerPage.10=Shared Libraries
GDBServerDebuggerPage.0=TCP
GDBServerDebuggerPage.1=Serial
+GDBServerDebuggerPage.10=Connection
GDBServerDebuggerPage.2=Main
GDBServerDebuggerPage.3=GDB debugger
GDBServerDebuggerPage.4=&Browse...
@@ -30,7 +31,7 @@ GDBServerDebuggerPage.5=GDB Debugger
GDBServerDebuggerPage.6=GDB command file:
GDBServerDebuggerPage.7=B&rowse...
GDBServerDebuggerPage.8=GDB Command File
-GDBServerDebuggerPage.9=Connection:
+GDBServerDebuggerPage.9=Type:
GDBSolibBlock.0=Load shared library symbols automatically
GDBSolibBlock.1=Stop on shared library events
SerialPortSettingsBlock.0=Device:
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java
index a3c949f063c..7db860a93dc 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java
@@ -22,7 +22,6 @@ import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -60,7 +59,7 @@ public class SerialPortSettingsBlock extends Observable {
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
((GridLayout)comp.getLayout()).marginHeight = 0;
((GridLayout)comp.getLayout()).marginWidth = 0;
- comp.setFont( JFaceResources.getDialogFont() );
+ comp.setFont( parent.getFont() );
PixelConverter converter = new PixelConverter( comp );
fDeviceField.doFillIntoGrid( comp, 2 );
LayoutUtil.setWidthHint( fDeviceField.getTextControl( null ), converter.convertWidthInCharsToPixels( 20 ) );
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
index 0b67c0ca9c5..4f1180098b9 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
@@ -29,7 +29,6 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT;
@@ -209,7 +208,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
((GridLayout)comp.getLayout()).marginHeight = 0;
((GridLayout)comp.getLayout()).marginWidth = 0;
- comp.setFont( JFaceResources.getDialogFont() );
+ comp.setFont( parent.getFont() );
PixelConverter converter = new PixelConverter( comp );
fDirList.doFillIntoGrid( comp, 3 );
LayoutUtil.setHorizontalSpan( fDirList.getLabelControl( null ), 2 );
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java
index da58e3e09f0..49f4c84b073 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java
@@ -21,7 +21,6 @@ import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -56,7 +55,7 @@ public class TCPSettingsBlock extends Observable {
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
((GridLayout)comp.getLayout()).marginHeight = 0;
((GridLayout)comp.getLayout()).marginWidth = 0;
- comp.setFont( JFaceResources.getDialogFont() );
+ comp.setFont( parent.getFont() );
PixelConverter converter = new PixelConverter( comp );
fHostNameField.doFillIntoGrid( comp, 2 );
LayoutUtil.setWidthHint( fHostNameField.getTextControl( null ), converter.convertWidthInCharsToPixels( 20 ) );

Back to the top