Search in sources :

Example 1 with IParameterListChangeListener

use of org.eclipse.jdt.internal.ui.refactoring.IParameterListChangeListener in project xtext-xtend by eclipse.

the class ExtractMethodUserInputPage method createParameterControl.

protected void createParameterControl(Composite result) {
    if (!refactoring.getParameterInfos().isEmpty()) {
        ChangeParametersControl cp = new ChangeParametersControl(result, SWT.NONE, "Parameters", new IParameterListChangeListener() {

            @Override
            public void parameterChanged(ParameterInfo parameter) {
                parameterModified();
            }

            @Override
            public void parameterListChanged() {
                parameterModified();
            }

            @Override
            public void parameterAdded(ParameterInfo parameter) {
                updatePreview();
            }
        }, ChangeParametersControl.Mode.EXTRACT_METHOD);
        GridData gridData = new GridData(GridData.FILL_BOTH);
        gridData.horizontalSpan = 2;
        cp.setLayoutData(gridData);
        cp.setInput(refactoring.getParameterInfos());
    }
}
Also used : IParameterListChangeListener(org.eclipse.jdt.internal.ui.refactoring.IParameterListChangeListener) GridData(org.eclipse.swt.layout.GridData) ParameterInfo(org.eclipse.jdt.internal.corext.refactoring.ParameterInfo) ChangeParametersControl(org.eclipse.jdt.internal.ui.refactoring.ChangeParametersControl)

Aggregations

ParameterInfo (org.eclipse.jdt.internal.corext.refactoring.ParameterInfo)1 ChangeParametersControl (org.eclipse.jdt.internal.ui.refactoring.ChangeParametersControl)1 IParameterListChangeListener (org.eclipse.jdt.internal.ui.refactoring.IParameterListChangeListener)1 GridData (org.eclipse.swt.layout.GridData)1