ROOTSTRAP: DLG: Validate information for creating rootstrap
authordonghyuk.yang <donghyuk.yang@samsung.com>
Thu, 27 Feb 2014 10:13:08 +0000 (19:13 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Thu, 27 Feb 2014 10:13:08 +0000 (19:13 +0900)
Added validation process about rootstrap information and show error
message on top description composite.

Change-Id: I3e1a0a7ad51f3dc2b0358d6a3a258b004df446ed
Signed-off-by: donghyuk.yang <donghyuk.yang@samsung.com>
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/IRepoModifyListener.java [new file with mode: 0644]
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/IRepositoryTab.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/LocalRepoTab.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/RemoteRepoTab.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/RootstrapGenDialog.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/RootstrapUIMessages.properties

diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/IRepoModifyListener.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/IRepoModifyListener.java
new file mode 100644 (file)
index 0000000..0188d82
--- /dev/null
@@ -0,0 +1,5 @@
+package org.tizen.nativeplatform.views.ui;
+
+public interface IRepoModifyListener {
+    void modified();
+}
index 0e7bd94..c3ecbf4 100644 (file)
@@ -32,9 +32,19 @@ import java.util.List;
 import org.eclipse.core.runtime.IPath;
 
 public interface IRepositoryTab {
-       List<String> getRepositoryURLs();
-       String getArchitecture();
-       boolean isImmediateGenerateChecked();
-       IPath getBuildConfFile();
-       boolean saveState();
+    List<String> getRepositoryURLs();
+
+    String getArchitecture();
+
+    boolean isImmediateGenerateChecked();
+
+    IPath getBuildConfFile();
+
+    boolean saveState();
+
+    String getErrorMessage();
+
+    void addListener(IRepoModifyListener listener);
+
+    boolean genImmediatly();
 }
index 0e51b9f..02f3b34 100644 (file)
@@ -39,6 +39,7 @@ import org.eclipse.swt.events.MouseEvent;
 import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -68,9 +69,12 @@ public class LocalRepoTab implements IRepositoryTab {
     private Button generateImmediateBt;
 
     private String architecture;
+    private String errorMessage;
     private List<String> repositoryURLs;
     private IPath buildConfFile = null;
     boolean isImmediateGenerateChecked;
+    private IRepoModifyListener listener;
+    private Color originColor;
 
     protected final String BUNDLE_NAME = RemoteRepoTab.class.getPackage().getName()
             + ".RootstrapUIMessages";//$NON-NLS-1$
@@ -79,6 +83,7 @@ public class LocalRepoTab implements IRepositoryTab {
     public LocalRepoTab(Shell shell, TabFolder folder) {
         this.shell = shell;
         this.folder = folder;
+        originColor = shell.getForeground();
     }
 
     public void createTab() {
@@ -139,6 +144,8 @@ public class LocalRepoTab implements IRepositoryTab {
         gridData = new GridData(GridData.FILL_HORIZONTAL);
         repoPathText.setLayoutData(gridData);
         repoPathText.setEditable(false);
+        repoPathText.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
+        repoPathText.setText(resources.getString("GenRootDlg.Info.Local.Dir"));
 
         Button searchBt = new Button(snapshotComp, SWT.PUSH);
         searchBt.setText(resources.getString("LocalRepoTab.Button.Browse"));
@@ -167,17 +174,17 @@ public class LocalRepoTab implements IRepositoryTab {
                                     .getString("LocalRepoTab.Error.getArch"));
                             return;
                         }
-
+                        repoPathText.setForeground(originColor);
                         repoPathText.setText(repoPath);
                         archCombo.removeAll();
                         archCombo.setItems(archs.toArray(new String[0]));
                         archCombo.select(0);
+                        notifyModified();
                     } else {
                         DialogUtil.openErrorDialog(resources
                                 .getString("LocalRepoTab.Error.NotLocalRepo"));
                         return;
                     }
-
                 }
             }
 
@@ -198,6 +205,18 @@ public class LocalRepoTab implements IRepositoryTab {
         GridData gridData = new GridData(GridData.FILL_HORIZONTAL
                 | GridData.VERTICAL_ALIGN_BEGINNING);
         generateImmediateBt.setLayoutData(gridData);
+        generateImmediateBt.addSelectionListener(new SelectionListener() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                notifyModified();
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+
+        });
     }
 
     private void createArchitectureComposite(Composite parent) {
@@ -218,19 +237,6 @@ public class LocalRepoTab implements IRepositoryTab {
         gridData = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
         gridData.minimumHeight = 0;
         archCombo.setLayoutData(gridData);
-        archCombo.addSelectionListener(new SelectionListener() {
-
-            @Override
-            public void widgetSelected(SelectionEvent e) {
-                // UpdateRepositoryURL();
-            }
-
-            @Override
-            public void widgetDefaultSelected(SelectionEvent e) {
-            }
-
-        });
-        // archCombo.setEnabled(false);
     }
 
     private void createConfFilePathComposite(Composite parent) {
@@ -250,7 +256,8 @@ public class LocalRepoTab implements IRepositoryTab {
         gridData = new GridData(GridData.FILL_HORIZONTAL);
         confFilePathText.setLayoutData(gridData);
         confFilePathText.setEditable(false);
-
+        confFilePathText.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
+        confFilePathText.setText(resources.getString("GenRootDlg.Info.BuildConfFile"));
         Button searchBt = new Button(snapshotComp, SWT.PUSH);
         searchBt.setText(resources.getString("LocalRepoTab.Button.Browse"));
 
@@ -272,7 +279,9 @@ public class LocalRepoTab implements IRepositoryTab {
                 }
 
                 buildConfFile = new Path(filePath);
+                confFilePathText.setForeground(originColor);
                 confFilePathText.setText(buildConfFile.toOSString());
+                notifyModified();
             }
 
             @Override
@@ -282,6 +291,10 @@ public class LocalRepoTab implements IRepositoryTab {
         });
     }
 
+    private void notifyModified() {
+        listener.modified();
+    }
+
     @Override
     public List<String> getRepositoryURLs() {
         return repositoryURLs;
@@ -305,19 +318,22 @@ public class LocalRepoTab implements IRepositoryTab {
     @Override
     public boolean saveState() {
         String repo = repoPathText.getText();
-        if (repo == null || repo.isEmpty()) {
-            DialogUtil.openErrorDialog(resources.getString("LocalRepoTab.Error.Empty.Repo"));
+        if (repo == null || repo.isEmpty()
+                || repo.equals(resources.getString("GenRootDlg.Info.Local.Dir"))) {
+            errorMessage = resources.getString("LocalRepoTab.Error.Empty.Repo");
             return false;
         }
 
         String arch = archCombo.getText();
         if (arch == null || arch.isEmpty()) {
-            DialogUtil.openErrorDialog(resources.getString("GenRootDlg.Error.Empty.Arch"));
+            errorMessage = resources.getString("GenRootDlg.Error.Empty.Arch");
             return false;
         }
 
-        if (buildConfFile == null) {
-            DialogUtil.openErrorDialog(resources.getString("LocalRepoTab.Error.Empty.ConfFile"));
+        if (buildConfFile == null
+                || buildConfFile.toOSString().equals(
+                        resources.getString("LocalRepoTab.Button.Browse"))) {
+            errorMessage = resources.getString("LocalRepoTab.Error.Empty.ConfFile");
             return false;
         }
 
@@ -329,4 +345,18 @@ public class LocalRepoTab implements IRepositoryTab {
         return true;
     }
 
+    @Override
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    @Override
+    public void addListener(IRepoModifyListener listener) {
+        this.listener = listener;
+    }
+
+    @Override
+    public boolean genImmediatly() {
+        return generateImmediateBt.getSelection();
+    }
 }
index 07fccfb..a80e698 100644 (file)
@@ -41,10 +41,15 @@ import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.MouseEvent;
 import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -78,11 +83,15 @@ public class RemoteRepoTab implements IRepositoryTab {
     private TableViewer reposURLViewer;
     private Combo archCombo;
     private Button generateImmediateBt;
+    private Button searchBt;
 
     private List<ICheckTreeItem> snapshotInfos;
     private String architecture;
-    private ArrayList<String> repositoryURLs;
+    private String errorMessage;
+    private List<String> repositoryURLs;
     boolean isImmediateGenerateChecked;
+    private IRepoModifyListener listener;
+    private Color originColor;
 
     private final static int COL_REPOS_NAME = 0;
     private final static int COL_REPOS_URL = 1;
@@ -94,6 +103,7 @@ public class RemoteRepoTab implements IRepositoryTab {
     public RemoteRepoTab(Shell shell, TabFolder folder) {
         this.shell = shell;
         this.folder = folder;
+        originColor = shell.getForeground();
     }
 
     public void createTab() {
@@ -140,9 +150,40 @@ public class RemoteRepoTab implements IRepositoryTab {
         snapshotUrlText = new Text(snapshotComp, SWT.SINGLE | SWT.BORDER);
         gridData = new GridData(GridData.FILL_HORIZONTAL);
         snapshotUrlText.setLayoutData(gridData);
+        snapshotUrlText.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
+        snapshotUrlText.setText(resources.getString("GenRootDlg.Info.Snapshot.Guide"));
+        snapshotUrlText.addModifyListener(new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+                String url = snapshotUrlText.getText();
+                if (url != null && !url.isEmpty()
+                        && !url.equals(resources.getString("GenRootDlg.Info.Snapshot.Guide"))) {
+                    searchBt.setEnabled(true);
+                } else {
+                    searchBt.setEnabled(false);
+                }
+            }
+        });
+
+        snapshotUrlText.addFocusListener(new FocusListener() {
+            @Override
+            public void focusGained(FocusEvent e) {
+                // remove guide text
+                snapshotUrlText.setForeground(originColor);
+                String value = snapshotUrlText.getText();
+                if (value.equals(resources.getString("GenRootDlg.Info.Snapshot.Guide"))) {
+                    snapshotUrlText.setText("");
+                }
+            }
+
+            @Override
+            public void focusLost(FocusEvent e) {
+            }
+        });
 
-        Button searchBt = new Button(snapshotComp, SWT.PUSH);
+        searchBt = new Button(snapshotComp, SWT.PUSH);
         searchBt.setText(resources.getString("GenRootDlg.Button.Search"));
+        searchBt.setEnabled(false);
 
         searchBt.addMouseListener(new MouseListener() {
 
@@ -245,6 +286,18 @@ public class RemoteRepoTab implements IRepositoryTab {
         GridData gridData = new GridData(GridData.FILL_HORIZONTAL
                 | GridData.VERTICAL_ALIGN_BEGINNING);
         generateImmediateBt.setLayoutData(gridData);
+        generateImmediateBt.addSelectionListener(new SelectionListener() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                listener.modified();
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+
+        });
     }
 
     private void createArchitectureComposite(Composite parent) {
@@ -291,7 +344,13 @@ public class RemoteRepoTab implements IRepositoryTab {
                 }
             }
         }
+
         reposURLViewer.setInput(data);
+        noityModified();
+    }
+
+    private void noityModified() {
+        listener.modified();
     }
 
     private void createTreeViewer(Composite parent) {
@@ -339,16 +398,15 @@ public class RemoteRepoTab implements IRepositoryTab {
 
     @Override
     public boolean saveState() {
-
         TableItem[] repos = reposURLViewer.getTable().getItems();
         if (repos.length == 0) {
-            DialogUtil.openErrorDialog(resources.getString("GenRootDlg.Error.NoAnyRepos"));
+            errorMessage = resources.getString("GenRootDlg.Error.NoAnyRepos");
             return false;
         }
 
         String arch = archCombo.getText();
         if (arch == null || arch.isEmpty()) {
-            DialogUtil.openErrorDialog(resources.getString("GenRootDlg.Error.Empty.Arch"));
+            errorMessage = resources.getString("GenRootDlg.Error.Empty.Arch");
             return false;
         }
 
@@ -365,7 +423,21 @@ public class RemoteRepoTab implements IRepositoryTab {
 
     @Override
     public IPath getBuildConfFile() {
-        // Nothing to do
         return null;
     }
+
+    @Override
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    @Override
+    public void addListener(IRepoModifyListener listener) {
+        this.listener = listener;
+    }
+
+    @Override
+    public boolean genImmediatly() {
+        return generateImmediateBt.getSelection();
+    }
 }
index bd76a30..bc15ae1 100644 (file)
@@ -31,7 +31,14 @@ import java.util.ResourceBundle;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
@@ -42,7 +49,6 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.TabFolder;
 import org.eclipse.swt.widgets.Text;
-
 import org.tizen.common.util.DialogUtil;
 import org.tizen.nativeplatform.rootstrap.RootstrapManager;
 
@@ -60,16 +66,28 @@ public class RootstrapGenDialog extends Dialog {
     private RemoteRepoTab remoteTab;
     private LocalRepoTab localTab;
     private IRepositoryTab selectionTab = null;
+    private Label DescLabel;
+    private Label IconLabel;
     private int selectionIndex = 0;
     private String rootstrapName;
 
+    private Color whiteColor;
+
     public static final int REMOTE_REPO_TAB = 0;
     public static final int LOCAL_REPO_TAB = 1;
 
+    private final String REGEX_NAME = "([A-Za-z0-9\\-\\_]+)";
     private final String BUNDLE_NAME = RootstrapGenDialog.class.getPackage().getName()
             + ".RootstrapUIMessages";//$NON-NLS-1$
     private ResourceBundle resources = ResourceBundle.getBundle(BUNDLE_NAME);
 
+    private IRepoModifyListener repoModifyListener = new IRepoModifyListener() {
+        @Override
+        public void modified() {
+            validate();
+        }
+    };
+
     public RootstrapGenDialog(Shell parentShell) {
         super(parentShell);
 
@@ -90,10 +108,15 @@ public class RootstrapGenDialog extends Dialog {
     }
 
     @Override
+    public void create() {
+        super.create();
+        getButton(IDialogConstants.OK_ID).setEnabled(false);
+    }
+
+    @Override
     protected void configureShell(Shell newShell) {
         super.configureShell(newShell);
         newShell.setText(resources.getString("GenRootDlg.Title"));
-
         newShell.setLocation(x, y);
         newShell.setSize(width, height);
     }
@@ -112,18 +135,80 @@ public class RootstrapGenDialog extends Dialog {
     }
 
     private void createDialogDescription(Composite composite) {
-        Composite comp_descrip = new Composite(composite, SWT.NONE);
-        Color whiteColor = new Color(composite.getDisplay(), 255, 255, 255);
+        Composite comp_descrip = new Composite(composite, SWT.NONE | SWT.BORDER);
+        whiteColor = new Color(composite.getDisplay(), 255, 255, 255);
 
-        comp_descrip.setLayout(new GridLayout(1, false));
+        comp_descrip.setLayout(new GridLayout(2, false));
         GridData comp_descrip_gd = new GridData(GridData.FILL_HORIZONTAL);
         comp_descrip_gd.heightHint = 30;
         comp_descrip.setLayoutData(comp_descrip_gd);
         comp_descrip.setBackground(whiteColor);
 
-        Label label = new Label(comp_descrip, SWT.NONE);
-        label.setText(resources.getString("GenRootDlg.Desc"));
-        label.setBackground(whiteColor);
+        IconLabel = new Label(comp_descrip, SWT.NONE);
+        IconLabel.setImage(JFaceResources.getImage(TitleAreaDialog.DLG_IMG_MESSAGE_INFO));
+        IconLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
+        IconLabel.setBackground(whiteColor);
+
+        DescLabel = new Label(comp_descrip, SWT.NONE);
+        DescLabel.setText(resources.getString("GenRootDlg.Desc"));
+        DescLabel.setLayoutData(comp_descrip_gd);
+        DescLabel.setBackground(whiteColor);
+    }
+
+    private void showErrorMessage(String msg) {
+        IconLabel.setImage(JFaceResources.getImage(TitleAreaDialog.DLG_IMG_TITLE_ERROR));
+        DescLabel.setText(msg);
+    }
+
+    private void showMessage(String msg) {
+        IconLabel.setImage(JFaceResources.getImage(TitleAreaDialog.DLG_IMG_MESSAGE_INFO));
+        DescLabel.setText(msg);
+    }
+
+    private boolean validateRootstrapName(String name) {
+        return name.matches(REGEX_NAME);
+    }
+
+    public boolean validateTab() {
+        IRepositoryTab selectedTab = remoteTab;
+        if (tabFolder.getSelectionIndex() == LOCAL_REPO_TAB) {
+            selectedTab = localTab;
+        }
+        if (!selectedTab.saveState()) {
+            showErrorMessage(selectedTab.getErrorMessage());
+            return false;
+        }
+        if (selectedTab.genImmediatly()) {
+            showMessage(resources.getString("GenRootDlg.Info.Create.Rootstrap"));
+        } else {
+            showMessage(resources.getString("GenRootDlg.Info.Create.Meta.Rootstrap"));
+        }
+        return true;
+    }
+
+    public boolean validateAll() {
+        rootstrapName = rootstrapText.getText();
+        if (!validateRootstrapName(rootstrapName)) {
+            showErrorMessage(resources.getString("GenRootDlg.Info.RootstrapName"));
+            return false;
+        }
+        if (RootstrapManager.getRootstrap(rootstrapName) != null) {
+            showErrorMessage(String.format(
+                    resources.getString("GenRootDlg.Error.Exists.Rootstrap"), rootstrapName));
+            return false;
+        }
+        if (!validateTab()) {
+            return false;
+        }
+        return true;
+    }
+
+    public void validate() {
+        if (validateAll()) {
+            getButton(IDialogConstants.OK_ID).setEnabled(true);
+        } else {
+            getButton(IDialogConstants.OK_ID).setEnabled(false);
+        }
     }
 
     private void createRootstrapNameComposite(Composite parent) {
@@ -137,6 +222,12 @@ public class RootstrapGenDialog extends Dialog {
         GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
         gridData.minimumHeight = 0;
         rootstrapText.setLayoutData(gridData);
+        rootstrapText.addModifyListener(new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+                validate();
+            }
+        });
     }
 
     private void createTabs(Composite parent) {
@@ -149,10 +240,24 @@ public class RootstrapGenDialog extends Dialog {
 
         remoteTab = new RemoteRepoTab(getShell(), tabFolder);
         remoteTab.createTab();
+        remoteTab.addListener(repoModifyListener);
+
         localTab = new LocalRepoTab(getShell(), tabFolder);
         localTab.createTab();
+        localTab.addListener(repoModifyListener);
 
         tabFolder.setSelection(tabIndex);
+        tabFolder.addSelectionListener(new SelectionListener() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                validate();
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
     }
 
     public IRepositoryTab getSelectionTab() {
@@ -177,29 +282,14 @@ public class RootstrapGenDialog extends Dialog {
 
     @Override
     protected void okPressed() {
-        rootstrapName = rootstrapText.getText().trim();
-        if (rootstrapName.isEmpty()) {
-            DialogUtil.openErrorDialog(resources.getString("GenRootDlg.Error.Empty.Rootstrap"));
-            return;
-        }
-
-        if (RootstrapManager.getRootstrap(rootstrapName) != null) {
-            DialogUtil.openErrorDialog("Rootstrap name [" + rootstrapName + "] already exists!");
+        if (!validateAll()) {
+            DialogUtil.openErrorDialog(resources.getString("GenRootDlg.Error.Incorrect.Info"));
             return;
         }
-
         if (tabFolder.getSelectionIndex() == REMOTE_REPO_TAB) {
-            if (!remoteTab.saveState()) {
-                // DialogUtil.openErrorDialog(resources.getString("GenRootDlg.Error.Incorrect.Info"));
-                return;
-            }
             selectionTab = (IRepositoryTab) remoteTab;
             selectionIndex = REMOTE_REPO_TAB;
         } else if (tabFolder.getSelectionIndex() == LOCAL_REPO_TAB) {
-            if (!localTab.saveState()) {
-                // DialogUtil.openErrorDialog(resources.getString("GenRootDlg.Error.Incorrect.Info"));
-                return;
-            }
             selectionTab = (IRepositoryTab) localTab;
             selectionIndex = LOCAL_REPO_TAB;
         }
index 82e4b69..0196b33 100644 (file)
@@ -37,16 +37,22 @@ GenRootDlg.Button.GenImmedate = Generate Immediately
 
 GenRootDlg.Progress.Msg.Generating = Generating rootstrap...
 GenRootDlg.Progress.Msg.Searching = Seaching repositories
+GenRootDlg.Info.Local.Dir = Ex) /home/user/localrepo
+GenRootDlg.Info.BuildConfFile = Ex) /var/tmp/user-gbs/tizen.conf
+GenRootDlg.Info.Snapshot.Guide = Ex) http://download.tizen.org/snapshots/2.2-emul/common/latest/
+GenRootDlg.Info.RootstrapName = You can use letters, numbers, hyphen(-), and underscore(_) as rootstrap name.
+GenRootDlg.Info.Create.Rootstrap = Rootstrap is created if the "Generate Immediately" is checked.
+GenRootDlg.Info.Create.Meta.Rootstrap = Rootstrap meta only is created if the "Generate Immediately" is not checked.
 GenRootDlg.Error.Fail.Generate = Failed to generate rootstrap!
 GenRootDlg.Error.Empty.Snapshot = Snapshot URL is empty
 GenRootDlg.Error.Empty.Rootstrap = Rootstrap is empty
 GenRootDlg.Error.Snapshot.Failed = Getting snapshot information failed!\n
 GenRootDlg.Error.Gen.Rootstrap.Failed = Generating rootstrap failed!!\n
-GenRootDlg.Error.NoAnyRepos = There is no any repositories!
+GenRootDlg.Error.NoAnyRepos = You need to set repositories. Input snapshot URL and click the "Search" button.
 GenRootDlg.Error.Incorrect.Info = Failed to validate information for generating rootstrap.
-GenRootDlg.Error.Empty.Arch = Architecture is empty
-GenRootDlg.Error.Miss.Prerequisite = \"%s\" package is not installed in your machine.\nTry to command \"sudo apt-get install %s\".
-
+GenRootDlg.Error.Empty.Arch = Architecture is empty.
+GenRootDlg.Error.Miss.Prerequisite = "%s" package is not installed in your machine.\nTry to command \"sudo apt-get install %s\".
+GenRootDlg.Error.Exists.Rootstrap = "%s" rootstrap exists.
 
 ChangeConfFileDlg.Title = Change (build) configuration file
 MofifyRootDlg.Button.ConfFile.Check = Specify project (build) configuration file
@@ -69,8 +75,8 @@ LocalRepoTab.Group.BuildConf = Build Configuration
 LocalRepoTab.Label.FilePath = File Path :
 LocalRepoTab.Error.NotLocalRepo = The path is not local repository
 LocalRepoTab.Error.getArch = Failed to get architecture information from local repository
-LocalRepoTab.Error.Empty.ConfFile = Configuration file is empty
-LocalRepoTab.Error.Empty.Repo = Repository path is empty
+LocalRepoTab.Error.Empty.ConfFile = You need to set (build) configuration file.
+LocalRepoTab.Error.Empty.Repo = You need to set local repository path. It should be created through "createrepo" command. 
 
 Action.Msg.Error.SelectRootstrap = The "%s" rootstrap can not be selected at "%s" configuration because of architecture mismatch.
 Action.Msg.Error.RemoveDefault = Cannot remove basic rootstrap!