Added some more JUnit tests
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / control / dialogs / CreateSessionDialog.java
index 1a3073a8de8cb88ee68edd219cbcdae30d0938b2..ae9e88c972320de8341faabb219e79b7741a812f 100644 (file)
@@ -87,11 +87,9 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog
     /**
      * Constructor
      * @param shell - a shell for the display of the dialog
-     * @param parent - trace control parent for validation of session name
      */
-    public CreateSessionDialog(Shell shell, TraceSessionGroup parent) {
+    public CreateSessionDialog(Shell shell) {
         super(shell);
-        fParent = parent;
     }
 
     // ------------------------------------------------------------------------
@@ -124,6 +122,15 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog
         return fIsDefaultPath;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.lttng.ui.views.control.dialogs.ICreateSessionDialog#setTraceSessionGroup(org.eclipse.linuxtools.lttng.ui.views.control.model.impl.TraceSessionGroup)
+     */
+    @Override
+    public void setTraceSessionGroup(TraceSessionGroup group) {
+        fParent = group;
+    }
+
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
@@ -224,7 +231,7 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog
         }
 
         // Check for invalid names
-        if (!fSessionName.matches("^[a-zA-Z0-9\\-\\_]{2,}$")) { //$NON-NLS-1$
+        if (!fSessionName.matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$
             MessageDialog.openError(getShell(),
                     Messages.TraceControl_CreateSessionDialogTitle,
                     Messages.TraceControl_InvalidSessionNameError + " (" + fSessionName + ") \n");  //$NON-NLS-1$ //$NON-NLS-2$
This page took 0.02422 seconds and 5 git commands to generate.