Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve validation of fields in wizards #17

Open
vitorsouza opened this issue Oct 18, 2012 · 0 comments
Open

Improve validation of fields in wizards #17

vitorsouza opened this issue Oct 18, 2012 · 0 comments
Labels

Comments

@vitorsouza
Copy link
Member

Unagi (at the time of this issue creation) has three "Create New ..." wizards, whose basic pages are:

  • it.unitn.disi.unagi.rcpapp.wizards.CreateNewConstraintsFileBasicWizardPage
  • it.unitn.disi.unagi.rcpapp.wizards.CreateNewProjectBasicWizardPage
  • it.unitn.disi.unagi.rcpapp.wizards.CreateNewRequirementsModelBasicWizardPage

These pages have key listeners to know when they are done. CNRequirements and CNConstraints register themselves as listeners and this verification happens in the method keyReleased(), whereas CNProject adds an anonymous key listener in method createControl().

These listeners are supposed to check the contents of the fields as they are typed and indicate if the page can be considered complete (setPageComplete()). Currently, they only check if the fields are filled.

Implement further checks and add little error messages next to the fields like Eclipse does. Here are some of these possible checks (think if there are more):

  • Check if the project or file being created already exists;
  • Check if names don't contain spaces (don't know if this is a real problem, but better avoid it);
  • Requirements and constraints have default extensions, so check if the user is specifying them, saying that she shouldn't (it's added automatically).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant