in org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/RetrieveComposite.java [54:106]
public RetrieveComposite(Composite parent, int style, boolean withConf, IProject project) {
super(parent, style);
GridLayout layout = new GridLayout(2, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
setLayout(layout);
retrievePatternText = new PathEditor(this, SWT.NONE, "Retrieve pattern", project, null) {
private Button addPattern;
protected boolean addButtons(Composite buttons) {
addPattern = new Button(buttons, SWT.NONE);
addPattern.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
addPattern.setText("Add def. pattern");
addPattern.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
getText().setText(getText().getText() + DEFAULT_PATTERN);
}
});
return true;
}
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
addPattern.setEnabled(enabled);
}
};
retrievePatternText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false,
2, 1));
retrievePatternText.setToolTipText(TOOLTIP_RETRIEVE_PATTERN);
retrieveSyncButton = new Button(this, SWT.CHECK);
retrieveSyncButton.setText("Delete old retrieved artifacts");
retrieveSyncButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,
2, 1));
if (withConf) {
Label label = new Label(this, SWT.NONE);
label.setText("Configurations:");
confsText = new Text(this, SWT.SINGLE | SWT.BORDER);
confsText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
confsText.setToolTipText(TOOLTIP_RETRIEVE_CONFS);
}
Label label = new Label(this, SWT.NONE);
label.setText("Types:");
typesText = new Text(this, SWT.SINGLE | SWT.BORDER);
typesText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
typesText.setToolTipText(TOOLTIP_RETRIEVE_TYPES);
}