return combo;
}
private SourceViewer createEditor(Composite parent, String pattern) {
SourceViewer viewer= createViewer(parent);
viewer.setEditable(true);
IDocument document= viewer.getDocument();
if (document != null)
document.set(pattern);
else {
document= new Document(pattern);
viewer.setDocument(document);
}
int nLines= document.getNumberOfLines();
if (nLines < 5) {
nLines= 5;
} else if (nLines > 12) {
nLines= 12;
}
Control control= viewer.getControl();
GridData data= new GridData(GridData.FILL_BOTH);
data.widthHint= convertWidthInCharsToPixels(80);
data.heightHint= convertHeightInCharsToPixels(nLines);
control.setLayoutData(data);