X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPArgumentsTab.java b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPArgumentsTab.java index 2368be5..0626c18 100644 --- a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPArgumentsTab.java +++ b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPArgumentsTab.java @@ -21,6 +21,7 @@ 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.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; @@ -31,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(); } @@ -38,22 +64,24 @@ public class PHPArgumentsTab extends AbstractLaunchConfigurationTab { public void createControl(Composite parent) { Composite composite = createPageRoot(parent); - new Label(composite, SWT.NONE).setText(PHPDebugUiMessages +// new Label(composite, SWT.NONE).setText(PHPDebugUiMessages +// .getString("LaunchConfigurationTab.PHPArguments.working_dir")); +// workingDirectorySelector = new DirectorySelector(composite); + Group grpWorkingDir = new Group(composite, SWT.NONE); + grpWorkingDir.setText(PHPDebugUiMessages .getString("LaunchConfigurationTab.PHPArguments.working_dir")); - workingDirectorySelector = new DirectorySelector(composite); + grpWorkingDir.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + grpWorkingDir.setLayout(new GridLayout()); + workingDirectorySelector = new DirectorySelector(grpWorkingDir); workingDirectorySelector .setBrowseDialogMessage(PHPDebugUiMessages .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(composite, - SWT.NONE); + Composite defaultWorkingDirectoryComposite = new Composite( + grpWorkingDir, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; defaultWorkingDirectoryComposite.setLayout(layout); @@ -66,24 +94,41 @@ 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(); - - new Label(composite, SWT.NONE) - .setText(PHPDebugUiMessages - .getString("LaunchConfigurationTab.PHPArguments.interpreter_args_box_title")); - interpreterArgsText = new Text(composite, SWT.MULTI | SWT.V_SCROLL - | SWT.BORDER); + workingDirectorySelector.addModifyListener(fListener); + + +// new Label(composite, SWT.NONE) +// .setText(PHPDebugUiMessages +// .getString("LaunchConfigurationTab.PHPArguments.interpreter_args_box_title")); + Group grpArgs = new Group(composite, SWT.NONE); + grpArgs.setText(PHPDebugUiMessages + .getString("LaunchConfigurationTab.PHPArguments.interpreter_args_box_title")); + grpArgs.setLayoutData(new GridData(GridData.FILL_BOTH)); + grpArgs.setLayout(new GridLayout()); + interpreterArgsText = new Text(grpArgs, SWT.MULTI | SWT.V_SCROLL + | SWT.BORDER | SWT.WRAP); interpreterArgsText.setLayoutData(new GridData(GridData.FILL_BOTH)); - - new Label(composite, SWT.NONE) - .setText(PHPDebugUiMessages - .getString("LaunchConfigurationTab.PHPArguments.program_args_box_title")); - programArgsText = new Text(composite, SWT.MULTI | SWT.V_SCROLL - | SWT.BORDER); + interpreterArgsText.addModifyListener(fListener); + + +// new Label(composite, SWT.NONE) +// .setText(PHPDebugUiMessages +// .getString("LaunchConfigurationTab.PHPArguments.program_args_box_title")); + Group grpProgArgs = new Group(composite, SWT.NONE); + grpProgArgs.setText(PHPDebugUiMessages + .getString("LaunchConfigurationTab.PHPArguments.program_args_box_title")); + grpProgArgs.setLayoutData(new GridData(GridData.FILL_BOTH)); + grpProgArgs.setLayout(new GridLayout()); + 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) { @@ -146,7 +191,7 @@ public class PHPArgumentsTab extends AbstractLaunchConfigurationTab { protected Composite createPageRoot(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout compositeLayout = new GridLayout(); - compositeLayout.marginWidth = 0; +// compositeLayout.marginWidth = 0; compositeLayout.numColumns = 1; composite.setLayout(compositeLayout);