Adds a private listener class to the Arguments tab and an appropriate listener to...
authormbowie <mbowie>
Sat, 31 May 2008 02:28:14 +0000 (02:28 +0000)
committermbowie <mbowie>
Sat, 31 May 2008 02:28:14 +0000 (02:28 +0000)
net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPArgumentsTab.java

index ad11c41..0626c18 100644 (file)
@@ -32,6 +32,31 @@ public class PHPArgumentsTab extends AbstractLaunchConfigurationTab {
 
        protected Button useDefaultWorkingDirectoryButton;
 
+       private class ArgumentsTabListener extends SelectionAdapter implements
+                       ModifyListener {
+
+               /*
+                * (non-Javadoc)
+                * 
+                * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+                */
+               public void modifyText(ModifyEvent e) {
+                       updateLaunchConfigurationDialog();
+               }
+
+               /*
+                * (non-Javadoc)
+                * 
+                * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+                */
+               public void widgetSelected(SelectionEvent e) {
+                       updateLaunchConfigurationDialog();
+               }
+
+       }
+
+       private ArgumentsTabListener fListener = new ArgumentsTabListener();
+
        public PHPArgumentsTab() {
                super();
        }
@@ -53,11 +78,7 @@ public class PHPArgumentsTab extends AbstractLaunchConfigurationTab {
                                                .getString("LaunchConfigurationTab.PHPArguments.working_dir_browser_message"));
                workingDirectorySelector.setLayoutData(new GridData(
                                GridData.FILL_HORIZONTAL));
-               workingDirectorySelector.addModifyListener(new ModifyListener() {
-                       public void modifyText(ModifyEvent e) {
-                               updateLaunchConfigurationDialog();
-                       }
-               });
+               workingDirectorySelector.addModifyListener(fListener);
 
                Composite defaultWorkingDirectoryComposite = new Composite(
                                grpWorkingDir, SWT.NONE);
@@ -73,11 +94,15 @@ public class PHPArgumentsTab extends AbstractLaunchConfigurationTab {
                                                                .getSelection());
                                        }
                                });
+               useDefaultWorkingDirectoryButton.addSelectionListener(fListener);
+               
                new Label(defaultWorkingDirectoryComposite, SWT.NONE)
                                .setText(PHPDebugUiMessages
                                                .getString("LaunchConfigurationTab.PHPArguments.working_dir_use_default_message"));
                defaultWorkingDirectoryComposite.pack();
+               workingDirectorySelector.addModifyListener(fListener);
 
+               
 //             new Label(composite, SWT.NONE)
 //                             .setText(PHPDebugUiMessages
 //                                             .getString("LaunchConfigurationTab.PHPArguments.interpreter_args_box_title"));
@@ -89,7 +114,9 @@ public class PHPArgumentsTab extends AbstractLaunchConfigurationTab {
                interpreterArgsText = new Text(grpArgs, SWT.MULTI | SWT.V_SCROLL
                                | SWT.BORDER | SWT.WRAP);
                interpreterArgsText.setLayoutData(new GridData(GridData.FILL_BOTH));
+               interpreterArgsText.addModifyListener(fListener);
 
+               
 //             new Label(composite, SWT.NONE)
 //                             .setText(PHPDebugUiMessages
 //                                             .getString("LaunchConfigurationTab.PHPArguments.program_args_box_title"));
@@ -101,6 +128,7 @@ public class PHPArgumentsTab extends AbstractLaunchConfigurationTab {
                programArgsText = new Text(grpProgArgs, SWT.MULTI | SWT.V_SCROLL
                                | SWT.BORDER | SWT.WRAP);
                programArgsText.setLayoutData(new GridData(GridData.FILL_BOTH));
+               programArgsText.addModifyListener(fListener);
        }
 
        protected void setUseDefaultWorkingDirectory(boolean useDefault) {