TS 74 JavaEditor

(Difference between revisions)
(Created page with '==Java Editor== '''Author:'''Jiri Prox<br/> '''Version:'''7.4<br/> '''Last update:'''2013/06/14<br/> '''Introduction:'''This test specification covers java specific features of t…')
Line 2: Line 2:
'''Author:'''Jiri Prox<br/>
'''Author:'''Jiri Prox<br/>
'''Version:'''7.4<br/>
'''Version:'''7.4<br/>
-
'''Last update:'''2013/06/14<br/>
+
'''Last update:'''2013/06/26<br/>
'''Introduction:'''This test specification covers java specific features of the editor.<br/>
'''Introduction:'''This test specification covers java specific features of the editor.<br/>
Line 12: Line 12:
## Move caret behind the "abcde"
## Move caret behind the "abcde"
## Press '''Enter'''
## Press '''Enter'''
-
#* {{result|EXPECTED RESULT:    If Enter is pressed inside of a string, the string is smartly divided using '+' operator above strings so that there are no errors in code<br> Other info: <br> - indentation works normally <br> - all white characters are preserved <br> - caret is moved behind the opening quote  at the second line           }}
+
#* {{result|EXPECTED RESULT:    If Enter is pressed inside of a string, the string is smartly divided using '+' operator above strings so that there are no errors in code<br> Other info: <br> - indentation works normally <br> - all white characters are preserved <br> - caret is moved behind the opening quote  at the second line           }}
# {{testcase|Undo,Redo and a smart Enter}}
# {{testcase|Undo,Redo and a smart Enter}}
## Follow previous testcase
## Follow previous testcase
## Invoke '''Undo''' and '''Redo''' several times
## Invoke '''Undo''' and '''Redo''' several times
-
#* {{result|EXPECTED RESULT:    Undo and Redo is working properly.             }}
+
#* {{result|EXPECTED RESULT:    Undo and Redo is working properly.               }}
# {{testcase|Start new line}}
# {{testcase|Start new line}}
## Move the caret behind "abcde"
## Move the caret behind "abcde"
## Press '''Shift+Enter'''.
## Press '''Shift+Enter'''.
-
#* {{result|EXPECTED RESULT:The new line is inserted just below actual line and the cursor is moved to the beginning of the new line (indentation is applied). Original line is not modified           }}
+
#* {{result|EXPECTED RESULT:The new line is inserted just below actual line and the cursor is moved to the beginning of the new line (indentation is applied). Original line is not modified           }}
# {{testcase|Undo/Redo start new line}}
# {{testcase|Undo/Redo start new line}}
## Try to use '''Undo''' and '''Redo'''
## Try to use '''Undo''' and '''Redo'''
-
#* {{result|EXPECTED RESULT:    Undo/Redo works properly.             }}
+
#* {{result|EXPECTED RESULT:    Undo/Redo works properly.             }}
# {{testcase|Split line}}
# {{testcase|Split line}}
## Move caret behind "abcde"
## Move caret behind "abcde"
## Press '''Ctrl+Enter'''
## Press '''Ctrl+Enter'''
-
#* {{result|EXPECTED RESULT:    The sting literal is divided to the two lines, as it was common text.  No additional characters are inserted, so there is syntax error in the editor now.           }}
+
#* {{result|EXPECTED RESULT:    The sting literal is divided to the two lines, as it was common text.  No additional characters are inserted, so there is syntax error in the editor now.           }}
# {{testcase|Undo/Redo split line}}
# {{testcase|Undo/Redo split line}}
## Try to use '''Undo''' and '''Redo'''
## Try to use '''Undo''' and '''Redo'''
-
#* {{result|EXPECTED RESULT:    Undo/Redo works properly             }}
+
#* {{result|EXPECTED RESULT:    Undo/Redo works properly             }}
====Test suite: Erroneous Code====
====Test suite: Erroneous Code====
Line 38: Line 38:
## Hover with mouse cursor over error annotation mark in gutter for a while (wait for tooltip to appear).
## Hover with mouse cursor over error annotation mark in gutter for a while (wait for tooltip to appear).
## Place caret on marked line and press '''Alt+Enter'''
## Place caret on marked line and press '''Alt+Enter'''
-
#* {{result|EXPECTED RESULT:    - Erroneous code should be underlined<br>- A red annotation mark shows up in the gutter<br>- A tooltip should be displayed after you hover above the annotation mark and after you press Alt+Enter, tooltip contains error "Illegal combination of modifiers: private and public"             }}
+
#* {{result|EXPECTED RESULT:    - Erroneous code should be underlined<br>- A red annotation mark shows up in the gutter<br>- A tooltip should be displayed after you hover above the annotation mark and after you press Alt+Enter, tooltip contains error "Illegal combination of modifiers: private and public"             }}
# {{testcase|Cycling through annotations}}
# {{testcase|Cycling through annotations}}
## Place incorrect variable declaration <tt>Strin g = "abc";</tt> somewhere into  the method body.
## Place incorrect variable declaration <tt>Strin g = "abc";</tt> somewhere into  the method body.
Line 46: Line 46:
## Remove the breakpoint
## Remove the breakpoint
## Remove the bookmark
## Remove the bookmark
-
#* {{result|EXPECTED RESULT:    The arrow is used for cycling among multiple annotations, so that you can see all annotations. In this case there should be 3 annotations: the bookmark, the breakpoint and error annotation.             }}
+
#* {{result|EXPECTED RESULT:    The arrow is used for cycling among multiple annotations, so that you can see all annotations. In this case there should be 3 annotations: the bookmark, the breakpoint and error annotation.               }}
====Test suite: Code Templates====
====Test suite: Code Templates====
-
<!-- minutes: 15 -->
+
<!-- minutes: 20 -->
Purpose: Tests the code templates functionality inside NetBeans editor. <br/>
Purpose: Tests the code templates functionality inside NetBeans editor. <br/>
# {{testcase|Code templates UI}}
# {{testcase|Code templates UI}}
Line 55: Line 55:
## Select Editor | Code Templates
## Select Editor | Code Templates
## Select ''Language: Java''
## Select ''Language: Java''
-
#* {{result|EXPECTED RESULT:The table contains predefined code templates           }}
+
#* {{result|EXPECTED RESULT:The table contains predefined code templates. Each template has  ''Expanded Text'', ''Description'' and ''Context''          }}
# {{testcase|Code Template Invocation from Abbreviation}}
# {{testcase|Code Template Invocation from Abbreviation}}
## Type into editor "fori".
## Type into editor "fori".
## Press tab (default shortcut for code template).
## Press tab (default shortcut for code template).
-
#* {{result|EXPECTED RESULT:   Code template for the for() cycle with iteration variable i should appear.             }}
+
#* {{result|EXPECTED RESULT:Code template for the for() cycle with iteration variable i should appear.               }}
# {{testcase|Code Template Invocation from Code Completion}}
# {{testcase|Code Template Invocation from Code Completion}}
-
## Type into editor "for".
+
## Type into editor "for". (in the method body)
## Press Ctrl-Space to invoke code completion.
## Press Ctrl-Space to invoke code completion.
-
#* {{result|EXPECTED RESULT:   Several variants of for cycle should appear (over array and over collection). It is possible to choose one of them and cycle using tab through the editable fields.             }}
+
#* {{result|EXPECTED RESULT:Several variants of for cycle should appear (over array and over collection). It is possible to choose one of them and cycle using tab through the editable fields.             }}
 +
# {{testcase|Code Template Invocation from CC by abbrev}}
 +
## In editor in method body type ''2a''
 +
## Call code completion
 +
#* {{result|EXPECTED RESULT:Code completion should provide code template with abbrev ''2ar'',  after confirmation the abbrev is replaced with ''clazz[] arr = coll.toArray(new clazz[coll.size()]);'' }}
# {{testcase|Adding new Code Template}}
# {{testcase|Adding new Code Template}}
## Open Options Dialog  | Editor | Code Template | Language Java
## Open Options Dialog  | Editor | Code Template | Language Java
Line 73: Line 77:
## Close OD by pressing ''OK''
## Close OD by pressing ''OK''
## Try abbreviation in editor - type '''abb''' and press ''tab''
## Try abbreviation in editor - type '''abb''' and press ''tab''
-
#* {{result|EXPECTED RESULT:    Code template is correctly added. The new abbreviation is correctly expanded to defined code when used.           }}
+
#* {{result|EXPECTED RESULT:    Code template is correctly added. The new abbreviation is correctly expanded to defined code when used.           }}
# {{testcase|Adding new Code Template - negative case}}
# {{testcase|Adding new Code Template - negative case}}
## Try adding new code template with the abbreviation which is already used
## Try adding new code template with the abbreviation which is already used
-
#* {{result|EXPECTED RESULT:               }}
+
#* {{result|EXPECTED RESULT:It is not possible to add such template. After entering abbreviation warning dialog appears,  ''Duplicate abbreviations are not allowed''                }}
# {{testcase|Removing Code Template}}
# {{testcase|Removing Code Template}}
## Open Tools -> Editor -> Code Templates
## Open Tools -> Editor -> Code Templates
## Select one template
## Select one template
## Press '''Remove'''
## Press '''Remove'''
-
#* {{result|EXPECTED RESULT:  The code template is removed from the list, the abbreviation is not expanded any more           }}
+
#* {{result|EXPECTED RESULT:  The code template is removed from the list, the abbreviation is not expanded any more           }}
# {{testcase|Change Expand key}}
# {{testcase|Change Expand key}}
## Open Tools -> Editor -> Code Templates
## Open Tools -> Editor -> Code Templates
## Change Expand Key to space
## Change Expand Key to space
-
#* {{result|EXPECTED RESULT:      The abbreviations are now expanded by space and not tab             }}
+
#* {{result|EXPECTED RESULT:      The abbreviations are now expanded by space and not tab               }}
# {{testcase|Change action after expanding}}
# {{testcase|Change action after expanding}}
## Open Tools -> Editor -> Code Templates
## Open Tools -> Editor -> Code Templates
## Change ''On Template Expand'' value
## Change ''On Template Expand'' value
## Try expanding code template in editor
## Try expanding code template in editor
-
#* {{result|EXPECTED RESULT:  The template is inserted and chosen action is performed:<br/>Reformat - the code is  reformated, the inserted code is placed at correct position <br/>Reindent - the template is placed at position related to previous code <br/> Nothing - the template is inserted at current cursor position as it is         }}
+
#* {{result|EXPECTED RESULT:  The template is inserted and chosen action is performed:<br/>Reformat - the code is  reformated, the inserted code is placed at correct position <br/>Reindent - the template is placed at position related to previous code <br/> Nothing - the template is inserted at current cursor position as it is         }}
# {{testcase|Traversing through Code Templates}}
# {{testcase|Traversing through Code Templates}}
## Invoke the ''fori'' code template.
## Invoke the ''fori'' code template.
Line 97: Line 101:
## Try to edit various fields from code template.
## Try to edit various fields from code template.
## Once outside code template try to edit the code inside the for cycle.
## Once outside code template try to edit the code inside the for cycle.
-
#* {{result|EXPECTED RESULT:  It should be possible to cycle through the template in both directions. Editing should work properly and all synchronized block should be updated at once. When editing code template is finished the synchronized block are not enabled any more.         }}
+
#* {{result|EXPECTED RESULT:  It should be possible to cycle through the template in both directions. Editing should work properly and all synchronized block should be updated at once. When editing code template is finished the synchronized block are not enabled any more.           }}
-
# {{testcase|Defining Custom Code Templates}}
+
-
## Open new Options dialog and go to Editor | Code Templates.
+
-
## Add a code template called forx with code: TBD
+
-
## Try to invoke the new code template by both code completion and as an abbreviation.
+
-
#* {{result|EXPECTED RESULT:      In both cases the template should be filled in and should work properly.              }}
+
# {{testcase|Using block code templates}}
# {{testcase|Using block code templates}}
## Select part of code in editor
## Select part of code in editor
-
## Hint icon should be provided. Press '''Alt-Enter''' and select some of the "wrap with" template
+
## Hint icon should be provided. Press '''Alt-Enter''' and select some of the "surround with" template
-
#* {{result|EXPECTED RESULT:Code template is inserted so the selected code is wrapped inside the template         }}
+
#* {{result|EXPECTED RESULT:Code template is inserted so the selected code is wrapped inside the template         }}
 +
# {{testcase|Creating Custom Block Template}}
 +
## Create new template with following text ''<nowiki>{ ${selection} }</nowiki>''
 +
## Add description ''Wrap with block''
 +
## In editor select some code and press ''Alt-Enter''
 +
#* {{result|EXPECTED RESULT:The description of newly defined template is in the opened popup. After confirming the related item by enter, the selected code is wrapped by the template }}
 +
# {{testcase|Changing scope of template}}
 +
## Open Code Templates setting
 +
## select ''for'' template
 +
## switch to scope tab
 +
## select ''COMPILATION_UNIT'' and unselect ''IF'' scope
 +
## Try expanding ''for'' template between package statement and class declaration
 +
## Try expanding ''for'' template just behind code ''if(true)''
 +
#* {{result|EXPECTED RESULT:''for'' template can by now expanded in the compilation unit scope (in the file, outside the class) and cannot be expanded after if statement. Note that  if there is {} after ''if'' statement that the scope inside the brackets is BLOCK, not IF. The code completion will provide the template if it is expandable in actual scope. }}
 +
# {{testcase|Custom scope without scope}}
 +
## Create new custom template (as in one of previous test cases)
 +
## Try expand template (by abbreviation or code completion) at various scopes in the class
 +
#* {{result|EXPECTED RESULT:The template can by expanded everywhere (not in javadoc, it is different mime type) }}
 +
# {{testcase|Custom template with scope}}
 +
## Use template from previous test case
 +
## In the scope tab select some scope
 +
## Try expanding the template in the editor
 +
#* {{result|EXPECTED RESULT:The template is expandable (by abbreviation or from code completion) only at the selected scopes. This is valid also for block templates (the related hint is not provided in the incorrect scope) }}
====Test suite: Commenting code====
====Test suite: Commenting code====
Line 113: Line 134:
## Open any java file
## Open any java file
## Try to comment and uncomment several lines by pressing '''CTRL+/'''
## Try to comment and uncomment several lines by pressing '''CTRL+/'''
-
#* {{result|EXPECTED RESULT:  The selected lines should be commented by //.<br>- If only commented lines are selected this action will uncomment them.             }}
+
#* {{result|EXPECTED RESULT:  The selected lines should be commented by //.<br>- If only commented lines are selected this action will uncomment them.             }}
# {{testcase|Comment/Uncomment line}}
# {{testcase|Comment/Uncomment line}}
## Try to comment/uncomment lines using comment and uncomment buttons in editor toolbar
## Try to comment/uncomment lines using comment and uncomment buttons in editor toolbar
-
#* {{result|EXPECTED RESULT:  Comment button should add '//' at the beginning of line, the uncomment button will remove it.             }}
+
#* {{result|EXPECTED RESULT:  Comment button should add '//' at the beginning of line, the uncomment button will remove it.               }}
====Test suite: Error stripe====
====Test suite: Error stripe====
Line 124: Line 145:
## Open java file without any errors or warnings.
## Open java file without any errors or warnings.
## Remove all bookmarks, breakpoints, mark occurrences etc...
## Remove all bookmarks, breakpoints, mark occurrences etc...
-
#* {{result|EXPECTED RESULT:  The status box is green, the error stripe               }}
+
#* {{result|EXPECTED RESULT:  The status box is green, the error stripe               }}
# {{testcase|File with errors }}
# {{testcase|File with errors }}
## Open java file from the previous test case
## Open java file from the previous test case
Line 131: Line 152:
## Add some code with error
## Add some code with error
## Remove all warnings/errors
## Remove all warnings/errors
-
#* {{result|EXPECTED RESULT:  When file contains warning the status box is yellow, in the error stripe there is yellow mark. When there is error in the file the status box is red and the mark in error stripe  is red. Whenever mouse is hovering over the status box the info about status is showed (e.g. "1 error(s) 2 warning(s)"). After removing the errors and warnings the status box is green again.             }}
+
#* {{result|EXPECTED RESULT:  When file contains warning the status box is yellow, in the error stripe there is yellow mark. When there is error in the file the status box is red and the mark in error stripe  is red. Whenever mouse is hovering over the status box the info about status is showed (e.g. "1 error(s) 2 warning(s)"). After removing the errors and warnings the status box is green again.               }}
# {{testcase|Caret position}}
# {{testcase|Caret position}}
## Open file which is longer than editor window
## Open file which is longer than editor window
## Try scroll to beginning and end of the document (by arrows, page up/down and scroll wheel)
## Try scroll to beginning and end of the document (by arrows, page up/down and scroll wheel)
-
#* {{result|EXPECTED RESULT:  The caret symbol in error stripe (thin line with little square in the middle) moves to proper places when scrolling. When the caret is in the beginning of the document the symbol is in the top of error stripe, when the caret is at the end, the symbol is at the bottom.               }}
+
#* {{result|EXPECTED RESULT:  The caret symbol in error stripe (thin line with little square in the middle) moves to proper places when scrolling. When the caret is in the beginning of the document the symbol is in the top of error stripe, when the caret is at the end, the symbol is at the bottom.               }}
# {{testcase|Error stripe navigation}}
# {{testcase|Error stripe navigation}}
## Open java file
## Open java file
## Put several bookmarks in the file and/or use mark occurrences feature
## Put several bookmarks in the file and/or use mark occurrences feature
## Click on marks in error stripe
## Click on marks in error stripe
-
#* {{result|EXPECTED RESULT:  The file is scrolled to show related place in editor, when hovering over the mark the mouse cursor is changed to tooltip informs about the type of the mark             }}
+
#* {{result|EXPECTED RESULT:  The file is scrolled to show related place in editor, when hovering over the mark the mouse cursor is changed to tooltip informs about the type of the mark             }}
# {{testcase|Error stripe colors}}
# {{testcase|Error stripe colors}}
## Open java file
## Open java file
Line 149: Line 170:
## Change line, add line, remove some lines (if the document is under version control)
## Change line, add line, remove some lines (if the document is under version control)
## Turn on mark occurrences (in Options -> Editor -> Highlighting -> Language: Java) and put cart over identifier with more occurrences
## Turn on mark occurrences (in Options -> Editor -> Highlighting -> Language: Java) and put cart over identifier with more occurrences
-
#* {{result|EXPECTED RESULT:  All this actions adds mark in error stripe, these marks differ by color - errors are red, warnings yellow, bookmarks dark gray, changed lines blue, removed lines ping, new lines green, etc...           }}
+
#* {{result|EXPECTED RESULT:  All this actions adds mark in error stripe, these marks differ by color - errors are red, warnings yellow, bookmarks dark gray, changed lines blue, removed lines ping, new lines green, etc...             }}
====Test suite: Java Macros====
====Test suite: Java Macros====
Line 159: Line 180:
## Inside appeared dialog, type new macro's name and choose some free keybindings for it. (the warning should appear when trying to assign already used shortcut)
## Inside appeared dialog, type new macro's name and choose some free keybindings for it. (the warning should appear when trying to assign already used shortcut)
## Open java source file into editor and try using new macro's keybinding.
## Open java source file into editor and try using new macro's keybinding.
-
#* {{result|EXPECTED RESULT:  Macro is added to the list and properly works in editor         }}
+
#* {{result|EXPECTED RESULT:  Macro is added to the list and properly works in editor         }}
# {{testcase|Change shortcut}}
# {{testcase|Change shortcut}}
## Open '''Tools | Options | Editor | Macros'''
## Open '''Tools | Options | Editor | Macros'''
## Change the shortcut of macro created in previous test case to something else
## Change the shortcut of macro created in previous test case to something else
## Invoke macro in editor
## Invoke macro in editor
-
#* {{result|EXPECTED RESULT:  Only new shortcut invokes the macro         }}
+
#* {{result|EXPECTED RESULT:  Only new shortcut invokes the macro         }}
# {{testcase|Delete macro}}
# {{testcase|Delete macro}}
## Open '''Tools | Options |  Editor | Macros'''
## Open '''Tools | Options |  Editor | Macros'''
## Delete macro created in previous test case
## Delete macro created in previous test case
## Try to invoke deleted macro in editor
## Try to invoke deleted macro in editor
-
#* {{result|EXPECTED RESULT:  Macro is deleted and cannot be invoked any more         }}
+
#* {{result|EXPECTED RESULT:  Macro is deleted and cannot be invoked any more         }}
# {{testcase|Create macro in Options}}
# {{testcase|Create macro in Options}}
## Open '''Tools | Options | Editor | Macros'''
## Open '''Tools | Options | Editor | Macros'''
## Click to '''Add''' button and create new macro
## Click to '''Add''' button and create new macro
## Set shortcut for the new macro
## Set shortcut for the new macro
-
#* {{result|EXPECTED RESULT:  New macro is created and can be invoked         }}
+
#* {{result|EXPECTED RESULT:  New macro is created and can be invoked         }}
====Test suite: Line tools====
====Test suite: Line tools====
Line 182: Line 203:
## Put caret in document
## Put caret in document
## Press Alt-Shift-Up / Alt-Shift-Down
## Press Alt-Shift-Up / Alt-Shift-Down
-
#* {{result|EXPECTED RESULT:  Actual line is moved one line up/down             }}
+
#* {{result|EXPECTED RESULT:  Actual line is moved one line up/down               }}
# {{testcase|Move selection}}
# {{testcase|Move selection}}
## Put caret in document
## Put caret in document
## Select several lines
## Select several lines
## Press Alt-Shift-Up / Alt-Shift-Down
## Press Alt-Shift-Up / Alt-Shift-Down
-
#* {{result|EXPECTED RESULT:  Whole selected block (including the lines which are not selected whole but at least partially) is moved             }}
+
#* {{result|EXPECTED RESULT:  Whole selected block (including the lines which are not selected whole but at least partially) is moved               }}
# {{testcase|Copy line }}
# {{testcase|Copy line }}
## Put caret in document
## Put caret in document
## Press Ctrl-Shift-Up / Ctrl-Shift-Down
## Press Ctrl-Shift-Up / Ctrl-Shift-Down
-
#* {{result|EXPECTED RESULT:  The actual line is duplicated below/above current line             }}
+
#* {{result|EXPECTED RESULT:  The actual line is duplicated below/above current line             }}
# {{testcase|Copy block }}
# {{testcase|Copy block }}
## Put caret in document
## Put caret in document
## Select several lines
## Select several lines
## Press Ctrl-Shift-Up / Ctrl-Shift-Down
## Press Ctrl-Shift-Up / Ctrl-Shift-Down
-
#* {{result|EXPECTED RESULT:  The whole selection (including whole partly selected lines) is duplicated below/above current selected block             }}
+
#* {{result|EXPECTED RESULT:  The whole selection (including whole partly selected lines) is duplicated below/above current selected block             }}
# {{testcase|Move horizontally }}
# {{testcase|Move horizontally }}
## Put caret in java class
## Put caret in java class
## Press '''Alt-Shift-Left''' /  '''Alt-Shift-Right'''
## Press '''Alt-Shift-Left''' /  '''Alt-Shift-Right'''
## Select several lines are press again Press '''Alt-Shift-Left''' /  '''Alt-Shift-Right'''
## Select several lines are press again Press '''Alt-Shift-Left''' /  '''Alt-Shift-Right'''
-
#* {{result|EXPECTED RESULT:  Actual line ( or selected lines) are move left/right by one indentation level (this must respect formatting settings)         }}
+
#* {{result|EXPECTED RESULT:  Actual line ( or selected lines) are move left/right by one indentation level (this must respect formatting settings)         }}
# {{testcase|Interaction with guarded blocks }}
# {{testcase|Interaction with guarded blocks }}
## Create new JForm file or open any file with guarded blocks
## Create new JForm file or open any file with guarded blocks
## Try to move/copy within guarded block
## Try to move/copy within guarded block
## Select line outside the guarded block and try to move it inside
## Select line outside the guarded block and try to move it inside
-
#* {{result|EXPECTED RESULT:  Line tools should not affect guarded block, moving line inside guarded block cannot be performed         }}
+
#* {{result|EXPECTED RESULT:  Line tools should not affect guarded block, moving line inside guarded block cannot be performed         }}
# {{testcase|Move up in AST}}
# {{testcase|Move up in AST}}
-
## Open '''LineTools.java'''
+
## Open '''LineTools.java''' from javaeditor package
## Put cursor at line 18, just behind the ''r''
## Put cursor at line 18, just behind the ''r''
## Press ''Alt-Shift-PgUp'' several times, until it beeps
## Press ''Alt-Shift-PgUp'' several times, until it beeps
-
#* {{result|EXPECTED RESULT: The whole AST branch (the variable declaration and the whole anonymous class) is moved upward in the AST. E.g. first time is it moved before the String variable, next time it is moved out of inner class. When there is not suitable place, the element can be moved to, the IDE beeps;     }}
+
#* {{result|EXPECTED RESULT: The whole AST branch (the variable declaration and the whole anonymous class) is moved upward in the AST. E.g. first time is it moved before the String variable, next time it is moved out of inner class. When there is not suitable place, the element can be moved to, the IDE beeps;     }}
# {{testcase|Move down in AST}}
# {{testcase|Move down in AST}}
## Open '''LineTools.java''', undo any changes from previous test case.
## Open '''LineTools.java''', undo any changes from previous test case.
## Put cursor at line 13, just behind the ''a''
## Put cursor at line 13, just behind the ''a''
## Press ''Alt-Shift-PgUp'' several times, until it beeps
## Press ''Alt-Shift-PgUp'' several times, until it beeps
-
#* {{result|EXPECTED RESULT:The element is moved down in the AST, e.g. if the next element can wrap the selected element, it is moved into it - (''a'' declaration is moved into inner class) if the actual element cannot be wrapped it is moved behind.     }}
+
#* {{result|EXPECTED RESULT:The element is moved down in the AST, e.g. if the next element can wrap the selected element, it is moved into it - (''a'' declaration is moved into inner class) if the actual element cannot be wrapped it is moved behind.     }}
====Test suite: Smart Brackets====
====Test suite: Smart Brackets====
<!-- minutes: 5 -->
<!-- minutes: 5 -->
# {{testcase|Smart pairs}}
# {{testcase|Smart pairs}}
-
## Type <tt> private String[[ </tt> in body of class
+
## Type <tt> private String[ </tt> in body of class
## Push '''Backspace''' key
## Push '''Backspace''' key
## Type <tt> private String S = new String( </tt>  in body of class
## Type <tt> private String S = new String( </tt>  in body of class
Line 227: Line 248:
## Type <tt> if((11=11) & (2==3|) </tt> in an empty body of a method (place caret as suggested by '|')
## Type <tt> if((11=11) & (2==3|) </tt> in an empty body of a method (place caret as suggested by '|')
## Press '''')'''' key '''twice'''
## Press '''')'''' key '''twice'''
-
#* {{result|EXPECTED RESULT: <br>- When you press ')' for the first time, a new bracket is inserted after '3', so that brackets are correctly balanced. When you press ')' for the second time, the bracket is skipped (again - in order to keep number of closing/opening brackets balanced).             }}
+
#* {{result|EXPECTED RESULT:When typing '[' in the step 1, the closing ']' is automatically added, pressing '''Backspace''' remove both braces<br/>In the 3. step the closing ')' is added. Backspace deletes both braces<br> When you press ')' for the first time (step 6), a new bracket is inserted after '3', so that brackets are correctly balanced. When you press ')' for the second time, the bracket is skipped ( in order to keep number of closing/opening brackets balanced).               }}
# {{testcase|Enter after opening curly bracket}}
# {{testcase|Enter after opening curly bracket}}
## Move caret inside a method.
## Move caret inside a method.
## Type <tt> if (true) { </tt>
## Type <tt> if (true) { </tt>
## Push '''Enter''' key
## Push '''Enter''' key
-
#* {{result|EXPECTED RESULT:  The closing bracket should be added automatically and indented properly             }}
+
#* {{result|EXPECTED RESULT:  The closing bracket should be added automatically and indented properly               }}
# {{testcase|Undo with bracket completion}}
# {{testcase|Undo with bracket completion}}
## Try to Undo actions from previous test cases.
## Try to Undo actions from previous test cases.
-
#* {{result|EXPECTED RESULT:  Undo is working exactly in the opposite direction for all of these actions.             }}
+
#* {{result|EXPECTED RESULT:  Undo is working exactly in the opposite direction for all of these actions.               }}
# {{testcase|Brackets highlighting}}
# {{testcase|Brackets highlighting}}
## Type in editor:  if(true) {<br><br>}
## Type in editor:  if(true) {<br><br>}
## Put caret just behind the some of the closing bracket - '}', ')' or ']'
## Put caret just behind the some of the closing bracket - '}', ')' or ']'
-
## Press '''Ctrl+'[[''''
+
## Press '''Ctrl+['''
## Repeat with all types of brackets
## Repeat with all types of brackets
-
#* {{result|EXPECTED RESULT:  The matching bracket is highlighted, shortcut '''Ctrl-'[['''' moves caret to matching bracket.             }}
+
#* {{result|EXPECTED RESULT:  The matching bracket is highlighted, shortcut '''Ctrl-[''' moves caret to matching bracket.               }}
====Test suite: Syntax Coloring====
====Test suite: Syntax Coloring====
Line 249: Line 270:
## Open class <tt> coloring.Colors </tt> from sample project
## Open class <tt> coloring.Colors </tt> from sample project
## Check coloring of class members
## Check coloring of class members
-
#* {{result|EXPECTED RESULT:  [[Image:TS_JavaEditor_members.png | Members Coloring]]             }}
+
#* {{result|EXPECTED RESULT:  [[Image:TS_JavaEditor_members.png | Members Coloring]]               }}
# {{testcase|Static Members}}
# {{testcase|Static Members}}
## Open class <tt> coloring.Colors2 </tt> from sample project
## Open class <tt> coloring.Colors2 </tt> from sample project
## Check coloring of static members
## Check coloring of static members
## Delete <tt> static </tt> keyword
## Delete <tt> static </tt> keyword
-
#* {{result|EXPECTED RESULT:  The static elements (inner class, fields, method) are written in italics. After deleting "static" keyword the fort is changed to regular         }}
+
#* {{result|EXPECTED RESULT:  The static elements (inner class, fields, method) are written in italics. After deleting "static" keyword the fort is changed to regular         }}
# {{testcase|Unused Private Elements}}
# {{testcase|Unused Private Elements}}
## Open class <tt> coloring.ColorsPrivateUnused </tt> from sample project.
## Open class <tt> coloring.ColorsPrivateUnused </tt> from sample project.
## Check coloring of private elements
## Check coloring of private elements
## Change the 'private' to 'public' and/or write code which uses private elements
## Change the 'private' to 'public' and/or write code which uses private elements
-
#* {{result|EXPECTED RESULT:  All unused private elements are underlined by gray line, When used or turned to public the underline is gone.         }}
+
#* {{result|EXPECTED RESULT:  All unused private elements are underlined by gray line, When used or turned to public the underline is gone.         }}
# {{testcase|Method Parameters and Variables}}
# {{testcase|Method Parameters and Variables}}
## Open class <tt> coloring.ColorsParameters </tt> from sample project
## Open class <tt> coloring.ColorsParameters </tt> from sample project
## Check colors
## Check colors
## Try to make unused variables used.
## Try to make unused variables used.
-
#* {{result|EXPECTED RESULT:      [[Image:TS_Java_Editor_parameters.png | Image:Parameters Coloring]]             }}
+
#* {{result|EXPECTED RESULT:      [[Image:TS_Java_Editor_parameters.png | Image:Parameters Coloring]]               }}
# {{testcase|Unused Imports}}
# {{testcase|Unused Imports}}
## Open class <tt> coloring.Imports </tt> from sample project
## Open class <tt> coloring.Imports </tt> from sample project
## Make sure that hints are turned off (Tools -> Options -> Editor -> Hints -> Import -> Unused Import) otherwise the underline color will be yellow - default color for fixable hints
## Make sure that hints are turned off (Tools -> Options -> Editor -> Hints -> Import -> Unused Import) otherwise the underline color will be yellow - default color for fixable hints
## Check colors
## Check colors
-
#* {{result|EXPECTED RESULT:  Unused imports are gray underlined             }}
+
#* {{result|EXPECTED RESULT:  Unused imports are gray underlined             }}
====Test suite: Camel case setting====
====Test suite: Camel case setting====
Line 278: Line 299:
## Use ctrl-left/right to jump over the declaration
## Use ctrl-left/right to jump over the declaration
## In options disable 'Enable Camel Case Navigation for Java' (Options->Editor->General)
## In options disable 'Enable Camel Case Navigation for Java' (Options->Editor->General)
-
#* {{result|EXPECTED RESULT:  When the option is enabled the cursor jumps also between upper case letter in identifier. If it is off the cursor jumps among whole words only.           }}
+
#* {{result|EXPECTED RESULT:  When the option is enabled the cursor jumps also between upper case letter in identifier. If it is off the cursor jumps among whole words only.             }}
# {{testcase|Delete next/prev}}
# {{testcase|Delete next/prev}}
## Put cursor in the middle of 'DefaultTableModel'
## Put cursor in the middle of 'DefaultTableModel'
-
## Use ctrl-delte/backspace
+
## Use CTRL-DEL/CTRL-BACKSPACE
## In options toggle 'Enable Camel Case Navigation for Java' (Options->Editor->General)
## In options toggle 'Enable Camel Case Navigation for Java' (Options->Editor->General)
## Undo changes and try Use ctrl-delte/backspace
## Undo changes and try Use ctrl-delte/backspace
-
#* {{result|EXPECTED RESULT:  The part for current position to next/prev upper case letter is deleted when the option is enabled, the part to the end/beginning of word is deleted when the option is off.           }}
+
#* {{result|EXPECTED RESULT:  The part for current position to next/prev upper case letter is deleted when the option is enabled, the part to the end/beginning of word is deleted when the option is off.             }}
====Test suite: Fix Imports====
====Test suite: Fix Imports====
Line 293: Line 314:
## Call Fix Imports (context menu or Ctrl-Shift-I)
## Call Fix Imports (context menu or Ctrl-Shift-I)
## Select right classes in comboboxes and confirm
## Select right classes in comboboxes and confirm
-
#* {{result|EXPECTED RESULT:  3 imports are properly added, one import is marked as <cannot be resolved> in the dialog. Correct the typo from FireReader to FileReader and try it again. All class can be resolved now.           }}
+
#* {{result|EXPECTED RESULT:  3 imports are properly added, one import is marked as <cannot be resolved> in the dialog. Correct the typo from FireReader to FileReader and try it again. All class can be resolved now.             }}
# {{testcase|Unresolved Class }}
# {{testcase|Unresolved Class }}
## Open <tt> fiximports.FixImports </tt> from the sample project
## Open <tt> fiximports.FixImports </tt> from the sample project
## Add line <tt> LoremIpsumDolorSitAmet variable; </tt>
## Add line <tt> LoremIpsumDolorSitAmet variable; </tt>
## Call Fix Import
## Call Fix Import
-
#* {{result|EXPECTED RESULT:     The dialog contains <tt> &lt;cannot be resolved&gt; </tt>             }}
+
#* {{result|EXPECTED RESULT:The statusbar contains <tt> &lt;Nothing to fix in import statements&gt; </tt>             }}
# {{testcase|Fast Import}}
# {{testcase|Fast Import}}
## Open <tt> fiximports.FixImports </tt> from the sample project
## Open <tt> fiximports.FixImports </tt> from the sample project
Line 304: Line 325:
## Put caret on unresolved symbol and press '''Alt-Shift-I'''
## Put caret on unresolved symbol and press '''Alt-Shift-I'''
## Select required class from list and confirm by Enter
## Select required class from list and confirm by Enter
-
#* {{result|EXPECTED RESULT:      Selected class is imported             }}
+
#* {{result|EXPECTED RESULT:      Selected class is imported             }}
# {{testcase|Fast Import - package}}
# {{testcase|Fast Import - package}}
## Open <tt> fiximports.FixImports </tt> from the sample project
## Open <tt> fiximports.FixImports </tt> from the sample project
Line 310: Line 331:
## Put caret on unresolved symbol and press '''Alt-Shift-I'''
## Put caret on unresolved symbol and press '''Alt-Shift-I'''
## Select required class from list and confirm by '''Alt-Enter'''
## Select required class from list and confirm by '''Alt-Enter'''
-
#* {{result|EXPECTED RESULT:      Whole package is imported             }}
+
#* {{result|EXPECTED RESULT:      Whole package is imported             }}
# {{testcase|Fast Import - FQN}}
# {{testcase|Fast Import - FQN}}
## Open <tt> fiximports.FixImports </tt> from the sample project
## Open <tt> fiximports.FixImports </tt> from the sample project
Line 316: Line 337:
## Put caret on unresolved symbol and press '''Alt-Shift-I'''
## Put caret on unresolved symbol and press '''Alt-Shift-I'''
## Select required class from list and confirm by '''Shift-Enter'''
## Select required class from list and confirm by '''Shift-Enter'''
-
#* {{result|EXPECTED RESULT:      The identifier is replaced with FQN             }}
+
#* {{result|EXPECTED RESULT:      The identifier is replaced with FQN             }}
# {{testcase|Fix Import Hint}}
# {{testcase|Fix Import Hint}}
## Open <tt> fiximports.FixImports </tt> from the sample project
## Open <tt> fiximports.FixImports </tt> from the sample project
## Delete all import statements
## Delete all import statements
## At each line with unresolved symbol use hint to add import statement
## At each line with unresolved symbol use hint to add import statement
-
#* {{result|EXPECTED RESULT:  All imports are added  correctly         }}
+
#* {{result|EXPECTED RESULT:  All imports are added  correctly           }}
====Test suite: Mark Occurrences====
====Test suite: Mark Occurrences====
<!-- minutes: 15 -->
<!-- minutes: 15 -->
 +
Purpose: This test suite describes the functionality of the mark occurrences feature.<br/>
# {{testcase|Show Usages}}
# {{testcase|Show Usages}}
## Open <tt> occurrences.MarkOccurrences </tt> from the sample project
## Open <tt> occurrences.MarkOccurrences </tt> from the sample project
## Put cursor on name of variable/field/method/parameter (eg. <tt> variable </tt> on line 40, <tt> field </tt> on line 31, <tt> method </tt> on line 33, <tt> param </tt> on line 33)
## Put cursor on name of variable/field/method/parameter (eg. <tt> variable </tt> on line 40, <tt> field </tt> on line 31, <tt> method </tt> on line 33, <tt> param </tt> on line 33)
-
#* {{result|EXPECTED RESULT:  All occurrences of selected element is highlighted in editor and error stripe.             }}
+
#* {{result|EXPECTED RESULT:  All occurrences of selected element is highlighted in editor and error stripe.             }}
# {{testcase|Return Points}}
# {{testcase|Return Points}}
## Open <tt> occurrences.MarkOccurrences </tt> from the sample project
## Open <tt> occurrences.MarkOccurrences </tt> from the sample project
## Put caret on return type of <tt> method </tt> at line 33
## Put caret on return type of <tt> method </tt> at line 33
## Put caret on exception in throws clause statement at line 33
## Put caret on exception in throws clause statement at line 33
-
#* {{result|EXPECTED RESULT:  In step 2 all exit point from method are highlighted (4 occurrences). In next step only places where the selected exception is thrown are highlighted (2 occurrences).           }}
+
#* {{result|EXPECTED RESULT:  In step 2 all exit point from method are highlighted (4 occurrences). In next step only places where the selected exception is thrown are highlighted (2 occurrences).             }}
# {{testcase|Show Usages - Class}}
# {{testcase|Show Usages - Class}}
## Open <tt> occurrences.MarkOccurrences </tt> from the sample project
## Open <tt> occurrences.MarkOccurrences </tt> from the sample project
## Put caret on <tt> String </tt> at line 31
## Put caret on <tt> String </tt> at line 31
-
#* {{result|EXPECTED RESULT:      All usages of <tt>java.lang.String</tt> in current class are highlighted             }}
+
#* {{result|EXPECTED RESULT:      All usages of <tt>java.lang.String</tt> in current class are highlighted             }}
# {{testcase|Options - On/Off}}
# {{testcase|Options - On/Off}}
## Open options and disable <tt> Mark Occurrences Of Symbol Under Caret </tt> (Editor -> Highlighting -> Language: Java)
## Open options and disable <tt> Mark Occurrences Of Symbol Under Caret </tt> (Editor -> Highlighting -> Language: Java)
## Go back to editor, put caret on any identifier (method name, class name, field)
## Go back to editor, put caret on any identifier (method name, class name, field)
## Enable MarkOccurrences again
## Enable MarkOccurrences again
-
#* {{result|EXPECTED RESULT:  While MO (Mark Occurrences) is disabled, no occurrences are highlighted.             }}
+
#* {{result|EXPECTED RESULT:  While MO (Mark Occurrences) is disabled, no occurrences are highlighted.             }}
# {{testcase|Mark Occurrences - Types, Methods}}
# {{testcase|Mark Occurrences - Types, Methods}}
## Open options and disable <tt> Types </tt> and <tt> Methods </tt>
## Open options and disable <tt> Types </tt> and <tt> Methods </tt>
## Put caret on line 33 word <tt> method </tt> or line 31 word <tt> String </tt>
## Put caret on line 33 word <tt> method </tt> or line 31 word <tt> String </tt>
## Enable options again
## Enable options again
-
#* {{result|EXPECTED RESULT:  Occurrences on lines 31,33, 40 (for class) and 33,44 (for method) are not highlighted when options are disabled         }}
+
#* {{result|EXPECTED RESULT:  Occurrences on lines 31,33, 40 (for class) and 33,44 (for method) are not highlighted when options are disabled           }}
# {{testcase|Mark Occurrences - Constant, Fields, Variables}}
# {{testcase|Mark Occurrences - Constant, Fields, Variables}}
## Open options and disable <tt> Constants </tt>, <tt> Fields </tt> and <tt> Local Variables </tt>
## Open options and disable <tt> Constants </tt>, <tt> Fields </tt> and <tt> Local Variables </tt>
## Put caret on line 85 word <tt> KONST </tt>,on line 31 word <tt> field </tt> or on line 40 word <tt> variable </tt>
## Put caret on line 85 word <tt> KONST </tt>,on line 31 word <tt> field </tt> or on line 40 word <tt> variable </tt>
## Enable options again
## Enable options again
-
#* {{result|EXPECTED RESULT:      No occurrences of actual element is highlighted in step 2             }}
+
#* {{result|EXPECTED RESULT:      No occurrences of actual element is highlighted in step 2             }}
# {{testcase|Mark Occurrences - Exceptions, Exit Points}}
# {{testcase|Mark Occurrences - Exceptions, Exit Points}}
## Open options and disable <tt> Exceptions Throwing Points </tt>
## Open options and disable <tt> Exceptions Throwing Points </tt>
Line 361: Line 383:
## Put caret on line 33 word <tt> IOException </tt>
## Put caret on line 33 word <tt> IOException </tt>
## Enable the option
## Enable the option
-
#* {{result|EXPECTED RESULT:      In step 2) the editor highlights both exit point from method (return and throw - 4 occurrences). In step 3) occurrences of class IOException are marked (3 occurrences, watch the Keep Marks option). In step 5) all occurrences of String  are highlighted (3) and in step 6) 2 places where can be thrown selected exception are marked           }}
+
#* {{result|EXPECTED RESULT:      In step 2) the editor highlights both exit point from method (return and throw - 4 occurrences). In step 3) occurrences of class IOException are marked (3 occurrences, watch the Keep Marks option). In step 5) all occurrences of String  are highlighted (3) and in step 6) 2 places where can be thrown selected exception are marked             }}
# {{testcase|Mark Occurrences - Implementing/Overriding methods}}
# {{testcase|Mark Occurrences - Implementing/Overriding methods}}
## Open options and disable <tt> Implementing Method </tt> and <tt> Overriding Method </tt>
## Open options and disable <tt> Implementing Method </tt> and <tt> Overriding Method </tt>
## Put caret on line 29 word <tt> DefaultTableModel </tt> or <tt> Runnable </tt>
## Put caret on line 29 word <tt> DefaultTableModel </tt> or <tt> Runnable </tt>
## Enable the options again and repeat step 2
## Enable the options again and repeat step 2
-
#* {{result|EXPECTED RESULT:  When cursor is located over superclass name in extends statement or over implemented interface in implements statement the methods from selected superclass/interface are highlighted. In step 2) this feature is disabled.           }}
+
#* {{result|EXPECTED RESULT:  When cursor is located over superclass name in extends statement or over implemented interface in implements statement the methods from selected superclass/interface are highlighted. In step 2) this feature is disabled.             }}
# {{testcase|Mark Occurrences - Label}}
# {{testcase|Mark Occurrences - Label}}
## Open options and disable <tt> Targets of Break and Continue statements </tt>
## Open options and disable <tt> Targets of Break and Continue statements </tt>
## Put caret on words <tt> break </tt> and <tt> continue </tt> on lines 74  and 77
## Put caret on words <tt> break </tt> and <tt> continue </tt> on lines 74  and 77
## Enable the option again and repeat step 2)
## Enable the option again and repeat step 2)
-
#* {{result|EXPECTED RESULT:  When option is ON the label and closing bracket of the related loop is highlighted, e.g. when caret is placed over break on line 74, the label <tt> L1 </tt> on line 66 and <tt> } </tt> on line 82 are marked.           }}
+
#* {{result|EXPECTED RESULT:  When option is ON the label and closing bracket of the related loop is highlighted, e.g. when caret is placed over break on line 74, the label <tt> L1 </tt> on line 66 and <tt> } </tt> on line 82 are marked.             }}
# {{testcase|Mark Occurrences - Keep marks}}
# {{testcase|Mark Occurrences - Keep marks}}
## Open options and disable <tt> Keep Marks </tt>
## Open options and disable <tt> Keep Marks </tt>
## Select several elements, which can be highlighted
## Select several elements, which can be highlighted
## Enable the option again and repeat step 2
## Enable the option again and repeat step 2
-
#* {{result|EXPECTED RESULT:  When option is disabled the actual mark occurrences marks are discarded when the location of caret is changed, regardless if another highlights are created or not. When enabled, the old marks are removed only in new set of marks is created.           }}
+
#* {{result|EXPECTED RESULT:  When option is disabled the actual mark occurrences marks are discarded when the location of caret is changed, regardless if another highlights are created or not. When enabled, the old marks are removed only in new set of marks is created.             }}
# {{testcase|Browsing }}
# {{testcase|Browsing }}
## Select element which has more occurrences (e.g class String)
## Select element which has more occurrences (e.g class String)
## Press '''Alt-Up''', '''Alt-Down'''
## Press '''Alt-Up''', '''Alt-Down'''
-
#* {{result|EXPECTED RESULT:  The caret jumps among the marks             }}
+
#* {{result|EXPECTED RESULT:  The caret jumps among the marks             }}
====Test suite: Syntax tree selection====
====Test suite: Syntax tree selection====
Line 387: Line 409:
# {{testcase|Moving to root}}
# {{testcase|Moving to root}}
## Open java class in editor put cursor somewhere in code
## Open java class in editor put cursor somewhere in code
-
## Press '''alt-shift-comma''' several times
+
## Press '''ALT-SHIFT-PERIOD''' several times
-
#* {{result|EXPECTED RESULT:The selection is enlarge to contain whole parent node (javadoc is respected) in syntax tree -> e.g identifier -> identifier with its javadoc ->method call->block-> method -> method with javadoc -> class -> class with javadoc -> class and imports ....           }}
+
#* {{result|EXPECTED RESULT:The selection is enlarge to contain whole parent node (javadoc is respected) in syntax tree -> e.g identifier -> identifier with its javadoc ->method call->block-> method -> method with javadoc -> class -> class with javadoc -> class and imports ....             }}
# {{testcase|Moving to leaf}}
# {{testcase|Moving to leaf}}
-
## Just after previous test case press '''alt-shift-period'''
+
## Just after previous test case press '''ALT-SHIFT-COMMA'''
## Try to mix this two testcases
## Try to mix this two testcases
-
#* {{result|EXPECTED RESULT:  The selection is reduced to lower node in AST. It ends when identifier around original cursor position is selected           }}
+
#* {{result|EXPECTED RESULT:  The selection is reduced to lower node in AST. It ends when identifier around original cursor position is selected             }}
# {{testcase|Moving Element Up}}
# {{testcase|Moving Element Up}}
## Open MoveElement.java
## Open MoveElement.java
## Put cursor on line 20
## Put cursor on line 20
## Try moving element up as possible (default shortcut ale-shift-page up)
## Try moving element up as possible (default shortcut ale-shift-page up)
-
#* {{result|EXPECTED RESULT:Whole selected element (toString method + annotation) is moved up in the AST - e.g. is jumps over elements in the same scope (int z; declaration). when the moved element is first in current scope then it is moved one level up in the AST - to the class InnerClass and then to MoveElement class. The IDE beeps when it is not possible to perform move       }}
+
#* {{result|EXPECTED RESULT:Whole selected element (toString method + annotation) is moved up in the AST - e.g. is jumps over elements in the same scope (int z; declaration). when the moved element is first in current scope then it is moved one level up in the AST - to the class InnerClass and then to MoveElement class. The IDE beeps when it is not possible to perform move       }}
# {{testcase|Moving Element Down}}
# {{testcase|Moving Element Down}}
## Use Move Element Down (alt-shift-page down) to get element to original position
## Use Move Element Down (alt-shift-page down) to get element to original position
-
#* {{result|EXPECTED RESULT:Element is moved down in AST, like in previous test case       }}
+
#* {{result|EXPECTED RESULT:Element is moved down in AST, like in previous test case       }}
====Test suite: Node tooltips====
====Test suite: Node tooltips====
Line 406: Line 428:
# {{testcase|Contains main method }}
# {{testcase|Contains main method }}
## Create class with main method
## Create class with main method
-
#* {{result|EXPECTED RESULT:  The class node in project view is decorated with green arrow and the tool tip says 'Contains Maim Method'         }}
+
#* {{result|EXPECTED RESULT:  The class node in project view is decorated with green arrow and the tool tip says 'Contains Main Method'         }}
# {{testcase|Error in file}}
# {{testcase|Error in file}}
## Open any file in project
## Open any file in project
## Add some syntax error in the class
## Add some syntax error in the class
## Remove the error again
## Remove the error again
-
#* {{result|EXPECTED RESULT:  The class containing the error is marked with the error badge, the badge is propagated to package, source root and project. The tooltip says 'Error parsing file' for file, and 'Contains files with error' for the other nodes. Once the error is corrected the badges disappears         }}
+
#* {{result|EXPECTED RESULT:  The class containing the error is marked with the error badge, the badge is propagated to package, source root and project. The tooltip says 'Error parsing file' for file, and 'Contains files with error' for the other nodes. Once the error is corrected the badges disappears         }}
# {{testcase|Need to be compiled}}
# {{testcase|Need to be compiled}}
## Open any class
## Open any class
Line 417: Line 439:
## Make some modification in editor
## Make some modification in editor
## Built the whole project
## Built the whole project
-
#* {{result|EXPECTED RESULT:  When file is modified a little wrench icon is added to the related node in project view. After building the project the icon is gone         }}
+
#* {{result|EXPECTED RESULT:  When file is modified a little wrench icon is added to the related node in project view. After building the project the icon is gone         }}
====Test suite: Add semicolon====
====Test suite: Add semicolon====
Line 424: Line 446:
## Open java file
## Open java file
## On non-empty line press '''ctrl-;'''
## On non-empty line press '''ctrl-;'''
-
#* {{result|EXPECTED RESULT:      The ';' is added to the end of line         }}
+
#* {{result|EXPECTED RESULT:      The ';' is added to the end of line         }}
# {{testcase|Add semicolon and new line}}
# {{testcase|Add semicolon and new line}}
## Open java file
## Open java file
## On non-empty line press '''ctrl-shift-;'''
## On non-empty line press '''ctrl-shift-;'''
-
#* {{result|EXPECTED RESULT:  The ';' is added to the end of line and the cursor is moved to the new line         }}
+
#* {{result|EXPECTED RESULT:  The ';' is added to the end of line and the cursor is moved to the new line         }}
====Test suite: Transfer types on Copy&Paste====
====Test suite: Transfer types on Copy&Paste====
Line 436: Line 458:
## Select whole method '''m()'''
## Select whole method '''m()'''
## Copy/Paste it to <tt>TargetClass</tt>
## Copy/Paste it to <tt>TargetClass</tt>
-
#* {{result|EXPECTED RESULT:  When paste action is performed, the dialog is opened. It lists all classes which have to be imported into to the target class in order to keep code compilable. After the dialog is confirmed the content of clipboard is inserted and necessary imports added         }}
+
#* {{result|EXPECTED RESULT:  When paste action is performed, the dialog is opened. It lists all classes which have to be imported into to the target class in order to keep code compilable. After the dialog is confirmed the content of clipboard is inserted and necessary imports added         }}
# {{testcase|Already existing imports}}
# {{testcase|Already existing imports}}
## Add ''import java.io.File'' into <tt>TargetClass</tt>
## Add ''import java.io.File'' into <tt>TargetClass</tt>
Line 442: Line 464:
## Select whole body of the class
## Select whole body of the class
## Copy/Paste it into target class
## Copy/Paste it into target class
-
#* {{result|EXPECTED RESULT:  Dialog listing imports which should be added is opened. It contains only one record - ''ImportedClass''         }}
+
#* {{result|EXPECTED RESULT:  Dialog listing imports which should be added is opened. It contains only one record - ''ImportedClass''         }}
# {{testcase|Not resolvable imports}}
# {{testcase|Not resolvable imports}}
## Create new project with one class
## Create new project with one class
## Open <tt>SourceClass</tt>
## Open <tt>SourceClass</tt>
## Copy ''ImportedClass importedClass;'' into the another project
## Copy ''ImportedClass importedClass;'' into the another project
-
#* {{result|EXPECTED RESULT:  No dialog is opened since the ''ImportedClass'' cannot be resolved in the target scope         }}
+
#* {{result|EXPECTED RESULT:  No dialog is opened since the ''ImportedClass'' cannot be resolved in the target scope         }}
# {{testcase|Implicit import}}
# {{testcase|Implicit import}}
## Open <tt>SourceClass</tt>
## Open <tt>SourceClass</tt>
## Copy ''SamePackageClass samePackageClass;'' into ''TargetClass2
## Copy ''SamePackageClass samePackageClass;'' into ''TargetClass2
-
#* {{result|EXPECTED RESULT:  The import is added even it was not explicitly written in the origin file         }}
+
#* {{result|EXPECTED RESULT:  The import is added even it was not explicitly written in the origin file         }}
# {{testcase|Cancel transfer types}}
# {{testcase|Cancel transfer types}}
## Repeat one of the previous test cases
## Repeat one of the previous test cases
## Do not confirm dialog with needed imports
## Do not confirm dialog with needed imports
-
#* {{result|EXPECTED RESULT:  Code is pasted but no imports are added         }}
+
#* {{result|EXPECTED RESULT:  Code is pasted but no imports are added         }}
====Test suite: Remove Surrounding Code====
====Test suite: Remove Surrounding Code====
Line 464: Line 486:
## Press Alt+Backspace
## Press Alt+Backspace
## From popup select '''for(...)...'''
## From popup select '''for(...)...'''
-
#* {{result|EXPECTED RESULT:For cycle is removed, the body of cycle is inserted directly at current position (may introduce syntax errors)       }}
+
#* {{result|EXPECTED RESULT:For cycle is removed, the body of cycle is inserted directly at current position (may introduce syntax errors)       }}
# {{testcase|Remove If}}
# {{testcase|Remove If}}
## Open RemoveSurrouding.java
## Open RemoveSurrouding.java
Line 471: Line 493:
## Press Alt+Backspace
## Press Alt+Backspace
## From popup select '''if(...)...'''
## From popup select '''if(...)...'''
-
#* {{result|EXPECTED RESULT:If/else is removed, the body of both parts of if/else is inserted directly at current position       }}
+
#* {{result|EXPECTED RESULT:If/else is removed, the body of both parts of if/else is inserted directly at current position       }}
# {{testcase|Remove Else}}
# {{testcase|Remove Else}}
## Open RemoveSurrouding.java
## Open RemoveSurrouding.java
Line 477: Line 499:
## Press Alt+Backspace
## Press Alt+Backspace
## From popup select '''else...'''
## From popup select '''else...'''
-
#* {{result|EXPECTED RESULT:Else part  is removed, the body  is inserted directly at current position       }}
+
#* {{result|EXPECTED RESULT:Else part  is removed, the body  is inserted directly at current position         }}
# {{testcase|Remove While}}
# {{testcase|Remove While}}
## Open RemoveSurrouding.java
## Open RemoveSurrouding.java
Line 483: Line 505:
## Press Alt+Backspace
## Press Alt+Backspace
## From popup select '''while(...) ...'''
## From popup select '''while(...) ...'''
-
#* {{result|EXPECTED RESULT:The cycle is removed, the body of cycle is inserted directly at current position       }}
+
#* {{result|EXPECTED RESULT:The cycle is removed, the body of cycle is inserted directly at current position       }}
# {{testcase|Remove try...catch}}
# {{testcase|Remove try...catch}}
## Open RemoveSurrouding.java
## Open RemoveSurrouding.java
Line 489: Line 511:
## Press Alt+Backspace
## Press Alt+Backspace
## From popup select '''try ...'''
## From popup select '''try ...'''
-
#* {{result|EXPECTED RESULT:Try/catch is removed, the only the body of "try" part is inserted directly at current position       }}
+
#* {{result|EXPECTED RESULT:Try/catch is removed, the only the body of "try" part is inserted directly at current position         }}
# {{testcase|Remove try... catch with resources}}
# {{testcase|Remove try... catch with resources}}
## Open RemoveSurrouding.java
## Open RemoveSurrouding.java
Line 495: Line 517:
## Press Alt+Backspace
## Press Alt+Backspace
## From popup select '''try ...'''
## From popup select '''try ...'''
-
#* {{result|EXPECTED RESULT:Try/catch is removed, the body of both parts are inserted directly at current position       }}
+
#* {{result|EXPECTED RESULT:Try/catch is removed, the body of both parts are inserted directly at current position       }}
# {{testcase|Remove synchronized block}}
# {{testcase|Remove synchronized block}}
## Open RemoveSurrouding.java
## Open RemoveSurrouding.java
Line 501: Line 523:
## Press Alt+Backspace
## Press Alt+Backspace
## From popup select '''synchronized(...) ...'''
## From popup select '''synchronized(...) ...'''
-
#* {{result|EXPECTED RESULT:The block  is removed, its body is inserted directly at current position       }}
+
#* {{result|EXPECTED RESULT:The block  is removed, its body is inserted directly at current position         }}
# {{testcase|Remove code - invalid case}}
# {{testcase|Remove code - invalid case}}
## Open RemoveSurrouding.java
## Open RemoveSurrouding.java
## Put cursor at line when is not surrounding code
## Put cursor at line when is not surrounding code
## Press Alt+Backspace
## Press Alt+Backspace
-
#* {{result|EXPECTED RESULT:IDE beeps and no popup is opened       }}
+
#* {{result|EXPECTED RESULT:IDE beeps and no popup is opened       }}
====Test suite: On Save Actions====
====Test suite: On Save Actions====
Line 516: Line 538:
## Modify the file and save
## Modify the file and save
## Check the file and undo any modification
## Check the file and undo any modification
-
#* {{result|EXPECTED RESULT:When the file is save, all unused imports are removed.     }}
+
#* {{result|EXPECTED RESULT:When the file is save, all unused imports are removed.     }}
# {{testcase|Organize Import}}
# {{testcase|Organize Import}}
## Open '''OnSave.java'''
## Open '''OnSave.java'''
Line 522: Line 544:
## Modify the file and save
## Modify the file and save
## Check the file and undo any modification
## Check the file and undo any modification
-
#* {{result|EXPECTED RESULT:The imports are formatted according to imports formattings settings. This may include removing unused imports. Try also changing this settings.     }}
+
#* {{result|EXPECTED RESULT:The imports are formatted according to imports formattings settings. This may include removing unused imports. Try also changing this settings.     }}
# {{testcase|No modification}}
# {{testcase|No modification}}
## In Options at ''On Save'' panel uncheck both ''Remove Unused Imports'' and ''Organize Imports''
## In Options at ''On Save'' panel uncheck both ''Remove Unused Imports'' and ''Organize Imports''
## Modify and save file
## Modify and save file
-
#* {{result|EXPECTED RESULT:No changes should be done, and the file is saved as it is.     }}
+
#* {{result|EXPECTED RESULT:No changes should be done, and the file is saved as it is.     }}
====Test suite: Organize file content====
====Test suite: Organize file content====
Line 534: Line 556:
## Open '''organize.Imports.java'''
## Open '''organize.Imports.java'''
## Call ''Source -> Organize Imports''
## Call ''Source -> Organize Imports''
-
#* {{result|EXPECTED RESULT: The imports are ordered according to formatting settings (by default: star import is replaces with normal imports, imports are ordered by packages)   }}
+
#* {{result|EXPECTED RESULT: The imports are ordered according to formatting settings (by default: star import is replaces with normal imports, imports are ordered by packages)     }}
# {{testcase|Organize Imports Hint}}
# {{testcase|Organize Imports Hint}}
## Open '''organize.Imports.java'''
## Open '''organize.Imports.java'''
Line 540: Line 562:
## Mix the imports statements
## Mix the imports statements
## Apply the ''Organize Imports'' hint
## Apply the ''Organize Imports'' hint
-
#* {{result|EXPECTED RESULT: If the imports order does not match formatting setting the hint is provided (Otherwise the hint is not provided)  at the first line which brakes the desired layout.  When applied the imports statements are reordered.     }}
+
#* {{result|EXPECTED RESULT: If the imports order does not match formatting setting the hint is provided (Otherwise the hint is not provided)  at the first line which brakes the desired layout.  When applied the imports statements are reordered.     }}
# {{testcase|Import formatting settings}}
# {{testcase|Import formatting settings}}
## Open '''organize.Imports.java'''
## Open '''organize.Imports.java'''
## Open  ''Options -> Editor -> Formatting'', language: Java, category: Imports and change imports layout (set custom package layout, change class count to use star import to 2, etc...)
## Open  ''Options -> Editor -> Formatting'', language: Java, category: Imports and change imports layout (set custom package layout, change class count to use star import to 2, etc...)
## Call Organize Imports or apply the hint
## Call Organize Imports or apply the hint
-
#* {{result|EXPECTED RESULT: The imports statements match the custom settings   }}
+
#* {{result|EXPECTED RESULT: The imports statements match the custom settings     }}
# {{testcase|Organize Members}}
# {{testcase|Organize Members}}
## Open '''organize.Members.java'''
## Open '''organize.Members.java'''
## Shuffle the class lines (in current state the order matched the default settings
## Shuffle the class lines (in current state the order matched the default settings
## Call ''Organize Members'' from the ''Source'' menu
## Call ''Organize Members'' from the ''Source'' menu
-
#* {{result|EXPECTED RESULT:The file members are reordered to match the original (not respecting the blank lines)   }}
+
#* {{result|EXPECTED RESULT:The file members are reordered to match the original (not respecting the blank lines)   }}
# {{testcase|Organize Members Hint}}
# {{testcase|Organize Members Hint}}
## Open '''organize.Members.java'''
## Open '''organize.Members.java'''
Line 556: Line 578:
## Shuffle the code again
## Shuffle the code again
## Use ''Organize Members'' hint
## Use ''Organize Members'' hint
-
#* {{result|EXPECTED RESULT:Once the members order does not respect setting the hint is provided at the first line which is incorrect. When applied the members are reordered.   }}
+
#* {{result|EXPECTED RESULT:When the order of elements inside the class does not match the specified format the hint is provided (at the line where is first element which does not respect the settings). After  applying it the members are reordered to match the settings. }}
# {{testcase|Organize Members Settings}}
# {{testcase|Organize Members Settings}}
## Open '''organize.Members.java'''
## Open '''organize.Members.java'''
## Open  ''Options -> Editor -> Formatting'', language: Java, category: Ordering and change the order of elements
## Open  ''Options -> Editor -> Formatting'', language: Java, category: Ordering and change the order of elements
## Organize members
## Organize members
-
#* {{result|EXPECTED RESULT:The members are reordered according to custom settings   }}
+
#* {{result|EXPECTED RESULT:The members are reordered according to custom settings   }}
# {{testcase|Organize Members Settings - visibility}}
# {{testcase|Organize Members Settings - visibility}}
## Open '''organize.Members.java'''
## Open '''organize.Members.java'''
## Open  ''Options -> Editor -> Formatting'', language: Java, category: Generate Code. Keep order of element types, but check ''Sort Members by Visibility'' and change the order visibility modifier
## Open  ''Options -> Editor -> Formatting'', language: Java, category: Generate Code. Keep order of element types, but check ''Sort Members by Visibility'' and change the order visibility modifier
## Organize members
## Organize members
-
#* {{result|EXPECTED RESULT:The elements are ordered according the visibility modifier.   }}
+
#* {{result|EXPECTED RESULT:The elements are ordered according the visibility modifier.   }}
====Test suite: Breadcrumbs ====
====Test suite: Breadcrumbs ====
Line 573: Line 595:
## Open '''breadcrumbs.Breadcrumbs''' from the sample project
## Open '''breadcrumbs.Breadcrumbs''' from the sample project
## Put cursor at various places in the code and see the content of the breadcrumbs bar
## Put cursor at various places in the code and see the content of the breadcrumbs bar
-
#* {{result|EXPECTED RESULT:The breadcrumbs bar always shows the current position in file (all surrounding elements). The correct content is written in inline comments in the file. }}
+
#* {{result|EXPECTED RESULT:The breadcrumbs bar always shows the current position in file (all surrounding elements). The correct content is written in inline comments in the file. }}
# {{testcase|Quick navigation}}
# {{testcase|Quick navigation}}
## Open '''breadcrumbs.Breadcrumbs''' from the sample project
## Open '''breadcrumbs.Breadcrumbs''' from the sample project
Line 579: Line 601:
## In the breadcrumbs bar right on some elements. And select one of the items from the popup menu
## In the breadcrumbs bar right on some elements. And select one of the items from the popup menu
## Try invoking popup on various elements
## Try invoking popup on various elements
-
#* {{result|EXPECTED RESULT:The popup menu is open when right-clicking on element in breadcrumbs bar. It contains all elements (e.g. items which can be shown in breadcrumbs) which are surrounded by the current element. When clicking on the menu item, the cursor is moved to related position in the code. }}
+
#* {{result|EXPECTED RESULT:The popup menu is open when right-clicking on element in breadcrumbs bar. It contains all elements (e.g. items which can be shown in breadcrumbs) which are surrounded by the current element. When clicking on the menu item, the cursor is moved to related position in the code. }}
# {{testcase|Closing breadcrumbs bar}}
# {{testcase|Closing breadcrumbs bar}}
## Try closing breadcrumbs by 'x' at the right of the bar
## Try closing breadcrumbs by 'x' at the right of the bar
## Try opening and closing breadcurmbs bar from the ''View'' menu
## Try opening and closing breadcurmbs bar from the ''View'' menu
-
#* {{result|EXPECTED RESULT:Closing an opening bar works as expected }}
+
#* {{result|EXPECTED RESULT:Closing an opening bar works as expected }}
{{attachments|
{{attachments|
* [[Media:TS_JavaEditor_members.png]]
* [[Media:TS_JavaEditor_members.png]]
* [[Media:TS_Java_Editor_parameters.png]]
* [[Media:TS_Java_Editor_parameters.png]]
-
* [[Media:TS_74_JaveEditorSampleProject.zip]]
+
* [[Media:TS_73_JaveEditorSampleProject.zip]]
}}
}}

Revision as of 11:52, 26 June 2013

Java Editor

Author:Jiri Prox
Version:7.4
Last update:2013/06/26
Introduction:This test specification covers java specific features of the editor.

Contents

Test suite: Start New Line and Split Line

Setup: Type String str = "abcde 123456"; inside a method's body

  1. Smart Enter inside strings
    1. Move caret behind the "abcde"
    2. Press Enter
    • EXPECTED RESULT: If Enter is pressed inside of a string, the string is smartly divided using '+' operator above strings so that there are no errors in code
      Other info:
      - indentation works normally
      - all white characters are preserved
      - caret is moved behind the opening quote at the second line
  2. Undo,Redo and a smart Enter
    1. Follow previous testcase
    2. Invoke Undo and Redo several times
    • EXPECTED RESULT: Undo and Redo is working properly.
  3. Start new line
    1. Move the caret behind "abcde"
    2. Press Shift+Enter.
    • EXPECTED RESULT:The new line is inserted just below actual line and the cursor is moved to the beginning of the new line (indentation is applied). Original line is not modified
  4. Undo/Redo start new line
    1. Try to use Undo and Redo
    • EXPECTED RESULT: Undo/Redo works properly.
  5. Split line
    1. Move caret behind "abcde"
    2. Press Ctrl+Enter
    • EXPECTED RESULT: The sting literal is divided to the two lines, as it was common text. No additional characters are inserted, so there is syntax error in the editor now.
  6. Undo/Redo split line
    1. Try to use Undo and Redo
    • EXPECTED RESULT: Undo/Redo works properly

Test suite: Erroneous Code

  1. Show tooltip
    1. Paste this incorrect field declaration inside a class body: public private int a0;
    2. Hover with mouse cursor over error annotation mark in gutter for a while (wait for tooltip to appear).
    3. Place caret on marked line and press Alt+Enter
    • EXPECTED RESULT: - Erroneous code should be underlined
      - A red annotation mark shows up in the gutter
      - A tooltip should be displayed after you hover above the annotation mark and after you press Alt+Enter, tooltip contains error "Illegal combination of modifiers: private and public"
  2. Cycling through annotations
    1. Place incorrect variable declaration Strin g = "abc"; somewhere into the method body.
    2. Place caret on the line with error and add break point (default shortcut is Ctrl+F8)
    3. Add bookmark (default shortcut is Press Ctrl+Shift+M)
    4. You should see a little arrow by the annotation in the gutter - click it a few times
    5. Remove the breakpoint
    6. Remove the bookmark
    • EXPECTED RESULT: The arrow is used for cycling among multiple annotations, so that you can see all annotations. In this case there should be 3 annotations: the bookmark, the breakpoint and error annotation.

Test suite: Code Templates

Purpose: Tests the code templates functionality inside NetBeans editor.

  1. Code templates UI
    1. Open Options Dialog
    2. Select Editor | Code Templates
    3. Select Language: Java
    • EXPECTED RESULT:The table contains predefined code templates. Each template has Expanded Text, Description and Context
  2. Code Template Invocation from Abbreviation
    1. Type into editor "fori".
    2. Press tab (default shortcut for code template).
    • EXPECTED RESULT:Code template for the for() cycle with iteration variable i should appear.
  3. Code Template Invocation from Code Completion
    1. Type into editor "for". (in the method body)
    2. Press Ctrl-Space to invoke code completion.
    • EXPECTED RESULT:Several variants of for cycle should appear (over array and over collection). It is possible to choose one of them and cycle using tab through the editable fields.
  4. Code Template Invocation from CC by abbrev
    1. In editor in method body type 2a
    2. Call code completion
    • {{{1}}}
  5. Adding new Code Template
    1. Open Options Dialog | Editor | Code Template | Language Java
    2. Press New""
    3. Fill in abbreviation for the new code template - abb
    4. Fill in code, which the abbreviation will expand to - for example int x = 1;
    5. Switch to description tab and add some description
    6. Check that the code template was added successfully
    7. Close OD by pressing OK
    8. Try abbreviation in editor - type abb and press tab
    • EXPECTED RESULT: Code template is correctly added. The new abbreviation is correctly expanded to defined code when used.
  6. Adding new Code Template - negative case
    1. Try adding new code template with the abbreviation which is already used
    • EXPECTED RESULT:It is not possible to add such template. After entering abbreviation warning dialog appears, Duplicate abbreviations are not allowed
  7. Removing Code Template
    1. Open Tools -> Editor -> Code Templates
    2. Select one template
    3. Press Remove
    • EXPECTED RESULT: The code template is removed from the list, the abbreviation is not expanded any more
  8. Change Expand key
    1. Open Tools -> Editor -> Code Templates
    2. Change Expand Key to space
    • EXPECTED RESULT: The abbreviations are now expanded by space and not tab
  9. Change action after expanding
    1. Open Tools -> Editor -> Code Templates
    2. Change On Template Expand value
    3. Try expanding code template in editor
    • EXPECTED RESULT: The template is inserted and chosen action is performed:
      Reformat - the code is reformated, the inserted code is placed at correct position
      Reindent - the template is placed at position related to previous code
      Nothing - the template is inserted at current cursor position as it is
  10. Traversing through Code Templates
    1. Invoke the fori code template.
    2. Cycle through the editable fields by pressing Tab.
    3. Cycle back through editable fields by pressing Shift-Tab.
    4. Try to edit various fields from code template.
    5. Once outside code template try to edit the code inside the for cycle.
    • EXPECTED RESULT: It should be possible to cycle through the template in both directions. Editing should work properly and all synchronized block should be updated at once. When editing code template is finished the synchronized block are not enabled any more.
  11. Using block code templates
    1. Select part of code in editor
    2. Hint icon should be provided. Press Alt-Enter and select some of the "surround with" template
    • EXPECTED RESULT:Code template is inserted so the selected code is wrapped inside the template
  12. Creating Custom Block Template
    1. Create new template with following text { ${selection} }
    2. Add description Wrap with block
    3. In editor select some code and press Alt-Enter
    • EXPECTED RESULT:The description of newly defined template is in the opened popup. After confirming the related item by enter, the selected code is wrapped by the template
  13. Changing scope of template
    1. Open Code Templates setting
    2. select for template
    3. switch to scope tab
    4. select COMPILATION_UNIT and unselect IF scope
    5. Try expanding for template between package statement and class declaration
    6. Try expanding for template just behind code if(true)
    • EXPECTED RESULT:for template can by now expanded in the compilation unit scope (in the file, outside the class) and cannot be expanded after if statement. Note that if there is {} after if statement that the scope inside the brackets is BLOCK, not IF. The code completion will provide the template if it is expandable in actual scope.
  14. Custom scope without scope
    1. Create new custom template (as in one of previous test cases)
    2. Try expand template (by abbreviation or code completion) at various scopes in the class
    • EXPECTED RESULT:The template can by expanded everywhere (not in javadoc, it is different mime type)
  15. Custom template with scope
    1. Use template from previous test case
    2. In the scope tab select some scope
    3. Try expanding the template in the editor
    • EXPECTED RESULT:The template is expandable (by abbreviation or from code completion) only at the selected scopes. This is valid also for block templates (the related hint is not provided in the incorrect scope)

Test suite: Commenting code

  1. Toggle line comment
    1. Open any java file
    2. Try to comment and uncomment several lines by pressing CTRL+/
    • EXPECTED RESULT: The selected lines should be commented by //.
      - If only commented lines are selected this action will uncomment them.
  2. Comment/Uncomment line
    1. Try to comment/uncomment lines using comment and uncomment buttons in editor toolbar
    • EXPECTED RESULT: Comment button should add '//' at the beginning of line, the uncomment button will remove it.

Test suite: Error stripe

Purpose: Error stripe is stripe right to the editor, it provides quick status of the opened file (small color box at the top of the error stripe) and highlights significant lines (lines with error, bookmark, caret position). It also provides quick navigation to the highlighted lines

  1. File is OK
    1. Open java file without any errors or warnings.
    2. Remove all bookmarks, breakpoints, mark occurrences etc...
    • EXPECTED RESULT: The status box is green, the error stripe
  2. File with errors
    1. Open java file from the previous test case
    2. Add code with warning (e.g. override toString method w/o @Override annotation)
    3. Add another warning (e.g unused import)
    4. Add some code with error
    5. Remove all warnings/errors
    • EXPECTED RESULT: When file contains warning the status box is yellow, in the error stripe there is yellow mark. When there is error in the file the status box is red and the mark in error stripe is red. Whenever mouse is hovering over the status box the info about status is showed (e.g. "1 error(s) 2 warning(s)"). After removing the errors and warnings the status box is green again.
  3. Caret position
    1. Open file which is longer than editor window
    2. Try scroll to beginning and end of the document (by arrows, page up/down and scroll wheel)
    • EXPECTED RESULT: The caret symbol in error stripe (thin line with little square in the middle) moves to proper places when scrolling. When the caret is in the beginning of the document the symbol is in the top of error stripe, when the caret is at the end, the symbol is at the bottom.
  4. Error stripe navigation
    1. Open java file
    2. Put several bookmarks in the file and/or use mark occurrences feature
    3. Click on marks in error stripe
    • EXPECTED RESULT: The file is scrolled to show related place in editor, when hovering over the mark the mouse cursor is changed to tooltip informs about the type of the mark
  5. Error stripe colors
    1. Open java file
    2. Put bookmark in it
    3. Put break point in it
    4. Add code with warning
    5. Add code with error
    6. Change line, add line, remove some lines (if the document is under version control)
    7. Turn on mark occurrences (in Options -> Editor -> Highlighting -> Language: Java) and put cart over identifier with more occurrences
    • EXPECTED RESULT: All this actions adds mark in error stripe, these marks differ by color - errors are red, warnings yellow, bookmarks dark gray, changed lines blue, removed lines ping, new lines green, etc...

Test suite: Java Macros

  1. Create macro
    1. Start macro recording from editor toolbar
    2. Write some text in editor, move cursor and try to invoke some formatting actions (Shift Line, Comment etc.)
    3. Finish recording macro from editor toolbar
    4. Inside appeared dialog, type new macro's name and choose some free keybindings for it. (the warning should appear when trying to assign already used shortcut)
    5. Open java source file into editor and try using new macro's keybinding.
    • EXPECTED RESULT: Macro is added to the list and properly works in editor
  2. Change shortcut
    1. Open Tools | Options | Editor | Macros
    2. Change the shortcut of macro created in previous test case to something else
    3. Invoke macro in editor
    • EXPECTED RESULT: Only new shortcut invokes the macro
  3. Delete macro
    1. Open Tools | Options | Editor | Macros
    2. Delete macro created in previous test case
    3. Try to invoke deleted macro in editor
    • EXPECTED RESULT: Macro is deleted and cannot be invoked any more
  4. Create macro in Options
    1. Open Tools | Options | Editor | Macros
    2. Click to Add button and create new macro
    3. Set shortcut for the new macro
    • EXPECTED RESULT: New macro is created and can be invoked

Test suite: Line tools

Purpose: This suite tests tool for manipulating with whole line or several lines.

  1. Move one line
    1. Put caret in document
    2. Press Alt-Shift-Up / Alt-Shift-Down
    • EXPECTED RESULT: Actual line is moved one line up/down
  2. Move selection
    1. Put caret in document
    2. Select several lines
    3. Press Alt-Shift-Up / Alt-Shift-Down
    • EXPECTED RESULT: Whole selected block (including the lines which are not selected whole but at least partially) is moved
  3. Copy line
    1. Put caret in document
    2. Press Ctrl-Shift-Up / Ctrl-Shift-Down
    • EXPECTED RESULT: The actual line is duplicated below/above current line
  4. Copy block
    1. Put caret in document
    2. Select several lines
    3. Press Ctrl-Shift-Up / Ctrl-Shift-Down
    • EXPECTED RESULT: The whole selection (including whole partly selected lines) is duplicated below/above current selected block
  5. Move horizontally
    1. Put caret in java class
    2. Press Alt-Shift-Left / Alt-Shift-Right
    3. Select several lines are press again Press Alt-Shift-Left / Alt-Shift-Right
    • EXPECTED RESULT: Actual line ( or selected lines) are move left/right by one indentation level (this must respect formatting settings)
  6. Interaction with guarded blocks
    1. Create new JForm file or open any file with guarded blocks
    2. Try to move/copy within guarded block
    3. Select line outside the guarded block and try to move it inside
    • EXPECTED RESULT: Line tools should not affect guarded block, moving line inside guarded block cannot be performed
  7. Move up in AST
    1. Open LineTools.java from javaeditor package
    2. Put cursor at line 18, just behind the r
    3. Press Alt-Shift-PgUp several times, until it beeps
    • EXPECTED RESULT: The whole AST branch (the variable declaration and the whole anonymous class) is moved upward in the AST. E.g. first time is it moved before the String variable, next time it is moved out of inner class. When there is not suitable place, the element can be moved to, the IDE beeps;
  8. Move down in AST
    1. Open LineTools.java, undo any changes from previous test case.
    2. Put cursor at line 13, just behind the a
    3. Press Alt-Shift-PgUp several times, until it beeps
    • EXPECTED RESULT:The element is moved down in the AST, e.g. if the next element can wrap the selected element, it is moved into it - (a declaration is moved into inner class) if the actual element cannot be wrapped it is moved behind.

Test suite: Smart Brackets

  1. Smart pairs
    1. Type private String[ in body of class
    2. Push Backspace key
    3. Type private String S = new String( in body of class
    4. Push Backspace key
    5. Type if((11=11) & (2==3|) in an empty body of a method (place caret as suggested by '|')
    6. Press ')' key twice
    • EXPECTED RESULT:When typing '[' in the step 1, the closing ']' is automatically added, pressing Backspace remove both braces
      In the 3. step the closing ')' is added. Backspace deletes both braces
      When you press ')' for the first time (step 6), a new bracket is inserted after '3', so that brackets are correctly balanced. When you press ')' for the second time, the bracket is skipped ( in order to keep number of closing/opening brackets balanced).
  2. Enter after opening curly bracket
    1. Move caret inside a method.
    2. Type if (true) {
    3. Push Enter key
    • EXPECTED RESULT: The closing bracket should be added automatically and indented properly
  3. Undo with bracket completion
    1. Try to Undo actions from previous test cases.
    • EXPECTED RESULT: Undo is working exactly in the opposite direction for all of these actions.
  4. Brackets highlighting
    1. Type in editor: if(true) {

      }
    2. Put caret just behind the some of the closing bracket - '}', ')' or ']'
    3. Press Ctrl+[
    4. Repeat with all types of brackets
    • EXPECTED RESULT: The matching bracket is highlighted, shortcut Ctrl-[ moves caret to matching bracket.

Test suite: Syntax Coloring

Comments: This test suite requires default fonts & colors settings

  1. Class Members
    1. Open class coloring.Colors from sample project
    2. Check coloring of class members
    • EXPECTED RESULT: Members Coloring
  2. Static Members
    1. Open class coloring.Colors2 from sample project
    2. Check coloring of static members
    3. Delete static keyword
    • EXPECTED RESULT: The static elements (inner class, fields, method) are written in italics. After deleting "static" keyword the fort is changed to regular
  3. Unused Private Elements
    1. Open class coloring.ColorsPrivateUnused from sample project.
    2. Check coloring of private elements
    3. Change the 'private' to 'public' and/or write code which uses private elements
    • EXPECTED RESULT: All unused private elements are underlined by gray line, When used or turned to public the underline is gone.
  4. Method Parameters and Variables
    1. Open class coloring.ColorsParameters from sample project
    2. Check colors
    3. Try to make unused variables used.
    • EXPECTED RESULT: Image:Parameters Coloring
  5. Unused Imports
    1. Open class coloring.Imports from sample project
    2. Make sure that hints are turned off (Tools -> Options -> Editor -> Hints -> Import -> Unused Import) otherwise the underline color will be yellow - default color for fixable hints
    3. Check colors
    • EXPECTED RESULT: Unused imports are gray underlined

Test suite: Camel case setting

Purpose: This suite test camel case navigation in java editor

  1. Jump next/prev
    1. Open java class in editor and type DefaultTableModel s;
    2. Use ctrl-left/right to jump over the declaration
    3. In options disable 'Enable Camel Case Navigation for Java' (Options->Editor->General)
    • EXPECTED RESULT: When the option is enabled the cursor jumps also between upper case letter in identifier. If it is off the cursor jumps among whole words only.
  2. Delete next/prev
    1. Put cursor in the middle of 'DefaultTableModel'
    2. Use CTRL-DEL/CTRL-BACKSPACE
    3. In options toggle 'Enable Camel Case Navigation for Java' (Options->Editor->General)
    4. Undo changes and try Use ctrl-delte/backspace
    • EXPECTED RESULT: The part for current position to next/prev upper case letter is deleted when the option is enabled, the part to the end/beginning of word is deleted when the option is off.

Test suite: Fix Imports

  1. Simple Fix Import
    1. Open fiximports.FixImports from the sample project
    2. Delete all import statements
    3. Call Fix Imports (context menu or Ctrl-Shift-I)
    4. Select right classes in comboboxes and confirm
    • EXPECTED RESULT: 3 imports are properly added, one import is marked as <cannot be resolved> in the dialog. Correct the typo from FireReader to FileReader and try it again. All class can be resolved now.
  2. Unresolved Class
    1. Open fiximports.FixImports from the sample project
    2. Add line LoremIpsumDolorSitAmet variable;
    3. Call Fix Import
    • EXPECTED RESULT:The statusbar contains <Nothing to fix in import statements>
  3. Fast Import
    1. Open fiximports.FixImports from the sample project
    2. Delete all import statements
    3. Put caret on unresolved symbol and press Alt-Shift-I
    4. Select required class from list and confirm by Enter
    • EXPECTED RESULT: Selected class is imported
  4. Fast Import - package
    1. Open fiximports.FixImports from the sample project
    2. Delete all import statements
    3. Put caret on unresolved symbol and press Alt-Shift-I
    4. Select required class from list and confirm by Alt-Enter
    • EXPECTED RESULT: Whole package is imported
  5. Fast Import - FQN
    1. Open fiximports.FixImports from the sample project
    2. Delete all import statements
    3. Put caret on unresolved symbol and press Alt-Shift-I
    4. Select required class from list and confirm by Shift-Enter
    • EXPECTED RESULT: The identifier is replaced with FQN
  6. Fix Import Hint
    1. Open fiximports.FixImports from the sample project
    2. Delete all import statements
    3. At each line with unresolved symbol use hint to add import statement
    • EXPECTED RESULT: All imports are added correctly

Test suite: Mark Occurrences

Purpose: This test suite describes the functionality of the mark occurrences feature.

  1. Show Usages
    1. Open occurrences.MarkOccurrences from the sample project
    2. Put cursor on name of variable/field/method/parameter (eg. variable on line 40, field on line 31, method on line 33, param on line 33)
    • EXPECTED RESULT: All occurrences of selected element is highlighted in editor and error stripe.
  2. Return Points
    1. Open occurrences.MarkOccurrences from the sample project
    2. Put caret on return type of method at line 33
    3. Put caret on exception in throws clause statement at line 33
    • EXPECTED RESULT: In step 2 all exit point from method are highlighted (4 occurrences). In next step only places where the selected exception is thrown are highlighted (2 occurrences).
  3. Show Usages - Class
    1. Open occurrences.MarkOccurrences from the sample project
    2. Put caret on String at line 31
    • EXPECTED RESULT: All usages of java.lang.String in current class are highlighted
  4. Options - On/Off
    1. Open options and disable Mark Occurrences Of Symbol Under Caret (Editor -> Highlighting -> Language: Java)
    2. Go back to editor, put caret on any identifier (method name, class name, field)
    3. Enable MarkOccurrences again
    • EXPECTED RESULT: While MO (Mark Occurrences) is disabled, no occurrences are highlighted.
  5. Mark Occurrences - Types, Methods
    1. Open options and disable Types and Methods
    2. Put caret on line 33 word method or line 31 word String
    3. Enable options again
    • EXPECTED RESULT: Occurrences on lines 31,33, 40 (for class) and 33,44 (for method) are not highlighted when options are disabled
  6. Mark Occurrences - Constant, Fields, Variables
    1. Open options and disable Constants , Fields and Local Variables
    2. Put caret on line 85 word KONST ,on line 31 word field or on line 40 word variable
    3. Enable options again
    • EXPECTED RESULT: No occurrences of actual element is highlighted in step 2
  7. Mark Occurrences - Exceptions, Exit Points
    1. Open options and disable Exceptions Throwing Points
    2. Put caret on line 33 word String
    3. Put caret on line 33 word IOException
    4. Enable the option again and disable Exit Point From Method
    5. Put caret on line 33 word String
    6. Put caret on line 33 word IOException
    7. Enable the option
    • EXPECTED RESULT: In step 2) the editor highlights both exit point from method (return and throw - 4 occurrences). In step 3) occurrences of class IOException are marked (3 occurrences, watch the Keep Marks option). In step 5) all occurrences of String are highlighted (3) and in step 6) 2 places where can be thrown selected exception are marked
  8. Mark Occurrences - Implementing/Overriding methods
    1. Open options and disable Implementing Method and Overriding Method
    2. Put caret on line 29 word DefaultTableModel or Runnable
    3. Enable the options again and repeat step 2
    • EXPECTED RESULT: When cursor is located over superclass name in extends statement or over implemented interface in implements statement the methods from selected superclass/interface are highlighted. In step 2) this feature is disabled.
  9. Mark Occurrences - Label
    1. Open options and disable Targets of Break and Continue statements
    2. Put caret on words break and continue on lines 74 and 77
    3. Enable the option again and repeat step 2)
    • EXPECTED RESULT: When option is ON the label and closing bracket of the related loop is highlighted, e.g. when caret is placed over break on line 74, the label L1 on line 66 and } on line 82 are marked.
  10. Mark Occurrences - Keep marks
    1. Open options and disable Keep Marks
    2. Select several elements, which can be highlighted
    3. Enable the option again and repeat step 2
    • EXPECTED RESULT: When option is disabled the actual mark occurrences marks are discarded when the location of caret is changed, regardless if another highlights are created or not. When enabled, the old marks are removed only in new set of marks is created.
  11. Browsing
    1. Select element which has more occurrences (e.g class String)
    2. Press Alt-Up, Alt-Down
    • EXPECTED RESULT: The caret jumps among the marks

Test suite: Syntax tree selection

Purpose: This suite tests selection of upper/lover node in AST and moving through AST

  1. Moving to root
    1. Open java class in editor put cursor somewhere in code
    2. Press ALT-SHIFT-PERIOD several times
    • EXPECTED RESULT:The selection is enlarge to contain whole parent node (javadoc is respected) in syntax tree -> e.g identifier -> identifier with its javadoc ->method call->block-> method -> method with javadoc -> class -> class with javadoc -> class and imports ....
  2. Moving to leaf
    1. Just after previous test case press ALT-SHIFT-COMMA
    2. Try to mix this two testcases
    • EXPECTED RESULT: The selection is reduced to lower node in AST. It ends when identifier around original cursor position is selected
  3. Moving Element Up
    1. Open MoveElement.java
    2. Put cursor on line 20
    3. Try moving element up as possible (default shortcut ale-shift-page up)
    • EXPECTED RESULT:Whole selected element (toString method + annotation) is moved up in the AST - e.g. is jumps over elements in the same scope (int z; declaration). when the moved element is first in current scope then it is moved one level up in the AST - to the class InnerClass and then to MoveElement class. The IDE beeps when it is not possible to perform move
  4. Moving Element Down
    1. Use Move Element Down (alt-shift-page down) to get element to original position
    • EXPECTED RESULT:Element is moved down in AST, like in previous test case

Test suite: Node tooltips

  1. Contains main method
    1. Create class with main method
    • EXPECTED RESULT: The class node in project view is decorated with green arrow and the tool tip says 'Contains Main Method'
  2. Error in file
    1. Open any file in project
    2. Add some syntax error in the class
    3. Remove the error again
    • EXPECTED RESULT: The class containing the error is marked with the error badge, the badge is propagated to package, source root and project. The tooltip says 'Error parsing file' for file, and 'Contains files with error' for the other nodes. Once the error is corrected the badges disappears
  3. Need to be compiled
    1. Open any class
    2. Turn of Compile On Save (in project properties -> Compiling)
    3. Make some modification in editor
    4. Built the whole project
    • EXPECTED RESULT: When file is modified a little wrench icon is added to the related node in project view. After building the project the icon is gone

Test suite: Add semicolon

  1. Add semicolon
    1. Open java file
    2. On non-empty line press ctrl-;
    • EXPECTED RESULT: The ';' is added to the end of line
  2. Add semicolon and new line
    1. Open java file
    2. On non-empty line press ctrl-shift-;
    • EXPECTED RESULT: The ';' is added to the end of line and the cursor is moved to the new line

Test suite: Transfer types on Copy&Paste

  1. Simple type transfer
    1. Open imports.SourceClass
    2. Select whole method m()
    3. Copy/Paste it to TargetClass
    • EXPECTED RESULT: When paste action is performed, the dialog is opened. It lists all classes which have to be imported into to the target class in order to keep code compilable. After the dialog is confirmed the content of clipboard is inserted and necessary imports added
  2. Already existing imports
    1. Add import java.io.File into TargetClass
    2. Open SourceClass
    3. Select whole body of the class
    4. Copy/Paste it into target class
    • EXPECTED RESULT: Dialog listing imports which should be added is opened. It contains only one record - ImportedClass
  3. Not resolvable imports
    1. Create new project with one class
    2. Open SourceClass
    3. Copy ImportedClass importedClass; into the another project
    • EXPECTED RESULT: No dialog is opened since the ImportedClass cannot be resolved in the target scope
  4. Implicit import
    1. Open SourceClass
    2. Copy SamePackageClass samePackageClass; into TargetClass2
    • EXPECTED RESULT: The import is added even it was not explicitly written in the origin file
  5. Cancel transfer types
    1. Repeat one of the previous test cases
    2. Do not confirm dialog with needed imports
    • EXPECTED RESULT: Code is pasted but no imports are added

Test suite: Remove Surrounding Code

  1. Remove For cycle
    1. Open RemoveSurrouding.java
    2. Put cursor at line 20
    3. Press Alt+Backspace
    4. From popup select for(...)...
    • EXPECTED RESULT:For cycle is removed, the body of cycle is inserted directly at current position (may introduce syntax errors)
  2. Remove If
    1. Open RemoveSurrouding.java
    2. Put cursor
    3. Put cursor at line 24
    4. Press Alt+Backspace
    5. From popup select if(...)...
    • EXPECTED RESULT:If/else is removed, the body of both parts of if/else is inserted directly at current position
  3. Remove Else
    1. Open RemoveSurrouding.java
    2. Put cursor at line 27
    3. Press Alt+Backspace
    4. From popup select else...
    • EXPECTED RESULT:Else part is removed, the body is inserted directly at current position
  4. Remove While
    1. Open RemoveSurrouding.java
    2. Put cursor at line 33
    3. Press Alt+Backspace
    4. From popup select while(...) ...
    • EXPECTED RESULT:The cycle is removed, the body of cycle is inserted directly at current position
  5. Remove try...catch
    1. Open RemoveSurrouding.java
    2. Put cursor at line 37 or 39
    3. Press Alt+Backspace
    4. From popup select try ...
    • EXPECTED RESULT:Try/catch is removed, the only the body of "try" part is inserted directly at current position
  6. Remove try... catch with resources
    1. Open RemoveSurrouding.java
    2. Put cursor at line 43
    3. Press Alt+Backspace
    4. From popup select try ...
    • EXPECTED RESULT:Try/catch is removed, the body of both parts are inserted directly at current position
  7. Remove synchronized block
    1. Open RemoveSurrouding.java
    2. Put cursor at line 49
    3. Press Alt+Backspace
    4. From popup select synchronized(...) ...
    • EXPECTED RESULT:The block is removed, its body is inserted directly at current position
  8. Remove code - invalid case
    1. Open RemoveSurrouding.java
    2. Put cursor at line when is not surrounding code
    3. Press Alt+Backspace
    • EXPECTED RESULT:IDE beeps and no popup is opened

Test suite: On Save Actions

Purpose: This test suite tests On Save actions specific for java editor, general on save actions are covered by Editor test specification

  1. Remove Unused Imports
    1. Open OnSave.java
    2. In Options, select Editor -> On Save, language: Java and check Remove Unused Imports (keep Use All Language Settings)
    3. Modify the file and save
    4. Check the file and undo any modification
    • EXPECTED RESULT:When the file is save, all unused imports are removed.
  2. Organize Import
    1. Open OnSave.java
    2. In Options, select Editor -> On Save, language: Java and uncheck Remove Unused Imports and check Organize Imports(keep Use All Language Settings)
    3. Modify the file and save
    4. Check the file and undo any modification
    • EXPECTED RESULT:The imports are formatted according to imports formattings settings. This may include removing unused imports. Try also changing this settings.
  3. No modification
    1. In Options at On Save panel uncheck both Remove Unused Imports and Organize Imports
    2. Modify and save file
    • EXPECTED RESULT:No changes should be done, and the file is saved as it is.

Test suite: Organize file content

Purpose: This test suite covers Organize imports and Organize Members actions and hints. This feature is closely related to formatting settings.

  1. Organize Imports
    1. Open organize.Imports.java
    2. Call Source -> Organize Imports
    • EXPECTED RESULT: The imports are ordered according to formatting settings (by default: star import is replaces with normal imports, imports are ordered by packages)
  2. Organize Imports Hint
    1. Open organize.Imports.java
    2. Open Options -> Editor -> Hints -> Language: Java and enable Organize Imports hints
    3. Mix the imports statements
    4. Apply the Organize Imports hint
    • EXPECTED RESULT: If the imports order does not match formatting setting the hint is provided (Otherwise the hint is not provided) at the first line which brakes the desired layout. When applied the imports statements are reordered.
  3. Import formatting settings
    1. Open organize.Imports.java
    2. Open Options -> Editor -> Formatting, language: Java, category: Imports and change imports layout (set custom package layout, change class count to use star import to 2, etc...)
    3. Call Organize Imports or apply the hint
    • EXPECTED RESULT: The imports statements match the custom settings
  4. Organize Members
    1. Open organize.Members.java
    2. Shuffle the class lines (in current state the order matched the default settings
    3. Call Organize Members from the Source menu
    • EXPECTED RESULT:The file members are reordered to match the original (not respecting the blank lines)
  5. Organize Members Hint
    1. Open organize.Members.java
    2. Open Options -> Editor -> Hints -> Language: Java and enable Organize Members hints
    3. Shuffle the code again
    4. Use Organize Members hint
    • EXPECTED RESULT:When the order of elements inside the class does not match the specified format the hint is provided (at the line where is first element which does not respect the settings). After applying it the members are reordered to match the settings.
  6. Organize Members Settings
    1. Open organize.Members.java
    2. Open Options -> Editor -> Formatting, language: Java, category: Ordering and change the order of elements
    3. Organize members
    • EXPECTED RESULT:The members are reordered according to custom settings
  7. Organize Members Settings - visibility
    1. Open organize.Members.java
    2. Open Options -> Editor -> Formatting, language: Java, category: Generate Code. Keep order of element types, but check Sort Members by Visibility and change the order visibility modifier
    3. Organize members
    • EXPECTED RESULT:The elements are ordered according the visibility modifier.

Test suite: Breadcrumbs

  1. Current position
    1. Open breadcrumbs.Breadcrumbs from the sample project
    2. Put cursor at various places in the code and see the content of the breadcrumbs bar
    • EXPECTED RESULT:The breadcrumbs bar always shows the current position in file (all surrounding elements). The correct content is written in inline comments in the file.
  2. Quick navigation
    1. Open breadcrumbs.Breadcrumbs from the sample project
    2. Put cursor at some position in the file
    3. In the breadcrumbs bar right on some elements. And select one of the items from the popup menu
    4. Try invoking popup on various elements
    • EXPECTED RESULT:The popup menu is open when right-clicking on element in breadcrumbs bar. It contains all elements (e.g. items which can be shown in breadcrumbs) which are surrounded by the current element. When clicking on the menu item, the cursor is moved to related position in the code.
  3. Closing breadcrumbs bar
    1. Try closing breadcrumbs by 'x' at the right of the bar
    2. Try opening and closing breadcurmbs bar from the View menu
    • EXPECTED RESULT:Closing an opening bar works as expected
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