//Label padding = new Label(configSection,SWT.NULL);
//gridData = new GridData(GridData.FILL_HORIZONTAL);
//padding.setLayoutData(gridData);
Button btnConfig = new Button(configSection, SWT.PUSH);
Messages.setLanguageText(btnConfig, "plugins.basicview.config");
btnConfig.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
if (uiFunctions != null) {
uiFunctions.openView(UIFunctions.VIEW_CONFIG,
model.getConfigSectionID());
}
}
});
btnConfig.setLayoutData(new GridData());
}
if(model.getLogArea().getVisible()) {
Label logTitle = new Label(topSection,SWT.NULL);
Messages.setLanguageText(logTitle,"plugins.basicview.log");
// gridData = new GridData(GridData.FILL_HORIZONTAL);
// gridData.horizontalSpan = 1;
// logTitle.setLayoutData(gridData);
Button button = new Button( topSection, SWT.PUSH );
Messages.setLanguageText(button,"plugins.basicview.clear");
button.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event)
{
model.getLogArea().setText("");
}});
log = new StyledText(panel,SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
gridData = new GridData(GridData.FILL_BOTH);
gridData.horizontalSpan = 2;
log.setLayoutData(gridData);
//String text = model.getLogArea().getText().trim();
//log.setText( text);
//log.setTopIndex(log.getLineCount());
model.getLogArea().addPropertyChangeListener(this);
Composite bottomSection = new Composite(panel, SWT.NONE);
gridLayout = new GridLayout();
gridLayout.numColumns = 3;
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
bottomSection.setLayout(gridLayout);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 2;
bottomSection.setLayoutData(gridData);
// include
Label label = new Label(bottomSection, SWT.NONE);
label.setLayoutData(new GridData());
Messages.setLanguageText(label, "LoggerView.includeOnly");
final Text inclText = new Text(bottomSection, SWT.BORDER);
gridData = new GridData();
gridData.widthHint = 200;
inclText.setLayoutData(gridData);
inclText.addModifyListener(new ModifyListener()
{
public void modifyText(ModifyEvent e) {
String newExpression = inclText.getText();
if (newExpression.length() == 0)
inclusionFilter = null;
else
{
try
{
inclusionFilter = Pattern.compile(newExpression, Pattern.CASE_INSENSITIVE);
inclText.setBackground(null);
} catch (PatternSyntaxException e1)
{
inclText.setBackground(Colors.colorErrorBG);
}
}
}
});
label = new Label(bottomSection, SWT.NONE);
// exclude
label = new Label(bottomSection, SWT.NONE);
label.setLayoutData(new GridData());
Messages.setLanguageText(label, "LoggerView.excludeAll");
final Text exclText = new Text(bottomSection, SWT.BORDER);
gridData = new GridData();
gridData.widthHint = 200;
exclText.setLayoutData(gridData);
exclText.addModifyListener(new ModifyListener()
{
public void modifyText(ModifyEvent e) {
String newExpression = exclText.getText();
if (newExpression.length() == 0)
exclusionFilter = null;
else
{
try
{
exclusionFilter = Pattern.compile(newExpression, Pattern.CASE_INSENSITIVE);
exclText.setBackground(null);
} catch (PatternSyntaxException e1)
{
exclText.setBackground(Colors.colorErrorBG);
}
}
}
});
label = new Label(bottomSection, SWT.NONE);
// pause
Button buttonPause = new Button(bottomSection, SWT.CHECK);
Messages.setLanguageText(buttonPause, "LoggerView.pause");
gridData = new GridData();
buttonPause.setLayoutData(gridData);
buttonPause.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.widget == null || !(e.widget instanceof Button))
return;
Button btn = (Button) e.widget;
paused = btn.getSelection();