From 0cd54d6a889ed3ae59931a391534c745d289e706 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Tue, 17 Dec 2002 23:09:27 +0000 Subject: [PATCH] Disable the association controls in the 'Attach Source Location" dialog if path is not absolute. --- debug/org.eclipse.cdt.debug.ui/ChangeLog | 5 +++++ .../cdt/debug/ui/sourcelookup/AttachSourceLocationBlock.java | 4 +++- .../eclipse/cdt/debug/ui/sourcelookup/CUISourceLocator.java | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 0cf8c18e85b..97f31992a69 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,8 @@ +2002-12-17 Mikhail Khodjaiants + Disable the association controls in the 'Attach Source Location" dialog if path is not absolute. + * AttachSourceLocationBlock.java + * CUISourceLocator.java + 2002-12-17 Mikhail Khodjaiants Formatting 'char' types. * VariableFormatActionDelegate.java diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationBlock.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationBlock.java index 22bed4ceeb0..da8944ae20f 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationBlock.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationBlock.java @@ -68,9 +68,11 @@ public class AttachSourceLocationBlock public void setInitialAssociationPath( IPath path ) { + fAssociationText.setEnabled( ( path != null ) ); + fAssocitedCheckButton.setEnabled( ( path != null ) ); + fAssocitedCheckButton.setSelection( ( path != null ) ); if ( path != null ) { - fAssocitedCheckButton.setSelection( true ); fAssociationText.setText( path.toOSString() ); } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/CUISourceLocator.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/CUISourceLocator.java index 6d4012e7a64..22a503011e0 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/CUISourceLocator.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/CUISourceLocator.java @@ -246,7 +246,10 @@ public class CUISourceLocator implements IAdaptable { AttachSourceLocationDialog dialog = new AttachSourceLocationDialog( CDebugUIPlugin.getActiveWorkbenchShell() ); Path path = new Path( fileName ); - dialog.setInitialPath( path.removeLastSegments( 1 ) ); + if ( path.isAbsolute() ) + { + dialog.setInitialPath( path.removeLastSegments( 1 ) ); + } if ( dialog.open() == Dialog.OK ) { if ( dialog.getLocation() != null )