TS 74 EditorOptions

Test Specification: Editor Options

Author: Jiri Prox Standa Sazonov
Version:7.4
Last update:2013/07/18
Introduction:This test specification covers two panels in Options Dialog - Fonts&Colors and the Keynap

Contents

Test suite: Fonts & Colors - syntax

  1. All languages - default
    1. Open options dialog
    2. Go to Fonts & Colors, tab Syntax
    3. Select language All Languages, and category Default
    4. Change Font to Monospaced 14 Bold
    5. 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.
  2. All language - comment
    1. Change color of comment in language All Languages
    2. Check several types of files (Java, HTML, XML ...)
    • EXPECTED RESULT: The color of comment are changed correctly
  3. inherited color
    1. Select the color of Comment for all languages to 'Inherited'
    2. 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
  4. Preview
    1. Select language All languages'
    2. 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 Elements.java, which is attached to this document

  1. Language specific color
    1. Select language Java
    2. Set color/fonts for Abstract Element
    • EXPECTED RESULT: The abstract elements on lines17 (s), 18 (i), 21 (s, i), 23 (ClassA), 24 (getStr), 25 (init), 51 (ClassA) are colored by specified color
  2. Language specific color
    1. Select language Java
    2. Set color/fonts for Annotation declaration and Annotation Use
    • EXPECTED RESULT: The annotation declaration on line 16 (myAnnotation) and annotation use at line 21 (myAnnotation) are colored according to set values
  3. Language specific color
    1. Select language Java
    2. Set color/fonts for Character and Character Escape Sequence
    • EXPECTED RESULT: The Character on line 53 ('a', 'b', 'c'), 58 ('d') and Character Escape Sequence at line 53 ('\n') are colored according to set values
  4. Language specific color
    1. Select language Java
    2. Set color/fonts for Class Use and Class Declaration
    • EXPECTED RESULT: The all class usages and class declarations are colored by specified color
  5. Language specific color
    1. Select language Java
    2. Set color/fonts for Comment
    • EXPECTED RESULT: All comments (block and inline) are colored by specified color
  6. Language specific color
    1. Select language Java
    2. Set color/fonts for Constructor Use and Constructor Declaration
    • EXPECTED RESULT: Constructor Use (line 60) and Constructor Declaration (lines 32, 57) are colored by specified color
  7. Language specific color
    1. Select language Java
    2. Set color/fonts for Deprecated Element
    • EXPECTED RESULT: The rendering of deprecated elements are changed line 44 (test)
  8. Language specific color
    1. Select language Java
    2. Set color/fonts for Enum Use and Enum Declaration
    • EXPECTED RESULT: Enum Use (lines 63, 64) and Enum Declaration (line 14) are colored by specified color
  9. Language specific color
    1. Select language Java
    2. Set color/fonts for Field Declaration and Filed Use
    • EXPECTED RESULT: The Field Declaration (lines 12, 14, 30, 53, 54, 55) and Filed Use (58, 63, 64) are colored by specified color
  10. Language specific color
    1. Select language Java
    2. Set color/fonts for Identifier
    • EXPECTED RESULT: All identifiers are colored by specific color
  11. Language specific color
    1. Select language Java
    2. Set color/fonts for Interface Declaration and Interface Use
    • EXPECTED RESULT: The Interface Declaration (line 48) and Interface Use (line 51) are colored by specified color
  12. Language specific color
    1. Select language Java
    2. Set color/fonts for Javadoc First Sentence, Javadoc HTML tag, Javadoc Identifier, Javadoc Tag
    • EXPECTED RESULT: Javadoc First Sentence, HTML tags in javadoc (line 6), Javadoc Identifier (lines 36,37), Javadoc Tag (lines 7,36,37) has correct color
  13. Language specific color
    1. Select language Java
    2. 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
  14. Language specific color
    1. Select language Java
    2. Set color/fonts for Literal
    • EXPECTED RESULT:Literal (line 55) has correct color
  15. Language specific color
    1. Select language Java
    2. Set color/fonts for Local Variable Declaration and Local Variable Use
    • EXPECTED RESULT: The Local Variable Declaration on lines 58, 60, 63 and Local Variable Use on lines 61, 64 are colored by specified color
  16. Language specific color
    1. Select language Java
    2. Set color/fonts for Mark Occurrence
    3. Put cursor on 'method' on line 37
    • EXPECTED RESULT: The occurrence of Mark Occurence has correct color
  17. Language specific color
    1. Select language Java
    2. Set color/fonts for Method Declaration and Method Use
    • EXPECTED RESULT: Method Declaration (17,18,24,25,39,44,68,73) and Method Use (21,61) are colored by specified color
  18. Language specific color
    1. Select language Java
    2. Set color/fonts for Number
    • EXPECTED RESULT: Numbers (18,21,54,58,61) have correct color
  19. Language specific color
    1. Select language Java
    2. Set color/fonts for Operator and Separator
    • {{{1}}}
  20. Language specific color
    1. Select language Java
    2. 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
  21. Language specific color
    1. Select language Java
    2. Set color/fonts for Parameter Declaration and Parameter Use
    • EXPECTED RESULT: Parameter Declaration (39) and Parameter Use (40) have correct color
  22. Language specific color
    1. Select language Java
    2. Set color/fonts for Private Element, Protected Element, Public Element, Static Element
    • EXPECTED RESULT:Private Element (lines 30,54,55) , Protected Element (lines 53, 58), all Public Elements, Static Element (lines 12,14,16,21,48,51,63,64) have correct color
  23. Language specific color
    1. Select language Java
    2. Set color/fonts for String, String Escape Sequence
    • EXPECTED RESULT: String (lines 17,21,58,69), String Escape Sequence (\n on line 69) have correct color
  24. Language specific color
    1. Select language Java
    2. Set color/fonts for Unused Element
    • EXPECTED RESULT: All unused private elements (30,54,55,58,63) have correct color
  25. Language specific color
    1. Select language Java
    2. 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

  1. Brace Matching
    1. Open Fonts&Colors, Highlighting
    2. Change Brace Matching - match and mismatch for both simple character and multiple character
    3. Open java file, put caret on '{' and check Brace Matching (match, single character) setting
    4. Delete matching '}' and check Brace Matching (mismatch, single character) setting
    5. Open HTML file put caret inside any open tag and check Brace Matching (match, multiple character) setting
    6. Delete matching closing tag and Brace Matching (mismatch, multiple character) setting
    • EXPECTED RESULT: The setting are correctly propagated to the editor
  2. Caret Color
    1. Open Fonts&Colors, Highlighting
    2. Change Caret Color and Highlight Caret Color
    • EXPECTED RESULT: The caret color and the color highlighting the line where is the caret is changed
  3. Code Folding
    1. Open Fonts&Colors, Highlighting
    2. 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
  4. Guarded block
    1. Open Fonts&Colors, Highlighting
    2. Change Guarder Block color
    3. Create or open any form file
    • EXPECTED RESULT: The color of guarded block is changed
  5. Search color
    1. Open Fonts&Colors, Highlighting
    2. Change Highlight Search and Search Block
    3. In editor press ctrl-f and search for text with several occurrences in actual document
    4. 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.
  6. Hyperlinks, Line Numbers, Selected text, Text Limit Line
    1. Open Fonts&Colors, Highlighting
    2. Change color for Hyperlinks, Line Numbers, Selected text and Text Limit Line
    3. Open any editor and select part of the code
    4. Enable line numbers if they are disabled
    5. Pres ctrl and move mouse cursor over some identified (e.g. String )
    • EXPECTED RESULT: All changes are correctly propagated to editor
  7. Status bar
    1. Open Fonts&Colors, Highlighting
    2. Change color for Status Bar and Status Bar (highlighted)
    3. Detach editor window (source file tab context menu: Float)
    4. Perform search
    • EXPECTED RESULT: Status bar has correct colors
  8. Text boxes
    1. Open Fonts&Colors, Highlighting
    2. Change color for Text Box - editable and synchronized
    3. in editor use instant rename (cursor on formal parameter name + Ctrl+R)
    • 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

  1. Change Annotations - bookmark
    1. Open Fonts&Colors, Annotations
    2. Change Foreground color, background color and Wave underline color for category Bookmark
    3. Open any file and place bookmark in it
    • EXPECTED RESULT: Bookmark is correctly highlighted
  2. Change Annotations - fixable error
    1. Open Fonts&Colors, Fixable Error
    2. Change Foreground color, background color and Wave underline color for category Fixable Error
    3. 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)
  3. Change Annotations - fixable hint
    1. Open Fonts&Colors, Fixable Hint
    2. Change Foreground color, background color and Wave underline color for category Fixable Hint
    3. Enable Javadoc hints if they are disabled
    4. Create public method w/o javadoc.
    5. Put caret on method's name
    • EXPECTED RESULT: The code is highlighted according to set valued
  4. Change Annotations - Is overridden
    1. Open Fonts&Colors, Is Overridden
    2. Change Foreground color, background color and Wave underline color for category Is overriden (these with round green icon with I or O in it)
    3. 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

  1. Switch profile
    1. Open some java files
    2. Open Fonts&Colors
    3. Switch color profile to another profile (e.g. Earth)
    4. Close options dialog
    • EXPECTED RESULT: The preview and editor is immediately repainted to the new scheme
  2. Restore to default
    1. Open some java files
    2. Open Fonts&Colors
    3. Change some setting (for several languages)
    4. Close OD and check that settings changes are propagated
    5. Open OD again and press Restore
    • EXPECTED RESULT: The color profile is restored to default settings
  3. Duplicate profile
    1. Open some java files
    2. Open Fonts&Colors
    3. Press Duplicate
    4. Enter new name (try entering name of already existing profile)
    5. Confirm OD
    • EXPECTED RESULT: The color profile is duplicated. For duplicated profile the Restore button is renamed to Delete
  4. Delete profile
    1. Open some java files
    2. Open Fonts&Colors
    3. Select duplicated profile
    4. Delete it
    5. Confirm OD
    • EXPECTED RESULT: The profile is deleted, it will not show in Profile combo box any more

Test suite: Keymaps - setting shortcuts

  1. Show as HTML
    1. Open Keymap
    2. Press 'Show as HTML' button
    • EXPECTED RESULT:The table of shortcuts is shown as webpage in default browser
  2. Search by action name
    1. Open Keymap
    2. 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
  3. Search by shortcut
    1. Open Keymap
    2. in Search in Shortcut text field enter some shortcut
    3. 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)
  4. Change shortcut
    1. Select some action with assigned shortcut
    2. Double click on the shortcut field and enter new shortcut (unassigned)
    3. Alternatively use click on ... and select Edit from menu instead clicking on field
    4. Verify shortcut in editor
    • EXPECTED RESULT:The new shortcut is assigned to the selected action
  5. Change shortcut to assigned
    1. Select some action with assigned shortcut
    2. Double click on the shortcut field and enter new shortcut (assigned)
    3. Try all button on dialog informing about shortcut conflict
    4. 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
  6. Add alternative shortcut
    1. Choose some action with one shortcut
    2. Click on ... next to the shortcut field and select add alternative
    3. 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
  7. Edit alternative shortcut
    1. Select some line corresponding to alternative shortcut (e.g .there is "(alternative shortcut)" in the action name)
    2. Double click on shortcut field / or open menu by clicking on ... and select Edit
    3. Enter new free shortcut
    4. Verify the new and old shortcut in editor
    • EXPECTED RESULT: The shortcut is changed. Old shortcut doesn't invoke the action any more
  8. Clear alternative shortcut
    1. Select some line corresponding to alternative shortcut (e.g .there is "(alternative shortcut)" in the action name)
    2. 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
  9. Clear original shortcut
    1. Chose some action with more shortcuts
    2. Select some line corresponding to the primary shortcut (e.g .there is no "(alternative shortcut)" in the action name)
    3. From menu select Clear
    • EXPECTED RESULT:Primary shortcut is cleared, some of the alternative shortcut becomes primary shortcut
  10. Restore shortcut
    1. Select some action with single shortcut
    2. Change this shortcut and add alternative for it
    3. 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

  1. Duplicate
    1. Open Keymap
    2. Click on Manage Profiles
    3. Select some profile and click on duplicate
    4. Enter new name and confirm
    • EXPECTED RESULT: The select profile is copied
  2. Duplicate - existing name
    1. Try previous steps but enter name which is already used
    • EXPECTED RESULT:The dialog is opened informing about name conflict, profiled is not copied
  3. Delete
    1. Open Keymap
    2. Click on Manage Profiles
    3. Select some profile
    4. Click on delete
    • EXPECTED RESULT: The selected profile is deleted (note that the delete button is enabled only for duplicated profiles)
  4. Restore defaults
    1. Open Keymap
    2. Select some of original profiled
    3. Make some changes
    4. Click on Manage Profiles
    5. Click on Restore to Defaults
    • EXPECTED RESULT:All changes in selected profile are take back (Restore to Default is enabled only for original profiles)
  5. Export
    1. Open Keymap
    2. Click on Manage Profiles
    3. Click on Export
    4. Enter file name and confirm it
    • EXPECTED RESULT: The selected profile is exported into the xml file
  6. Import
    1. Open Keymap
    2. Click on Manage Profiles
    3. Click on Import
    4. Select file containing keymap profile (it was created during previous testcase)
    5. Enter new name and confirm
    • EXPECTED RESULT: The profile is imported
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo