+ String temp = fLogLevelEventNameText.getText();
+ if (temp.isEmpty() ||
+ temp.matches("\\s*") || //$NON-NLS-1$
+ (!temp.matches("^[\\s]{0,}$") && !temp.matches("^[a-zA-Z0-9\\-\\_]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_InvalidLogLevelEventNameError + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return false;
+ }
+
+ fLogLevelEventName = temp;
+
+ TraceLogLevel[] levels = TraceLogLevel.values();
+ int id = fLogLevelCombo.getSelectionIndex();
+
+ if (id < 0) {
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_InvalidLogLevel + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return false;
+ }
+ fLogLevel = levels[id];