Download ware-cj-dissertation.. - Department of Computer Science

Transcript
6.3.2 Opcode Catalogue Import
This section refers to the functionality tested in section 2 of the test plan where the manual is
parsed to acquire opcode definitions and these are displayed on the menus. All tests were
passed, however there were also some observations.
The first of these is that occasionally two categories of the same name appear to be created,
for example ―Table Control‖. A closer investigation of which opcodes and subcategories
were being placed into which of the identically named categories revealed that the two
category names are not exactly identical, one differing from the other by the presence of a
trailing space character. This resulted in them being entered into the hash table separately at
manual parse time. Attempts were made to modify PageParser to remove this space
(using various trimming methods) but these failed to match the space. Further debugging
revealed that the space was an HTML non-breaking space in the manual (the  
entity) and this appears not to be matched by the regular expression whitespace class. The
JDOM XML parser has an option that prevents it expanding entities which should have
solved the problem by allowing detection of the text   but when this was activated no
effect was observed and the space continued to appear. This problem can be rectified by
manual editing of the generated opcodes.xml file after it has been generated; however,
the problem of removing the spaces at parse-time remains a minor problem to be solved.
The second point of note was that in some places opcodes appear twice on the menu. This
was quickly found to be because they appear twice in the manual, once for each combination
of parameter variable types (for example for some opcodes the definition is given once for an
a-rate result and again for a k-rate result). This is obviously redundant in our application
since output variables can be renamed to whichever type the user wishes but other than that
there are no ill-effects. The parsing method could be modified to remove duplicates easily
enough in a future update.
Finally, it was noted that some of the A-Z opcode menus ran off the bottom of the screen,
resulting in those opcodes later in the ordering being inaccessible. At which point a menu
runs off the screen is obviously dependent on screen resolution and window position which
is what makes this problem difficult. It is surprising that Java does not implement a
scrollable menu automatically, but there seems no simple way to enable this. Therefore we
propose setting an arbitrary limit on the number of items that may show in an A-Z list and
then creating further submenus chained from this (entitled for example ―More...‖) to contain
any overflow. An alternative would be to abandon A-Z menus and implement the opcode
text search feature mentioned in Requirement 20, as this would fulfil the same user
requirement of being able to find a known opcode rapidly.
6.3.3 Deletion of Instruments
The failure highlighted by test 4.3 is a trivial bug and could be easily resolved by calling
Editor.closePropertiesFor() on each vertex in the deleted instrument.
75