TS 68 EditorOptions
Test Specification: Editor Options
Author: Jiri Prox
Version: 6.8
Last Update: 5.8.2009
Introduction: This test specification covers two panels in Options Dialog - Fonts&Colors and Keymap.
Setup: No specific steps are required
Test suite: Fonts & Colors - syntax
- All languages - default
- Open options dialog
- Go to Fonts & Colors, tab Syntax
- Select language All Languages, and category Default
- Change Font to Monospaced 14 Bold
- Change Foreground, Backaground, Effect and Effect color
- EXPECTED RESULT: All fonts is changed to the set valued, unless the values are not overridden in some specific category java keyword color stay unchanged, since is specified later.
- All language - comment
- Change color of comment in language All Languages
- Check several types of files (Java, HTML, XML ...)
- EXPECTED RESULT: The color of comment are changed correctly
- inherited color
- Select the color of Comment for all languages to 'Inherited'
- Change color for category Default
- EXPECTED RESULT: The color square next to label 'Inherited' should have color of Default element. When this value is selected the color of comment element is inherited from the superior element - 'default' in this case. After changing color of 'default' the color of 'comment' is changed as well
- Preview
- Select language All languages'
- Click on several places in preview
- EXPECTED RESULT: The proper category is selected
Test suite: Fonts & Colors - java specific syntax
Setup: Reset any changed which were made during previous testsuite by pressing 'Restore' button. After each test case, revert the changes. Open class TestClass.java, which is attached to this document
- Language specific color
- Select language Java
- Set color/fonts for Abstract Element
- EXPECTED RESULT: The abstract elements on lines 6, 9 and 10 are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Annotation declaration and Annotation Use
- EXPECTED RESULT: The annotation declaration on line 21 and annotation use at line 2 are colored according to set values
- Language specific color
- Select language Java
- Set color/fonts for Character
- EXPECTED RESULT: Character literal on line 38 is colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Class Use and Class Declaration
- EXPECTED RESULT: The all class usages (lines 40,42,46) and class declarations (3, 9, 13) are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Comment
- EXPECTED RESULT: All comments (block and inline) are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Constructor Use and Constructor Declaration
- EXPECTED RESULT: Constructor Use (line 47) and Constructor Declaration (line 50) are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Deprecated Element
- EXPECTED RESULT: The rendering of deprecated elements are changed (lines 3,47)
- Language specific color
- Select language Java
- Set color/fonts for Enum Use and Enum Declaration
- EXPECTED RESULT: Enum Use (line 44) and Enum Declaration (line 16) are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Field Declaration and Filed Use
- EXPECTED RESULT: The Field Declaration (lines 18, 23 - 26,32) and Filed Use (47) are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Identifier
- EXPECTED RESULT: All identifiers are colored by specific color
- Language specific color
- Select language Java
- Set color/fonts for Interface Declaration and Interface Use
- EXPECTED RESULT: The Interface Declaration (line 5) and Interface Use (line 43) are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Javadoc HTML tag
- EXPECTED RESULT: HTML tags in javadoc (line 28) has correct color
- Language specific color
- Select language Java
- Set color/fonts for Keyword and Keyword directive
- EXPECTED RESULT: All keywords (as public, void, class ...) and keyword directives (as return ...) are colored by specific color
- Language specific color
- Select language Java
- Set color/fonts for Local Variable Declaration and Local Variable Use
- EXPECTED RESULT: The Local Variable Declaration on lines 38, 40, 42 45 and Local Variable Use on line 46 are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Mark Occurrence
- Put cursor on 'method' on line 37
- EXPECTED RESULT: The occurrence on line 41 has correct color
- Language specific color
- Select language Java
- Set color/fonts for Method Declaration and Method Use
- EXPECTED RESULT: Method Declaration (6,10,37) and Method Use (41,46) are colored by specified color
- Language specific color
- Select language Java
- Set color/fonts for Number
- EXPECTED RESULT: Numbers (52,53) have correct color
- Language specific color
- Select language Java
- Set color/fonts for Operator and Separator
- {{{1}}}
- Language specific color
- Select language Java
- Set color/fonts for Package Private Element, Private Element, Protected Element and Public Element
- EXPECTED RESULT: See if elements with each of the access modifier have correct color
- Language specific color
- Select language Java
- Set color/fonts for Parameter Declaration and Parameter Use
- EXPECTED RESULT: Parameter Declaration (51) and Parameter Use (54) have correct color
- Language specific color
- Select language Java
- Set color/fonts for Static Element
- EXPECTED RESULT: Static Element (line 5, 16, 18, 21, 23, 43,44, 46) have correct color
- Language specific color
- Select language Java
- Set color/fonts for String, String Escape Sequence and String Escape Sequence (Invalid)
- EXPECTED RESULT: String (line 40), String Escape Sequence (\n on line 40) and invalid String Escape Sequence (\d on line 40) have correct color
- Language specific color
- Select language Java
- Set color/fonts for Unused Element
- EXPECTED RESULT: All unused private elements (25, 38, 43,44,52) have correct color
- Language specific color
- Select language Java
- Set color/fonts for Whitespace
- EXPECTED RESULT: All white spaces - space, tab - are colored by specified color (note that there are no visible color, so setting foreground color does nothing)
Test suite: Fonts & Colors - highlighting
- Brace Matching
- Open Fonts&Colors, Highlighting
- Change Brace Matching - match and mismatch for both simple character and multiple character
- Open java file, put caret on '{' and check Brace Matching (match, single character) setting
- Delete matching '}' and check Brace Matching (mismatch, single character) setting
- Open HTML file put caret inside any open tag and check Brace Matching (match, multiple character) setting
- Delete matching closing tag and Brace Matching (mismatch, multiple character) setting
- EXPECTED RESULT: The setting are correctly propagated to the editor
- Caret Color
- Open Fonts&Colors, Highlighting
- Change Caret Color and Highlight Caret Color
- EXPECTED RESULT: The caret color and the color highlighting the line where is the caret is changed
- Code Folding
- Open Fonts&Colors, Highlighting
- Change Code Folding and Code Folding Bar
- EXPECTED RESULT: The color of Code Folding and Code Folding Bar (the symbols next to the line numbers) are changed
- Guarded block
- Open Fonts&Colors, Highlighting
- Change Guarder Block color
- Create or open any form file
- EXPECTED RESULT: The color of guarded block is changed
- Search color
- Open Fonts&Colors, Highlighting
- Change Highlight Search and Search Block
- In editor press ctrl-f and search for text with several occurrences in actual document
- Select block of code and press ctrl-h
- EXPECTED RESULT: The found occurrences are marked by Highlight Search color, selected block is colored by Search Block when replace dialog is shown.
- Hyperlinks, Line Numbers, Selected text, Text Limit Line
- Open Fonts&Colors, Highlighting
- Change color for Hyperlinks, Line Numbers, Selected text and Text Limit Line
- Open any editor and select part of the code
- Enable line numbers if they are disabled
- Pres ctrl and move mouse cursor over some identified (e.g. String )
- EXPECTED RESULT: All changes are correctly propagated to editor
- Status bar
- Open Fonts&Colors, Highlighting
- Change color for Status Bar and Status Bar (highlighted)
- Detach editor window (alt-shift-D)
- Perform search
- EXPECTED RESULT: Status bar has correct colors
- Text boxes
- Open Fonts&Colors, Highlighting
- Change color for Text Box - editable and synchronized
- in editor use inbstant rename
- EXPECTED RESULT: The active box has Text Box (editable) color, the boxes which are synchronized with it has Text Box (synchronized)
Test suite: Fonts & Colors - annotations
- Change Annotations - bookmark
- Open Fonts&Colors, Annotations
- Change Foreground color, background color and Wave underline color for category Bookmark
- Open any file and place bookmark in it
- EXPECTED RESULT: Bookmark is correctly highlighted
- Change Annotations - fixable error
- Open Fonts&Colors, Annotations
- Change Foreground color, background color and Wave underline color for category Fixable Error
- Open any file and insert code with error (e.g. x = 3; w/o declaration of x)
- EXPECTED RESULT: The code is highlighted according to set valued (note. the highlighting may mix with error highlighting)
- Change Annotations - fixable hint
- Open Fonts&Colors, Annotations
- Change Foreground color, background color and Wave underline color for category Fixable Hint
- Enable Javadoc hints if they are disabled
- Create public method w/o javadoc.
- Put caret on method's name
- EXPECTED RESULT: The code is highlighted according to set valued
- Change Annotations - Is overridden
- Open Fonts&Colors, Annotations
- Change Foreground color, background color and Wave underline color for category Is overriden (these with round green icon with I or O in it)
- Create new class implementing Runnable and override toString in it.
- EXPECTED RESULT: The toString and run methods are highlighted according to set valued
Test suite: Fonts & Colors - profiles
Note: The color profile consist of Syntax and Highlighting part. The Annotations settings are not included, so the following testcases will work only with values in the Syntax and Highlighting tabs
- Switch profile
- Open some java files
- Open Fonts&Colors
- Switch color profile to another profile (e.g. Earth)
- Close options dialog
- EXPECTED RESULT: The preview and editor is immediately repainted to the new scheme
- Restore to default
- Open some java files
- Open Fonts&Colors
- Change some setting (for several languages)
- Close OD and check that settings changes are propagated
- Open OD again and press Restore
- EXPECTED RESULT: The color profile is restored to default settings
- Duplicate profile
- Open some java files
- Open Fonts&Colors
- Press Duplicate
- Enter new name (try entering name of already existing profile)
- Confirm OD
- EXPECTED RESULT: The color profile is duplicated. For duplicated profile the Restore button is renamed to Delete
- Delete profile
- Open some java files
- Open Fonts&Colors
- Select duplicated profile
- Delete it
- Confirm OD
- EXPECTED RESULT: The profile is deleted, it will not show in Profile combo box any more
Test suite: Keymaps - setting shortcuts
- Search by action name
- Open Keymap
- in Search text field enter part of action name (e.g. search)
- EXPECTED RESULT: The action list is reduced to actions which contains search in its name
- Search by shortcut
- Open Keymap
- in Search in Shortcut text field enter some shortcut
- try to use virtual keyboard (opened by clicking on '...' next to text field)
- EXPECTED RESULT: List is reduced to action with shortcut containing entered shortcut. (comparing is done as strings, e.g. F11 contains F1)
- Change shortcut
- Select some action with assigned shortcut
- Double click on the shortcut field and enter new shortcut (unassigned)
- Alternatively use click on ... and select Edit from menu instead clicking on field
- Verify shortcut in editor
- EXPECTED RESULT:The new shortcut is assigned to the selected action
- Change shortcut to assigned
- Select some action with assigned shortcut
- Double click on the shortcut field and enter new shortcut (assigned)
- Try all button on dialog informing about shortcut conflict
- Verify shortcut in editor
- EXPECTED RESULT:If 'yes' is selected the shortcut is reassigned, cancel will stop the shortcut editing, 'no' will close the dialog, but it will not cancel the editing of the shortcut
- Add alternative shortcut
- Choose some action with one shortcut
- Click on ... next to the shortcut field and select add alternative
- Enter new unused shortcut
- EXPECTED RESULT: New line is added to the table, it has the same action name, but there is appended "(alternative shortcut)". Both shortcuts works in editor
- Edit alternative shortcut
- Select some line corresponding to alternative shortcut (e.g .there is "(alternative shortcut)" in the action name)
- Double click on shortcut field / or open menu by clicking on ... and select Edit
- Enter new free shortcut
- Verify the new and old shortcut in editor
- EXPECTED RESULT: The shortcut is changed. Old shortcut doesn't invoke the action any more
- Clear alternative shortcut
- Select some line corresponding to alternative shortcut (e.g .there is "(alternative shortcut)" in the action name)
- Open menu by clicking on ... and select clear
- EXPECTED RESULT: The line is removed from the table, the shortcut doesn't invoke the action any more
- Clear original shortcut
- Chose some action with more shortcuts
- Select some line corresponding to the primary shortcut (e.g .there is no "(alternative shortcut)" in the action name)
- From menu select Clear
- EXPECTED RESULT:Primary shortcut is cleared, some of the alternative shortcut becomes primary shortcut
- Restore shortcut
- Select some action with single shortcut
- Change this shortcut and add alternative for it
- From the menu select 'Reset to default' (try invoking in on both - primary and alternative shortcuts)
- EXPECTED RESULT: Primary shortcut is changed back and alternative shortcut is deleted
Test suite: Keymaps - profiles
- Duplicate
- Open Keymap
- Click on Manage Profiles
- Select some profile and click on duplicate
- Enter new name and confirm
- EXPECTED RESULT: The select profile is copied
- Duplicate - existing name
- Try previous steps but enter name which is already used
- EXPECTED RESULT:The dialog is opened informing about name conflict, profiled is not copied
- Delete
- Open Keymap
- Click on Manage Profiles
- Select some profile
- Click on delete
- EXPECTED RESULT: The selected profile is deleted (note that the delete button is enabled only for duplicated profiles)
- Restore defaults
- Open Keymap
- Select some of original profiled
- Make some changes
- Click on Manage Profiles
- Click on Restore to Defaults
- EXPECTED RESULT:All changes in selected profile are take back (Restore to Default is enabled only for original profiles)
- Export
- Open Keymap
- Click on Manage Profiles
- Click on Export
- Enter file name and confirm it
- EXPECTED RESULT: The selected profile is exported into the xml file
- Import
- Open Keymap
- Click on Manage Profiles
- Click on Import
- Select file containing keymap profile (it was created during previous testcase)
- Enter new name and confirm
- EXPECTED RESULT: The profile is imported
