From 48a6c457d4fdfe0601d23986af5f3a883ee5f0f5 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 30 Dec 2002 00:07:15 +0000 Subject: [PATCH] Implementation of the 'Source Lookup' property page. --- debug/org.eclipse.cdt.debug.ui/ChangeLog | 16 ++ .../icons/full/ctool16/adddirsource_wiz.gif | Bin 0 -> 164 bytes .../icons/full/ctool16/addprjsource_wiz.gif | Bin 0 -> 239 bytes .../icons/full/dtool16/adddirsource_wiz.gif | Bin 0 -> 86 bytes .../icons/full/dtool16/addprjsource_wiz.gif | Bin 0 -> 97 bytes .../icons/full/etool16/adddirsource_wiz.gif | Bin 0 -> 159 bytes .../icons/full/etool16/addprjsource_wiz.gif | Bin 0 -> 174 bytes .../wizban/add_dir_source_location_wiz.gif | Bin 0 -> 2610 bytes .../wizban/add_prj_source_location_wiz.gif | Bin 0 -> 2476 bytes .../full/wizban/add_source_location_wiz.gif | Bin 0 -> 2624 bytes .../cdt/debug/internal/ui/CDebugImages.java | 12 + .../AddDirectorySourceLocationBlock.java} | 102 ++++++-- .../AddDirectorySourceLocationWizard.java | 194 +++++++++++++++ .../AddProjectSourceLocationBlock.java | 132 +++++++++++ .../AddProjectSourceLocationWizard.java | 149 ++++++++++++ .../ui/wizards/AddSourceLocationWizard.java | 55 +++-- .../wizards/SourceLocationSelectionPage.java | 222 ++++++++++++++++++ .../ui/wizards/SourceLocationWizardNode.java | 61 +++++ .../AttachSourceLocationDialog.java | 130 ---------- .../ui/sourcelookup/CUISourceLocator.java | 26 +- .../INewSourceLocationWizard.java | 21 ++ .../ui/sourcelookup/SourceLookupBlock.java | 44 ++-- 22 files changed, 953 insertions(+), 211 deletions(-) create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/ctool16/adddirsource_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/ctool16/addprjsource_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/dtool16/adddirsource_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/dtool16/addprjsource_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/etool16/adddirsource_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/etool16/addprjsource_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/wizban/add_dir_source_location_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/wizban/add_prj_source_location_wiz.gif create mode 100644 debug/org.eclipse.cdt.debug.ui/icons/full/wizban/add_source_location_wiz.gif rename debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/{ui/sourcelookup/AttachSourceLocationBlock.java => internal/ui/wizards/AddDirectorySourceLocationBlock.java} (65%) create mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java create mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationBlock.java create mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java create mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java create mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationWizardNode.java delete mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationDialog.java create mode 100644 debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/INewSourceLocationWizard.java diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 023f2bd5c28..8374cb0dcee 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,19 @@ +2002-12-29 Mikhail Khodjaiants + Implementation of the 'Source Lookup' property page. + * AddDirectorySourceLocationBlock.java (new) + * AddDirectorySourceLocationWizard.java (new) + * AddProjectSourceLocationBlock.java (new) + * AddProjectSourceLocationWizard.java (new) + * AddSourceLocationWizard.java + * SourceLocationSelectionPage.java (new) + * SourceLocationWizardNode.java (new) + * CDebugImages.java + * AttachSourceLocationBlock.java renamed to AddDirectorySourceLocationBlock.java + * AttachSourceLocationDialog.java (deleted - dialog replaced by wizard). + * INewSourceLocationWizard.java (new) + * SourceLookupBlock.java + Added new wizard and tool icons. + 2002-12-19 Mikhail Khodjaiants Implementing the 'Source Lookup' property page. * AddSourceLocationWizard.java diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/ctool16/adddirsource_wiz.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/ctool16/adddirsource_wiz.gif new file mode 100644 index 0000000000000000000000000000000000000000..188c920c3f308beee98af6bbf489046dbfeb575f GIT binary patch literal 164 zcmZ?wbhEHb6krfw*vtR~{}~t>?CtmO+h5<%z%YNl{r~^-A8CE^o*wE$!?ouWCKMG7v!nAny}q5 z@NH6g;&Pdbq*!Y<--*f5d&K^C^i#b6Xb!7HEC~#DI5yHUunMJ{4 N^=-!ORYHsm)&M=rMLz%l literal 0 HcmV?d00001 diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/ctool16/addprjsource_wiz.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/ctool16/addprjsource_wiz.gif new file mode 100644 index 0000000000000000000000000000000000000000..ca7ef1be4d83a2693accf7fcd828534565aca8a3 GIT binary patch literal 239 zcmZ?wbhEHb6krfwIKlt~4fgi??d{|3($tx|D-*yR<&VBioYv$cE<;+~QoheQ!UpSR| zPdFdo=`)(K#;iKg#8mQhqK%mh56k+{W`+6ZUo^P|2yQ)HVDg~MT>2jibG2S>T|;BD aGDm#|OCvL5XBoqksZ%*zW|}K9SOWkAms~Xf literal 0 HcmV?d00001 diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/dtool16/adddirsource_wiz.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/dtool16/adddirsource_wiz.gif new file mode 100644 index 0000000000000000000000000000000000000000..70ec11691b74ed87b40fbbb081b5e1c389785ded GIT binary patch literal 86 zcmZ?wbhEHb6krfwn8?7eV8N38`}fbEKmY&#|B63Z7#SFt8FUzc03^@Aq&}yA)WP^iySvNNvBZQ-`uxwE{|9$$I1Secc<8UO^tA6@_e literal 0 HcmV?d00001 diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/dtool16/addprjsource_wiz.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/dtool16/addprjsource_wiz.gif new file mode 100644 index 0000000000000000000000000000000000000000..bd5772ade77af04e871398ba7f44e88d85d436d8 GIT binary patch literal 97 zcmZ?wbhEHb6krfwn8?6z|Ned;m_L91|Ns9Lf3h$#FfcRdFaQBao`K0|j=q@C=Gr!f yld=-iSLi=GTRAVRGr?(=AeYkf*+?TP}Lv_Lh+;{NVM~?J^<^4AuZ`7b1oL literal 0 HcmV?d00001 diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/etool16/adddirsource_wiz.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/etool16/adddirsource_wiz.gif new file mode 100644 index 0000000000000000000000000000000000000000..86b35e403c5e2e22339ae9d35f9d0ce7d17561e9 GIT binary patch literal 159 zcmZ?wbhEHb6krfw*v!CSZy!IJy;_y7O@|Gui4};Wt5^PqnR7_@;9*C!KyPrEj-(DbCl7hfMG@lU>DU;D z$-^Qhw%O)kY-TpY7@N)WV<^}C8Q;$jpV#N7_v`cd;dA|ljfJJR9pEBh8vyw7Q{q3E-t?k`m_5yc$i8r&nzPY=yw$0!y46}u!6A~s@%$Z)A60Gp& z*XG3=lI1P&(q>gN1Kq;F;zw&gj5c<%8$OOT5yqRl$J=_j?Id11X@W8`*EcL6(`Si; zd@5s(G9n-jPSe?COn)osk$c2*6Z`A-L{{v+#s_jnV5 z-O|HpC-d5Rzxl++J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?zz~nZK%Y-JKotO#ri1v7=s@^zz zPOSEZta%4p_T;Eq-b-+ADFoc<=lE(DP-!U!UlyF&p4&@+93eP535d}1gRxLL#?>i` zl!&KT7%Tx!Hf)@OGG)zr(T%En>}1ldvjxW78ni4@+g(@F5R~azem%cS^_1VMUI%k+ zlmw+w)9JF?p)%o=u{R~ws?c1!7IP|G$Z`f>ZQQjR z9h2bUrvlArBwKr*VLKKwU(ylQw)=r6p{`U=28q}8^iq8imhm)=;tGqnln{KL25CnW zAIv}|gxL9H1x}Bmw$KTVStJOLQ|wUPaW0(HgPc2%0{S@gR=q0UM-K+9WT~U_U#r}w zA9J-mZw|ubH0LTf;u8xO{V+uE&7^4%*@iGDfWX1U!2w*uhv$0skC>Yr*l8}anC zx3!EM-{b}IOtvLw;tJmT73nLGXJ25TIaJ!bN~eBGiu<&B*4vT*a7F1g>w^V*FVYd= zAKnD$O$`{as9Ggn$(|nWRExMnz~GCX{&Y(-x+IG3``VbkC=B-F3YVB9+KYEuiL>uz#OS(l5R!3GMpSyn4^(e z$zcUAE4PI3&>-pia#~sj2mJ{)ao0Tzms-qms|}4wCfYE@wQOoW*?56su@P6X>S_ST F{{cn{pB(@I literal 0 HcmV?d00001 diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/wizban/add_source_location_wiz.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/wizban/add_source_location_wiz.gif new file mode 100644 index 0000000000000000000000000000000000000000..b084ad9cfed11fd8160bc452a83696929014e99c GIT binary patch literal 2624 zcmV-G3cvM7Nk%w1VM_oy0QUd@#>2*hf`kA7ga`V5(o$j6B8H&1O@&5 z{`~y?=;-MH1dIR#ga{0b00@i#2!sd_ln4-v01S)>6qEoAga8nX2pE(A6qEoIj0hZ@ z2pp6E7?c1Qj0hl{2q2UI9Fzzooc8zo^!51wAe0CwoB$-803?(METsr6oB$}C2r#7x zFr4V?^!WMw_xSq&Fr@%2oCr9r2sEYA+3MWk?%w0?^Y!}h^7jBVr2sIT2t2I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6!GUPrV&qsj=Pr3Ev6#66<)es2DP#f6Q=%ed7ZV00L0T!wOL%PN iq$p*|DhAAoSHx!8%=ynp2{ek&ypo#WdCX!C2mm{x0ypIV literal 0 HcmV?d00001 diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java index e1b2999cc93..17b508b44ee 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java @@ -72,6 +72,13 @@ public class CDebugImages public static final String IMG_LCL_MEMORY_CLEAR = NAME_PREFIX + "memory_clear.gif"; //$NON-NLS-1$ public static final String IMG_LCL_SHOW_ASCII = NAME_PREFIX + "show_ascii.gif"; //$NON-NLS-1$ + public static final String IMG_TOOLS_ADD_DIR_SOURCE_LOCATION = NAME_PREFIX + "adddirsource_wiz.gif"; //$NON-NLS-1$ + public static final String IMG_TOOLS_ADD_PRJ_SOURCE_LOCATION = NAME_PREFIX + "addprjsource_wiz.gif"; //$NON-NLS-1$ + + public static final String IMG_WIZBAN_ADD_SOURCE_LOCATION = NAME_PREFIX + "add_source_location_wiz.gif"; //$NON-NLS-1$ + public static final String IMG_WIZBAN_ADD_DIR_SOURCE_LOCATION = NAME_PREFIX + "add_dir_source_location_wiz.gif"; //$NON-NLS-1$ + public static final String IMG_WIZBAN_ADD_PRJ_SOURCE_LOCATION = NAME_PREFIX + "add_prj_source_location_wiz.gif"; //$NON-NLS-1$ + /* * Set of predefined Image Descriptors. */ @@ -101,6 +108,11 @@ public class CDebugImages public static final ImageDescriptor DESC_OBJS_DISASSEMBLY = createManaged( T_OBJ, IMG_OBJS_DISASSEMBLY ); public static final ImageDescriptor DESC_OBJS_PROJECT = createManaged( T_OBJ, IMG_OBJS_PROJECT ); public static final ImageDescriptor DESC_OBJS_FOLDER = createManaged( T_OBJ, IMG_OBJS_FOLDER ); + public static final ImageDescriptor DESC_WIZBAN_ADD_SOURCE_LOCATION = createManaged( T_WIZBAN, IMG_WIZBAN_ADD_SOURCE_LOCATION ); //$NON-NLS-1$ + public static final ImageDescriptor DESC_WIZBAN_ADD_PRJ_SOURCE_LOCATION = createManaged( T_WIZBAN, IMG_WIZBAN_ADD_PRJ_SOURCE_LOCATION ); //$NON-NLS-1$ + public static final ImageDescriptor DESC_WIZBAN_ADD_DIR_SOURCE_LOCATION = createManaged( T_WIZBAN, IMG_WIZBAN_ADD_DIR_SOURCE_LOCATION ); //$NON-NLS-1$ + public static final ImageDescriptor DESC_TOOLS_ADD_PRJ_SOURCE_LOCATION = createManaged( T_CTOOL, IMG_TOOLS_ADD_PRJ_SOURCE_LOCATION ); //$NON-NLS-1$ + public static final ImageDescriptor DESC_TOOLS_ADD_DIR_SOURCE_LOCATION = createManaged( T_CTOOL, IMG_TOOLS_ADD_DIR_SOURCE_LOCATION ); //$NON-NLS-1$ /** * Returns the image managed under the given key in this registry. 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/internal/ui/wizards/AddDirectorySourceLocationBlock.java similarity index 65% rename from debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationBlock.java rename to debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationBlock.java index b6828f10c65..407ca610e65 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/internal/ui/wizards/AddDirectorySourceLocationBlock.java @@ -3,16 +3,19 @@ * All Rights Reserved. * */ -package org.eclipse.cdt.debug.ui.sourcelookup; +package org.eclipse.cdt.debug.internal.ui.wizards; +import org.eclipse.cdt.debug.core.sourcelookup.IDirectorySourceLocation; +import org.eclipse.cdt.debug.internal.core.sourcelookup.CDirectorySourceLocation; import org.eclipse.cdt.debug.internal.ui.PixelConverter; import org.eclipse.cdt.debug.internal.ui.SWTUtil; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.FontMetrics; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -28,20 +31,22 @@ import org.eclipse.swt.widgets.Text; * * @since: Dec 12, 2002 */ -public class AttachSourceLocationBlock +public class AddDirectorySourceLocationBlock { private Composite fControl = null; private Text fLocationText = null; private Text fAssociationText = null; private Button fAssocitedCheckButton = null; - private FontMetrics fFontMetrics; private Shell fShell = null; + + private IPath fInitialAssosciationPath = null; /** - * Constructor for AttachSourceLocationBlock. + * Constructor for AddDirectorySourceLocationBlock. */ - public AttachSourceLocationBlock() + public AddDirectorySourceLocationBlock( IPath initialAssosciationPath ) { + fInitialAssosciationPath = initialAssosciationPath; } public void createControl( Composite parent ) @@ -49,29 +54,22 @@ public class AttachSourceLocationBlock fShell = parent.getShell(); fControl = new Composite( parent, SWT.NONE ); fControl.setLayout( new GridLayout() ); - fControl.setLayoutData( new GridData( GridData.FILL_BOTH ) ); + fControl.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); fControl.setFont( JFaceResources.getDialogFont() ); createLocationControls( fControl ); createAssociationControls( fControl ); - } - - public void setInitialLocationPath( IPath path ) - { - if ( path != null ) - { - fLocationText.setText( path.toOSString() ); - } + + setInitialAssociationPath(); } - public void setInitialAssociationPath( IPath path ) + private void setInitialAssociationPath() { - fAssociationText.setEnabled( ( path != null ) ); - fAssocitedCheckButton.setEnabled( ( path != null ) ); - fAssocitedCheckButton.setSelection( ( path != null ) ); - if ( path != null ) + fAssociationText.setEnabled( ( fInitialAssosciationPath != null ) ); + fAssocitedCheckButton.setSelection( ( fInitialAssosciationPath != null ) ); + if ( fInitialAssosciationPath != null ) { - fAssociationText.setText( path.toOSString() ); + fAssociationText.setText( fInitialAssosciationPath.toOSString() ); } } @@ -173,4 +171,66 @@ public class AttachSourceLocationBlock } return ""; } + + public IDirectorySourceLocation getSourceLocation() + { + if ( isLocationPathValid() ) + { + Path association = ( isAssociationPathValid() ) ? new Path( getAssociationPath() ) : null; + return new CDirectorySourceLocation( new Path( getLocationPath() ), association ); + } + return null; + } + + public void addDirectoryModifyListener( ModifyListener listener ) + { + if ( fLocationText != null ) + { + fLocationText.addModifyListener( listener ); + } + } + + public void addAssociationModifyListener( ModifyListener listener ) + { + if ( fAssociationText != null ) + { + fAssociationText.addModifyListener( listener ); + } + } + + public void removeDirectoryModifyListener( ModifyListener listener ) + { + if ( fLocationText != null ) + { + fLocationText.removeModifyListener( listener ); + } + } + + public void removeAssociationModifyListener( ModifyListener listener ) + { + if ( fAssociationText != null ) + { + fAssociationText.removeModifyListener( listener ); + } + } + + private boolean isLocationPathValid() + { + if ( fLocationText != null && Path.EMPTY.isValidPath( fLocationText.getText().trim() ) ) + { + Path path = new Path( fLocationText.getText().trim() ); + return ( path.toFile().exists() && path.toFile().isAbsolute() ); + } + return false; + } + + public boolean isAssociationPathValid() + { + String pathString = getAssociationPath(); + if ( pathString.length() > 0 ) + { + return Path.EMPTY.isValidPath( pathString ); + } + return true; + } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java new file mode 100644 index 00000000000..608d207dc57 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java @@ -0,0 +1,194 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.internal.ui.wizards; + +import java.io.File; + +import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; +import org.eclipse.cdt.debug.core.sourcelookup.IDirectorySourceLocation; +import org.eclipse.cdt.debug.internal.ui.CDebugImages; +import org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard; +import org.eclipse.core.runtime.IPath; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; + +/** + * + * Enter type comment. + * + * @since Dec 23, 2002 + */ +public class AddDirectorySourceLocationWizard extends Wizard implements INewSourceLocationWizard +{ + protected static final String PAGE_NAME = "AddDirectorySourceLocationWizardPage"; + + /** + * + * Enter type comment. + * + * @since Dec 25, 2002 + */ + public class AddDirtectorySourceLocationWizardPage extends WizardPage + { + private AddDirectorySourceLocationBlock fAttachBlock; + + /** + * Constructor for AddDirtectorySourceLocationWizardPage. + * @param pageName + * @param title + * @param titleImage + */ + public AddDirtectorySourceLocationWizardPage( AddDirectorySourceLocationWizard wizard, IPath initialAssociationPath ) + { + super( PAGE_NAME, "Select Directory", CDebugImages.DESC_WIZBAN_ADD_DIR_SOURCE_LOCATION ); + setWindowTitle( "Add Directory Source Location" ); + setMessage( "Add a local file system directory to the source locations list." ); + setWizard( wizard ); + fAttachBlock = new AddDirectorySourceLocationBlock( initialAssociationPath ); + } + + /** + * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite) + */ + public void createControl( Composite parent ) + { + Composite composite = new Composite( parent, SWT.NULL ); + composite.setLayout( new GridLayout() ); + composite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); + + fAttachBlock.createControl( composite ); + fAttachBlock.addDirectoryModifyListener( new ModifyListener() + { + public void modifyText( ModifyEvent e ) + { + directoryChanged(); + } + } ); + + fAttachBlock.addAssociationModifyListener( new ModifyListener() + { + public void modifyText( ModifyEvent e ) + { + associationChanged(); + } + } ); + + setControl( composite ); + updateState(); + } + + protected void directoryChanged() + { + updateState(); + } + + protected void associationChanged() + { + updateState(); + } + + private void updateState() + { + boolean complete = true; + setErrorMessage( null ); + String dirText = fAttachBlock.getLocationPath(); + if ( dirText.length() == 0 ) + { + setErrorMessage( "Directory must not be empty." ); + complete = false; + } + else + { + File file = new File( dirText ); + if ( !file.exists() || !file.isDirectory() ) + { + setErrorMessage( "Directory does not exist." ); + complete = false; + } + else if ( !file.isAbsolute() ) + { + setErrorMessage( "Directory must be absolute." ); + complete = false; + } + } + setPageComplete( complete ); + } + + private IDirectorySourceLocation getSourceLocation() + { + return fAttachBlock.getSourceLocation(); + } + + protected boolean finish() + { + fSourceLocation = getSourceLocation(); + return ( fSourceLocation != null ); + } + } + + protected IDirectorySourceLocation fSourceLocation = null; + private IPath fInitialAssociationPath = null; + + /** + * Constructor for AddDirectorySourceLocationWizard. + */ + public AddDirectorySourceLocationWizard() + { + super(); + } + + /** + * Constructor for AddDirectorySourceLocationWizard. + */ + public AddDirectorySourceLocationWizard( IPath initialAssociationPath ) + { + super(); + fInitialAssociationPath = initialAssociationPath; + } + + /** + * @see org.eclipse.jface.wizard.IWizard#performFinish() + */ + public boolean performFinish() + { + AddDirtectorySourceLocationWizardPage page = (AddDirtectorySourceLocationWizardPage)getStartingPage(); + if ( page != null ) + { + return page.finish(); + } + return false; + } + + /** + * @see org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard#getDescription() + */ + public String getDescription() + { + return "Add a local file system directory to the source locations list."; + } + + /** + * @see org.eclipse.jface.wizard.IWizard#addPages() + */ + public void addPages() + { + addPage( new AddDirtectorySourceLocationWizardPage( this, fInitialAssociationPath ) ); + } + + /** + * @see org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard#getSourceLocation() + */ + public ICSourceLocation getSourceLocation() + { + return fSourceLocation; + } +} diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationBlock.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationBlock.java new file mode 100644 index 00000000000..7bb6a90f74e --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationBlock.java @@ -0,0 +1,132 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.internal.ui.wizards; + +import org.eclipse.cdt.debug.core.sourcelookup.IProjectSourceLocation; +import org.eclipse.cdt.debug.internal.core.sourcelookup.CProjectSourceLocation; +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Table; +import org.eclipse.ui.model.WorkbenchLabelProvider; + +/** + * + * Enter type comment. + * + * @since Dec 27, 2002 + */ +public class AddProjectSourceLocationBlock +{ + private Composite fControl = null; + private Shell fShell = null; + private TableViewer fViewer; + + protected IProject[] fProjects = null; + + /** + * Constructor for AddProjectSourceLocationBlock. + */ + public AddProjectSourceLocationBlock( IProject[] projects ) + { + fProjects = projects; + } + + public void createControl( Composite parent ) + { + fShell = parent.getShell(); + fControl = new Composite( parent, SWT.NONE ); + fControl.setLayout( new GridLayout() ); + fControl.setLayoutData( new GridData( GridData.FILL_BOTH ) ); + fControl.setFont( JFaceResources.getDialogFont() ); + + //Create a table for the list + Table table = new Table( fControl, SWT.BORDER | SWT.SINGLE ); + GridData data = new GridData( GridData.FILL_BOTH ); + table.setLayoutData( data ); + + // the list viewer + fViewer = new TableViewer( table ); + fViewer.setContentProvider( new IStructuredContentProvider() + { + public Object[] getElements( Object inputElement ) + { + return fProjects; + } + + public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) + { + } + + public void dispose() + { + } + } ); + fViewer.setLabelProvider( new WorkbenchLabelProvider() ); + + fViewer.setInput( fProjects ); + } + + public Control getControl() + { + return fControl; + } + + public IProjectSourceLocation getSourceLocation() + { + if ( fViewer != null ) + { + if ( !((IStructuredSelection)fViewer.getSelection()).isEmpty() ) + { + return new CProjectSourceLocation( (IProject)((IStructuredSelection)fViewer.getSelection()).getFirstElement() ); + } + } + return null; + } + + public void addSelectionChangedListener( ISelectionChangedListener listener ) + { + if ( fViewer != null ) + { + fViewer.addSelectionChangedListener( listener ); + } + } + + public void removeSelectionChangedListener( ISelectionChangedListener listener ) + { + if ( fViewer != null ) + { + fViewer.removeSelectionChangedListener( listener ); + } + } + + public void addDoubleClickListener( IDoubleClickListener listener ) + { + if ( fViewer != null ) + { + fViewer.addDoubleClickListener( listener ); + } + } + + public void removeDoubleClickListener( IDoubleClickListener listener ) + { + if ( fViewer != null ) + { + fViewer.removeDoubleClickListener( listener ); + } + } +} diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java new file mode 100644 index 00000000000..c85732746d4 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java @@ -0,0 +1,149 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.internal.ui.wizards; + +import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; +import org.eclipse.cdt.debug.core.sourcelookup.IProjectSourceLocation; +import org.eclipse.cdt.debug.internal.ui.CDebugImages; +import org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard; +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; + +/** + * + * Enter type comment. + * + * @since Dec 23, 2002 + */ +public class AddProjectSourceLocationWizard extends Wizard implements INewSourceLocationWizard +{ + protected static final String PAGE_NAME = "AddProjectSourceLocationWizardPage"; + + protected IProject[] fProjects = null; + + protected IProjectSourceLocation fSourceLocation = null; + + /** + * + * Enter type comment. + * + * @since Dec 27, 2002 + */ + public class AddProjectSourceLocationWizardPage extends WizardPage + implements ISelectionChangedListener, IDoubleClickListener + { + private AddProjectSourceLocationBlock fBlock; + + /** + * Constructor for AddProjectSourceLocationWizardPage. + * @param pageName + */ + public AddProjectSourceLocationWizardPage( AddProjectSourceLocationWizard wizard ) + { + super( PAGE_NAME, "Select Project", CDebugImages.DESC_WIZBAN_ADD_PRJ_SOURCE_LOCATION ); + setWindowTitle( "Add Project Source Location" ); + setMessage( "Add an existing workspace project to the source locations list." ); + setWizard( wizard ); + fBlock = new AddProjectSourceLocationBlock( fProjects ); + setPageComplete( false ); + } + + /** + * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite) + */ + public void createControl( Composite parent ) + { + Composite composite = new Composite( parent, SWT.NULL ); + composite.setLayout( new GridLayout() ); + composite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); + + fBlock.createControl( composite ); + fBlock.addDoubleClickListener( this ); + fBlock.addSelectionChangedListener( this ); + + setControl( composite ); + } + + /** + * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(SelectionChangedEvent) + */ + public void selectionChanged( SelectionChangedEvent event ) + { + setPageComplete( !event.getSelection().isEmpty() ); + } + + /** + * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(DoubleClickEvent) + */ + public void doubleClick( DoubleClickEvent event ) + { + + } + + protected boolean finish() + { + if ( fBlock != null ) + { + fSourceLocation = fBlock.getSourceLocation(); + } + return ( fSourceLocation != null ); + } + } + /** + * Constructor for AddProjectSourceLocationWizard. + */ + public AddProjectSourceLocationWizard( IProject[] projects ) + { + super(); + fProjects = projects; + } + + /** + * @see org.eclipse.jface.wizard.IWizard#performFinish() + */ + public boolean performFinish() + { + AddProjectSourceLocationWizardPage page = (AddProjectSourceLocationWizardPage)getStartingPage(); + if ( page != null ) + { + return page.finish(); + } + return false; + } + + /** + * @see org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard#getDescription() + */ + public String getDescription() + { + return "Add an existing project to the source locations list."; + } + + /** + * @see org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard#getSourceLocation() + */ + public ICSourceLocation getSourceLocation() + { + return fSourceLocation; + } + + /** + * @see org.eclipse.jface.wizard.IWizard#addPages() + */ + public void addPages() + { + addPage( new AddProjectSourceLocationWizardPage( this ) ); + } +} diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java index d19943743b9..f59b4d167cd 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java @@ -5,47 +5,28 @@ */ package org.eclipse.cdt.debug.internal.ui.wizards; +import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; +import org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard; import org.eclipse.jface.wizard.Wizard; -import org.eclipse.jface.wizard.WizardSelectionPage; -import org.eclipse.swt.widgets.Composite; /** * Enter type comment. * * @since: Dec 20, 2002 */ -public class AddSourceLocationWizard extends Wizard +public class AddSourceLocationWizard extends Wizard implements INewSourceLocationWizard { - /** - * Enter type comment. - * - * @since: Dec 20, 2002 - */ - public class SourceLocationSelectionPage extends WizardSelectionPage - { + private ICSourceLocation[] fLocations = null; - /** - * Constructor for SourceLocationSelectionPage. - * @param pageName - */ - public SourceLocationSelectionPage( String pageName ) - { - super( pageName ); - } - - /* (non-Javadoc) - * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite) - */ - public void createControl( Composite parent ) - { - } - } /** * Constructor for AddSourceLocationWizard. */ - public AddSourceLocationWizard() + public AddSourceLocationWizard( ICSourceLocation[] locations ) { super(); + setWindowTitle( "Add Source Location" ); + setForcePreviousAndNextButtons( true ); + fLocations = locations; } /* (non-Javadoc) @@ -61,6 +42,24 @@ public class AddSourceLocationWizard extends Wizard */ public void addPages() { - addPage( new SourceLocationSelectionPage( "Add Source Location" ) ); + addPage( new SourceLocationSelectionPage( fLocations ) ); + } + + public ICSourceLocation getSourceLocation() + { + SourceLocationSelectionPage page = (SourceLocationSelectionPage)getStartingPage(); + if ( page != null ) + { + return page.getSourceLocation(); + } + return null; + } + + /** + * @see org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard#getDescription() + */ + public String getDescription() + { + return ""; } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java new file mode 100644 index 00000000000..9632125752f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java @@ -0,0 +1,222 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.internal.ui.wizards; + +import java.util.ArrayList; + +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; +import org.eclipse.cdt.debug.core.sourcelookup.IProjectSourceLocation; +import org.eclipse.cdt.debug.internal.ui.CDebugImages; +import org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.wizard.IWizardNode; +import org.eclipse.jface.wizard.WizardSelectionPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Table; + +/** + * + * Enter type comment. + * + * @since Dec 24, 2002 + */ +public class SourceLocationSelectionPage extends WizardSelectionPage + implements ISelectionChangedListener, + IDoubleClickListener +{ + private static final String PAGE_NAME = "Add Source Location"; + private final static int SIZING_LISTS_HEIGHT = 200; + private final static int SIZING_LISTS_WIDTH = 150; + + protected TableViewer fWizardSelectionViewer; + + protected Object[] fElements = null; + + /** + * Constructor for SourceLocationSelectionPage. + * @param pageName + */ + public SourceLocationSelectionPage( ICSourceLocation[] locations ) + { + super( PAGE_NAME ); + setTitle( "Select" ); + setImageDescriptor( CDebugImages.DESC_WIZBAN_ADD_SOURCE_LOCATION ); + fElements = new Object[] { new AddProjectSourceLocationWizard( getProjectList( locations ) ), + new AddDirectorySourceLocationWizard() }; + } + + /** + * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite) + */ + public void createControl( Composite parent ) + { + // create composite for page. + Composite outerContainer = new Composite( parent, SWT.NONE ); + outerContainer.setLayout( new GridLayout() ); + outerContainer.setLayoutData( new GridData( GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL ) ); + + new Label( outerContainer, SWT.NONE ).setText( "Select source location type:" ); + + //Create a table for the list + Table table = new Table( outerContainer, SWT.BORDER ); + GridData data = new GridData( GridData.FILL_HORIZONTAL ); + data.widthHint = SIZING_LISTS_WIDTH; + data.heightHint = SIZING_LISTS_HEIGHT; + table.setLayoutData( data ); + + // the list viewer + fWizardSelectionViewer = new TableViewer( table ); + fWizardSelectionViewer.setContentProvider( new IStructuredContentProvider() + { + public Object[] getElements( Object inputElement ) + { + return fElements; + } + + public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) + { + } + + public void dispose() + { + } + } ); + fWizardSelectionViewer.setLabelProvider( new LabelProvider() + { + public String getText( Object element ) + { + if ( element instanceof AddProjectSourceLocationWizard ) + { + return "Existing Project Into Workspace"; + } + if ( element instanceof AddDirectorySourceLocationWizard ) + { + return "File System Directory"; + } + return super.getText( element ); + } + + /** + * @see org.eclipse.jface.viewers.LabelProvider#getImage(Object) + */ + public Image getImage(Object element) + { + if ( element instanceof AddProjectSourceLocationWizard ) + { + return CDebugImages.get( CDebugImages.IMG_TOOLS_ADD_PRJ_SOURCE_LOCATION ); + } + if ( element instanceof AddDirectorySourceLocationWizard ) + { + return CDebugImages.get( CDebugImages.IMG_TOOLS_ADD_DIR_SOURCE_LOCATION ); + } + return super.getImage( element ); + } + } ); + fWizardSelectionViewer.addSelectionChangedListener( this ); + fWizardSelectionViewer.addDoubleClickListener( this ); + + fWizardSelectionViewer.setInput( fElements ); + + fWizardSelectionViewer.setSelection( new StructuredSelection( fElements[0] ) ); + + setControl( outerContainer ); + } + + /** + * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(SelectionChangedEvent) + */ + public void selectionChanged( SelectionChangedEvent event ) + { + setErrorMessage( null ); + IStructuredSelection selection = (IStructuredSelection)event.getSelection(); + INewSourceLocationWizard currentWizardSelection = (INewSourceLocationWizard)selection.getFirstElement(); + if ( currentWizardSelection == null ) + { + setMessage( null ); + setSelectedNode( null ); + return; + } + + setSelectedNode( createWizardNode( currentWizardSelection ) ); + setMessage( currentWizardSelection.getDescription() ); + } + + /** + * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(DoubleClickEvent) + */ + public void doubleClick( DoubleClickEvent event ) + { + selectionChanged( new SelectionChangedEvent( fWizardSelectionViewer, fWizardSelectionViewer.getSelection() ) ); + getContainer().showPage( getNextPage() ); + } + + private IWizardNode createWizardNode( INewSourceLocationWizard wizard ) + { + return new SourceLocationWizardNode( wizard ); + } + + /** + * @see org.eclipse.jface.dialogs.IDialogPage#dispose() + */ + public void dispose() + { + if ( fElements != null ) + { + for ( int i = 0; i < fElements.length; ++i ) + { + ((INewSourceLocationWizard)fElements[i]).dispose(); + } + fElements = null; + } + super.dispose(); + } + + public ICSourceLocation getSourceLocation() + { + return ((INewSourceLocationWizard)getSelectedNode().getWizard()).getSourceLocation(); + } + + private IProject[] getProjectList( ICSourceLocation[] locations ) + { + ArrayList projects = new ArrayList( locations.length ); + for ( int i = 0; i < locations.length; ++i ) + { + if ( locations[i] instanceof IProjectSourceLocation ) + { + projects.add( ((IProjectSourceLocation)locations[i]).getProject() ); + } + } + IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + ArrayList result = new ArrayList( allProjects.length ); + for ( int i = 0; i < allProjects.length; ++i ) + { + if ( ( CoreModel.getDefault().hasCNature( allProjects[i] ) || CoreModel.getDefault().hasCNature( allProjects[i] ) ) && + allProjects[i].isOpen() && + !projects.contains( allProjects[i] ) ) + { + result.add( allProjects[i] ); + } + } + return (IProject[])result.toArray( new IProject[result.size()] ); + } +} diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationWizardNode.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationWizardNode.java new file mode 100644 index 00000000000..a56190eb692 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationWizardNode.java @@ -0,0 +1,61 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.internal.ui.wizards; + +import org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard; +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.IWizardNode; +import org.eclipse.swt.graphics.Point; + +/** + * + * Enter type comment. + * + * @since Dec 25, 2002 + */ +public class SourceLocationWizardNode implements IWizardNode +{ + private INewSourceLocationWizard fWizard = null; + + /** + * Constructor for SourceLocationWizardNode. + */ + public SourceLocationWizardNode( INewSourceLocationWizard wizard ) + { + fWizard = wizard; + } + + /** + * @see org.eclipse.jface.wizard.IWizardNode#dispose() + */ + public void dispose() + { + } + + /** + * @see org.eclipse.jface.wizard.IWizardNode#getExtent() + */ + public Point getExtent() + { + return new Point( -1, -1 ); + } + + /** + * @see org.eclipse.jface.wizard.IWizardNode#getWizard() + */ + public IWizard getWizard() + { + return fWizard; + } + + /** + * @see org.eclipse.jface.wizard.IWizardNode#isContentCreated() + */ + public boolean isContentCreated() + { + return ( fWizard != null && fWizard.getPageCount() > 0 ); + } +} diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationDialog.java deleted file mode 100644 index d31732476ad..00000000000 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/AttachSourceLocationDialog.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - *(c) Copyright QNX Software Systems Ltd. 2002. - * All Rights Reserved. - * - */ -package org.eclipse.cdt.debug.ui.sourcelookup; - -import java.text.MessageFormat; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Shell; - -/** - * Enter type comment. - * - * @since: Dec 12, 2002 - */ -public class AttachSourceLocationDialog extends Dialog -{ - private IPath fLocationPath = null; - private IPath fAssociationPath = null; - private AttachSourceLocationBlock fAttachBlock; - - /** - * Constructor for AttachSourceLocationDialog. - * @param parentShell - */ - public AttachSourceLocationDialog( Shell parentShell ) - { - super( parentShell ); - fAttachBlock = new AttachSourceLocationBlock(); - } - - /* (non-Javadoc) - * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(Composite) - */ - protected Control createDialogArea( Composite parent ) - { - Composite composite = (Composite)super.createDialogArea( parent ); - getShell().setText( "Attach Source Location" ); - fAttachBlock.createControl( composite ); - fAttachBlock.setInitialAssociationPath( fAssociationPath ); - - return composite; - } - - public void setInitialPath( IPath path ) - { - fAssociationPath = path; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.dialogs.Dialog#okPressed() - */ - protected void okPressed() - { - String locationString = fAttachBlock.getLocationPath(); - if ( locationString.length() == 0 ) - { - MessageDialog.openError( getShell(), getShell().getText(), "Location directory is not selected" ); - return; - } - if ( !isLocationPathValid( locationString ) ) - { - MessageDialog.openError( getShell(), getShell().getText(), MessageFormat.format( "Invalid path: ''{0}''", new String[] { locationString } ) ); - return; - } - String associationString = fAttachBlock.getAssociationPath(); - if ( !isAssociationPathValid( associationString ) ) - { - MessageDialog.openError( getShell(), getShell().getText(), MessageFormat.format( "Invalid path: ''{0}''", new String[] { associationString } ) ); - return; - } - fLocationPath = getLocation0(); - fAssociationPath = getAssociation0(); - super.okPressed(); - } - - public boolean isLocationPathValid( String pathString ) - { - if ( Path.EMPTY.isValidPath( pathString ) ) - { - Path path = new Path( pathString ); - return path.toFile().exists(); - } - return false; - } - - public boolean isAssociationPathValid( String pathString ) - { - if ( pathString.length() > 0 ) - { - return Path.EMPTY.isValidPath( pathString ); - } - return true; - } - - public IPath getLocation() - { - return fLocationPath; - } - - private IPath getLocation0() - { - if ( Path.EMPTY.isValidPath( fAttachBlock.getLocationPath() ) ) - { - return new Path( fAttachBlock.getLocationPath() ); - } - return null; - } - - public IPath getAssociation() - { - return fAssociationPath; - } - - private IPath getAssociation0() - { - if ( Path.EMPTY.isValidPath( fAttachBlock.getAssociationPath() ) ) - { - return new Path( fAttachBlock.getAssociationPath() ); - } - return null; - } -} 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 a44cd63fbc8..a72876d3e88 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 @@ -10,15 +10,18 @@ import java.text.MessageFormat; import org.eclipse.cdt.debug.core.model.IStackFrameInfo; import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator; import org.eclipse.cdt.debug.core.sourcelookup.ISourceMode; -import org.eclipse.cdt.debug.internal.core.sourcelookup.CDirectorySourceLocation; import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLocator; import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager; +import org.eclipse.cdt.debug.internal.ui.wizards.AddDirectorySourceLocationWizard; +import org.eclipse.cdt.debug.internal.ui.wizards.AddSourceLocationWizard; import org.eclipse.cdt.debug.ui.CDebugUIPlugin; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.model.IStackFrame; import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -244,19 +247,22 @@ public class CUISourceLocator implements IAdaptable protected void attachSourceLocation( String fileName ) { - AttachSourceLocationDialog dialog = new AttachSourceLocationDialog( CDebugUIPlugin.getActiveWorkbenchShell() ); - Path path = new Path( fileName ); + IPath path = new Path( fileName ); + INewSourceLocationWizard wizard = null; if ( path.isAbsolute() ) { - dialog.setInitialPath( path.removeLastSegments( 1 ) ); + path = path.removeLastSegments( 1 ); + wizard = new AddDirectorySourceLocationWizard( path ); } - if ( dialog.open() == Dialog.OK ) + else { - if ( dialog.getLocation() != null ) - { - fSourceLocator.addSourceLocation( new CDirectorySourceLocation( dialog.getLocation(), dialog.getAssociation() ) ); - fNewLocationAttached = true; - } + wizard = new AddSourceLocationWizard( fSourceLocator.getSourceLocations() ); + } + WizardDialog dialog = new WizardDialog( CDebugUIPlugin.getActiveWorkbenchShell(), wizard ); + if ( dialog.open() == dialog.OK ) + { + fSourceLocator.addSourceLocation( wizard.getSourceLocation() ); + fNewLocationAttached = true; } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/INewSourceLocationWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/INewSourceLocationWizard.java new file mode 100644 index 00000000000..6be96fe88ef --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/INewSourceLocationWizard.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.ui.sourcelookup; + +import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; +import org.eclipse.jface.wizard.IWizard; + +/** + * + * Enter type comment. + * + * @since Dec 25, 2002 + */ +public interface INewSourceLocationWizard extends IWizard +{ + String getDescription(); + ICSourceLocation getSourceLocation(); +} diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java index d8896ee6ab3..7c3ab7db163 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java @@ -6,8 +6,8 @@ package org.eclipse.cdt.debug.ui.sourcelookup; import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; -import org.eclipse.cdt.debug.internal.core.sourcelookup.CDirectorySourceLocation; -import org.eclipse.cdt.debug.internal.core.sourcelookup.CProjectSourceLocation; +import org.eclipse.cdt.debug.core.sourcelookup.IDirectorySourceLocation; +import org.eclipse.cdt.debug.core.sourcelookup.IProjectSourceLocation; import org.eclipse.cdt.debug.internal.ui.CDebugImages; import org.eclipse.cdt.debug.internal.ui.PixelConverter; import org.eclipse.cdt.debug.internal.ui.dialogfields.DialogField; @@ -51,24 +51,24 @@ public class SourceLookupBlock { public String getText( Object element ) { - if ( element instanceof CProjectSourceLocation ) + if ( element instanceof IProjectSourceLocation ) { - return ((CProjectSourceLocation)element).getProject().getName(); + return ((IProjectSourceLocation)element).getProject().getName(); } - if ( element instanceof CDirectorySourceLocation ) + if ( element instanceof IDirectorySourceLocation ) { - return ((CDirectorySourceLocation)element).getDirectory().toOSString(); + return ((IDirectorySourceLocation)element).getDirectory().toOSString(); } return null; } public Image getImage( Object element ) { - if ( element instanceof CProjectSourceLocation ) + if ( element instanceof IProjectSourceLocation ) { return CDebugImages.get( CDebugImages.IMG_OBJS_PROJECT ); } - if ( element instanceof CDirectorySourceLocation ) + if ( element instanceof IDirectorySourceLocation ) { return CDebugImages.get( CDebugImages.IMG_OBJS_FOLDER ); } @@ -88,23 +88,20 @@ public class SourceLookupBlock String[] buttonLabels = new String[] { /* 0 */ "Add...", - /* 1 */ "Edit...", - /* 2 */ null, - /* 3 */ "Up", - /* 4 */ "Down", - /* 5 */ null, - /* 6 */ "Remove", + /* 1 */ null, + /* 2 */ "Up", + /* 3 */ "Down", + /* 4 */ null, + /* 5 */ "Remove", }; SourceLookupAdapter adapter = new SourceLookupAdapter(); fSourceListField = new ListDialogField( adapter, buttonLabels, new SourceLookupLabelProvider() ); fSourceListField.setLabelText( "Source Locations" ); - fSourceListField.setUpButtonIndex( 3 ); - fSourceListField.setDownButtonIndex( 4 ); - fSourceListField.setRemoveButtonIndex( 6 ); - - fSourceListField.enableButton( 1, false ); + fSourceListField.setUpButtonIndex( 2 ); + fSourceListField.setDownButtonIndex( 3 ); + fSourceListField.setRemoveButtonIndex( 5 ); } public void createControl( Composite parent ) @@ -155,15 +152,18 @@ public class SourceLookupBlock { } - protected ICSourceLocation[] getSourceLocations() + public ICSourceLocation[] getSourceLocations() { return (ICSourceLocation[])fSourceListField.getElements().toArray( new ICSourceLocation[fSourceListField.getElements().size()] ); } private void addSourceLocation() { - AddSourceLocationWizard wizard = new AddSourceLocationWizard(); + AddSourceLocationWizard wizard = new AddSourceLocationWizard( getSourceLocations() ); WizardDialog dialog = new WizardDialog( fControl.getShell(), wizard ); - dialog.open(); + if ( dialog.open() == dialog.OK ) + { + fSourceListField.addElement( wizard.getSourceLocation() ); + } } }