Thursday, 25 October 2007

Gaikokugo - a wizard in 30 minutes

I was trying to enter some vocabulary in to Gaikokugo, the language learning suite I have been developing and realised that it was a bit tedious. The vocabularly appears in a sheet and to enter new vocabulary I had the following process:
  • double click the sheet to create a new row
  • click on the new row and edit the values in the properties view (using the mouse to move between properties)
  • tab out of the properties view and double click the sheet to start again
This wasn't optimal, so I decided to implement the following:
  • Select "New Entry..." from the "View" menu OR double click the sheet.
  • A wizard opens and focus is set to the "local" word input. There are also inputs for the foreign words, categories and level, and a check box (which is checked) so that the wizard opens again once "finished".
  • Now I can quickly enter vocabulary simply by entering the local word(s), foreign word(s) and hitting enter to have the wizard save the input and re-open to start again, or I can tab through an also update the categories and level, which are defaulted to whatever is selected in the CategoryView.
This took about 30 minutes to implement, which basically means the length of my commute in to Glasgow. Once you get over the learning curve menus, forms, wizards and so on are very easy to implement with Eclipse RCP.

I have some refactoring to do. I have a VocabularlySheet and the NewVocabularyWizard. I need to abstract these in to "LanguageEntry" (the super-class of Vocabulary, Phrase and Conversation) generic components so that I can reuse the same code in the other perspectives.

One thing I find confusing about Eclipse is the terminology it uses. As a user of Eclipse I would be find it difficult to use the concept of pages, perspectives and views. As a result I have called perspectives views for the sake of the user. They select either Vocabulary, Phrase or Conversation view from the view menu, but what they are really doing is changing perspective and seeing a bunch of different Eclipse-views.

No comments: