* @param shell - a shell for the display of the dialog
*/
public CreateChannelDialog(Shell shell) {
- this(shell, null);
- }
-
-
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- * @param domain - a domain to create channel on. Use null for creating a channel on session level.
- */
- public CreateChannelDialog(Shell shell, TraceDomainComponent domain) {
- super(shell);
- fDomain = domain;
- if (fDomain != null) {
- fIsKernel = fDomain.isKernel();
- } else {
- fIsKernel = true;
- }
+ super(shell);
+ fIsKernel = true;
// Common verify listener
fVerifyListener = new VerifyListener() {
return fChannelInfo;
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.lttng.ui.views.control.dialogs.ICreateChannelDialog#setDomainComponent(org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceDomainComponent)
+ */
+ @Override
+ public void setDomainComponent(TraceDomainComponent domain) {
+ fDomain = domain;
+ if (fDomain != null) {
+ fIsKernel = fDomain.isKernel();
+ } else {
+ fIsKernel = true;
+ }
+ }
+
/*
* (non-Javadoc)
* @see org.eclipse.linuxtools.lttng.ui.views.control.dialogs.ICreateChannelOnSessionDialog#isKernel()
Label channelNameLabel = new Label(fDialogComposite, SWT.RIGHT);
channelNameLabel.setText(Messages.TraceControl_EnableChannelNameLabel);
fChannelNameText = new Text(fDialogComposite, SWT.NONE);
- fChannelNameText.setToolTipText(Messages.TraceControl_EnableChannelNameLabelTooltip);
+ fChannelNameText.setToolTipText(Messages.TraceControl_EnableChannelNameTooltip);
Label subBufferSizeLabel = new Label(fDialogComposite, SWT.RIGHT);
subBufferSizeLabel.setText(Messages.TraceControl_SubBufferSizePropertyName);
}
// Check for invalid names
- if (!fChannelInfo.getName().matches("^[a-zA-Z0-9\\-\\_]{2,}$")) { //$NON-NLS-1$
+ if (!fChannelInfo.getName().matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$
MessageDialog.openError(getShell(),
Messages.TraceControl_EnableChannelDialogTitle,
Messages.TraceControl_InvalidChannelNameError + " (" + fChannelInfo.getName() + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$