public void widgetSelected(SelectionEvent evt) { handleParametersRemoveButtonSelected(); } });
@Override public void widgetSelected(SelectionEvent evt) { handleParametersRemoveButtonSelected(); } });
    public void createControl(Composite parent) {        Font font = parent.getFont();        Composite comp = new Composite(parent, parent.getStyle());        setControl(comp);        GridLayout layout = new GridLayout(1, true);        comp.setLayout(layout);        comp.setFont(font);        Group group = new Group(comp, SWT.NONE);        group.setFont(font);        layout = new GridLayout(4, false);        group.setLayout(layout);        group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));        String controlName = (LauncherUIMessages                .getString("CougaarXMLParametersTab.SocietySelection")); //$NON-NLS-1$        group.setText(controlName);        fSocietyXMLFileLabel = new Label(group, SWT.SINGLE);        fSocietyXMLFileLabel.setText(LauncherUIMessages                .getString("CougaarXMLParametersTab.SocietyFile"));        GridData gd = new GridData(SWT.LEFT);        fSocietyXMLFileLabel.setLayoutData(gd);        fSocietyXMLFileText = new Text(group, SWT.SINGLE | SWT.WRAP                | SWT.BORDER);        fSocietyXMLFileText.setEditable(false);        gd = new GridData(SWT.FILL, SWT.CENTER, true, false);        fSocietyXMLFileText.setLayoutData(gd);        fSocietyXMLFileText.setFont(font);        fSocietyXMLFileText.addModifyListener(new ModifyListener() {            public void modifyText(ModifyEvent evt) {                updateLaunchConfigurationDialog();            }        });        ControlAccessibleListener.addListener(fSocietyXMLFileText, group                .getText());        String buttonLabel = LauncherUIMessages                .getString("CougaarXMLParametersTab.SocietyBrowse"); //$NON-NLS-1$        Button browseSocietyButton = createPushButton(group, buttonLabel, null);        browseSocietyButton.setLayoutData(new GridData(SWT.END, SWT.CENTER,                false, false));        browseSocietyButton.addSelectionListener(new SelectionAdapter() {            public void widgetSelected(SelectionEvent e) {                FileDialog dialog = new FileDialog(getShell());                String newPath = dialog.open();                if (newPath != null) {                    fSocietyXMLFileText.setText(newPath);                }                populateNodeNameList();            }        });        fNodeBlock = new NodeSelectionComboBlock();        fNodeBlock.createControl(group);        fNodeBlock.addSelectionChangedListener(new ISelectionChangedListener() {            public void selectionChanged(SelectionChangedEvent event) {                updateSelectedNode((String) ((StructuredSelection) event                        .getSelection()).getFirstElement());                updateLaunchConfigurationDialog();            }        });        Control control = fNodeBlock.getControl();        gd = new GridData(SWT.FILL, SWT.NONE, true, true);        control.setLayoutData(gd);        createVerticalSpacer(comp, 1);        Composite parametersComp = new Composite(comp, SWT.NONE);        gd = new GridData(GridData.FILL_BOTH);        parametersComp.setLayoutData(gd);        GridLayout parametersLayout = new GridLayout();        parametersLayout.numColumns = 2;        parametersLayout.marginHeight = 0;        parametersLayout.marginWidth = 0;        parametersComp.setLayout(parametersLayout);        parametersComp.setFont(font);        Label parameterLabel = new Label(parametersComp, SWT.NONE);        parameterLabel.setText(LauncherUIMessages                .getString("cougaarlauncher.argumenttab.parameterslabel.text")); //$NON-NLS-1$        gd = new GridData();        gd.horizontalSpan = 2;        parameterLabel.setLayoutData(gd);        parameterLabel.setFont(font);        fParametersTable = new Table(parametersComp, SWT.BORDER | SWT.SINGLE                | SWT.V_SCROLL);        fParametersTable                .setData(ICougaarLaunchConfigurationConstants.ATTR_COUGAAR_VM_PARAMETERS);        TableLayout tableLayout = new TableLayout();        fParametersTable.setLayout(tableLayout);        gd = new GridData(GridData.FILL_BOTH);        fParametersTable.setLayoutData(gd);        TableColumn column1 = new TableColumn(this.fParametersTable, SWT.NONE);        column1                .setText(LauncherUIMessages                        .getString("cougaarlauncher.argumenttab.parameterscolumn.name.text")); //$NON-NLS-1$        TableColumn column2 = new TableColumn(this.fParametersTable, SWT.NONE);        column2                .setText(LauncherUIMessages                        .getString("cougaarlauncher.argumenttab.parameterscolumn.value.text")); //$NON-NLS-1$        tableLayout.addColumnData(new ColumnWeightData(100));        tableLayout.addColumnData(new ColumnWeightData(100));        fParametersTable.setHeaderVisible(true);        fParametersTable.setLinesVisible(true);        fParametersTable.addSelectionListener(fListener);        fParametersTable.addMouseListener(new MouseAdapter() {            public void mouseDoubleClick(MouseEvent e) {                setParametersButtonsEnableState();                if (fParametersEditButton.isEnabled()) {                    handleParametersEditButtonSelected();                }            }        });        Composite envButtonComp = new Composite(parametersComp, SWT.NONE);        GridLayout envButtonLayout = new GridLayout();        envButtonLayout.marginHeight = 0;        envButtonLayout.marginWidth = 0;        envButtonComp.setLayout(envButtonLayout);        gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING                | GridData.HORIZONTAL_ALIGN_FILL);        envButtonComp.setLayoutData(gd);        envButtonComp.setFont(font);        fParametersAddButton = createPushButton(                envButtonComp,                LauncherUIMessages                        .getString("cougaarlauncher.argumenttab.parameters.button.add.text"),                null); //$NON-NLS-1$        fParametersAddButton.addSelectionListener(new SelectionAdapter() {            public void widgetSelected(SelectionEvent evt) {                handleParametersAddButtonSelected();            }        });        fParametersEditButton = createPushButton(                envButtonComp,                LauncherUIMessages                        .getString("cougaarlauncher.argumenttab.parameters.button.edit.text"),                null); //$NON-NLS-1$        fParametersEditButton.addSelectionListener(new SelectionAdapter() {            public void widgetSelected(SelectionEvent evt) {                handleParametersEditButtonSelected();            }        });        fParametersRemoveButton = createPushButton(                envButtonComp,                LauncherUIMessages                        .getString("cougaarlauncher.argumenttab.parameters.button.remove.text"),                null); //$NON-NLS-1$        fParametersRemoveButton.addSelectionListener(new SelectionAdapter() {            public void widgetSelected(SelectionEvent evt) {                handleParametersRemoveButtonSelected();            }        });        fLoadDefaultArgumentsButton = createPushButton(                envButtonComp,                LauncherUIMessages                        .getString("CougaarXMLParametersTab.LoadDefaultArguments"),                null);        fLoadDefaultArgumentsButton                .addSelectionListener(new SelectionAdapter() {                    public void widgetSelected(SelectionEvent evt) {                        displayDefaultCougaarParameters();                    }                });        fLoadXMLArgumentsButton = createPushButton(envButtonComp,                LauncherUIMessages                        .getString("CougaarXMLParametersTab.LoadXMLArguments"),                null);        fLoadXMLArgumentsButton.addSelectionListener(new SelectionAdapter() {            public void widgetSelected(SelectionEvent evt) {                handleLoadArgumentsFromFileButtonSelected();            }        });        createVerticalSpacer(comp, 1);        fWorkingDirectoryBlock.createControl(comp);    }