in org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueRepositoryQueryPage.java [140:209]
private void createOptionsArea(Composite parent) {
Composite optionsArea = new Composite(parent, SWT.NONE);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(optionsArea);
GridDataFactory.fillDefaults().grab(true, true).applyTo(optionsArea);
Composite statusArea = new Composite(optionsArea, SWT.NONE);
GridLayoutFactory.fillDefaults().numColumns(4).equalWidth(false)
.applyTo(statusArea);
GridDataFactory.fillDefaults().grab(true, false).span(2, 1)
.applyTo(statusArea);
new Label(statusArea, SWT.NONE)
.setText(Messages.IssueRepositoryQueryPage_StatusLabel);
openButton = new Button(statusArea, SWT.CHECK);
openButton.setSelection(true);
openButton.setText(Messages.IssueRepositoryQueryPage_StatusOpen);
openButton.addSelectionListener(completeListener);
closedButton = new Button(statusArea, SWT.CHECK);
closedButton.setSelection(true);
closedButton.setText(Messages.IssueRepositoryQueryPage_StatusClosed);
closedButton.addSelectionListener(completeListener);
ToolBar toolbar = new ToolBar(statusArea, SWT.FLAT);
ToolItem updateItem = new ToolItem(toolbar, SWT.PUSH);
final Image updateImage = TasksUiImages.REPOSITORY_UPDATE_CONFIGURATION
.createImage();
toolbar.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
updateImage.dispose();
}
});
updateItem.setImage(updateImage);
updateItem
.setToolTipText(Messages.IssueRepositoryQueryPage_TooltipUpdateRepository);
GridDataFactory.fillDefaults().align(SWT.END, SWT.FILL)
.grab(true, false).applyTo(toolbar);
updateItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
refreshRepository();
}
});
Label milestonesLabel = new Label(optionsArea, SWT.NONE);
milestonesLabel
.setText(Messages.IssueRepositoryQueryPage_MilestoneLabel);
milestoneCombo = new Combo(optionsArea, SWT.DROP_DOWN | SWT.READ_ONLY);
GridDataFactory.fillDefaults().grab(true, false)
.applyTo(milestoneCombo);
Label assigneeLabel = new Label(optionsArea, SWT.NONE);
assigneeLabel.setText(Messages.IssueRepositoryQueryPage_AssigneeLabel);
assigneeText = new Text(optionsArea, SWT.BORDER | SWT.SINGLE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(assigneeText);
Label mentionLabel = new Label(optionsArea, SWT.NONE);
mentionLabel.setText(Messages.IssueRepositoryQueryPage_MentionsLabel);
mentionText = new Text(optionsArea, SWT.BORDER | SWT.SINGLE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(mentionText);
}