in org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvydeContainerPage.java [330:383]
private Control createMainTab(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
// CheckStyle:MagicNumber| OFF
Composite configComposite = new Composite(composite, SWT.NONE);
configComposite.setLayout(new GridLayout(2, false));
configComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
ivyFilePathText = new IvyFilePathText(configComposite, SWT.NONE, project == null ? null
: project.getProject());
ivyFilePathText.addListener(new IvyXmlPathListener() {
public void ivyXmlPathUpdated(String path) {
conf.setIvyXmlPath(path);
checkIvyXmlPath();
}
});
ivyFilePathText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2,
1));
// Label for ivy configurations field
Label confLabel = new Label(configComposite, SWT.NONE);
confLabel.setText("Configurations");
// table for configuration selection
confTableViewer = new ConfTableViewer(configComposite, SWT.NONE);
confTableViewer.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
confTableViewer.addListener(new ConfTableListener() {
public void confTableUpdated(List<String> confs) {
checkCompleted();
}
});
// refresh
Button refreshConf = new Button(configComposite, SWT.NONE);
refreshConf.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false, 2, 1));
refreshConf.setText("Reload the list of configurations");
refreshConf.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent ev) {
ModuleDescriptor md;
try {
md = state.getModuleDescriptor();
} catch (IvyDEException e) {
md = null;
e.show(IStatus.ERROR, "Ivy configuration error",
"The configurations of the ivy.xml file could not be retrieved: ");
}
confTableViewer.setModuleDescriptor(md);
}
});
return composite;
}