private void handleLogCategoryChange(LogCategoryExt logCategoryExt) {
// fchang: hook for display diff log category w/o requesting server again. - per bill: not possible
// w/o refactoring server-side code.
logLevelScale.setEnabled(true); // enable scale only after logCategory is set.
LoggingInfo loggingInfo =
loggingService.getLoggingInfoByCategory(project, logCategoryExt, supportedFeatureEnum);
setLoggingInfo(loggingInfo);
}
@Override
public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) {}
});
// 3. Log level label
CLabel logLevel = new CLabel(loggingComposite, SWT.NONE);
logLevel.setText("Log level: --");
logLevel.setLayoutData(new GridData(SWT.BEGINNING));
// 4. Log levels scale
logLevelScale = new Scale(loggingComposite, SWT.NULL);
logLevelScale.setIncrement(1);
logLevelScale.setMaximum(7);
logLevelScale.setEnabled(false);
logLevelScale.setPageIncrement(1);
logLevelScale.setLayoutData(new GridData(SWT.BEGINNING));
logLevelScale.addListener(SWT.Selection, new Listener() {
@Override
public void handleEvent(Event event) {
LoggingInfo loggingInfo =
LoggingInfo.getLoggingInfo(logLevelScale.getSelection(), logCategoryCombo.getText());
loggingService.setLoggingInfo(project, loggingInfo, supportedFeatureEnum);
logLevelDesc.setText(PLUS_PREFIX + loggingInfo.getLevelLabelText());
layout(true, true);
}
});
// 5. Log level description label