TS 73 JavaNavigation

(Difference between revisions)
(Created page with '==Java Navigation== '''Author:'''Jiri Prox<br/> '''Version:'''7.3<br/> '''Last update:'''2012/10/23<br/> '''Introduction:'''<br/> __TOC__ ====Test suite: Go To Navigation==== <!…')
 
Line 12: Line 12:
## Put caret on line 30 word <tt> Declaration</tt>
## Put caret on line 30 word <tt> Declaration</tt>
## from context menu call Navigate | Go To Source
## from context menu call Navigate | Go To Source
-
##
 
-
##
 
-
##
 
-
##
 
-
##
 
#* {{result|EXPECTED RESULT:The class Decalaration is opened, cursor is moved at the class declaration
#* {{result|EXPECTED RESULT:The class Decalaration is opened, cursor is moved at the class declaration
-
        }}
+
          }}
# {{testcase|Go To Source - method}}
# {{testcase|Go To Source - method}}
## Open <tt> navigation.GoToSource </tt> from the sample project
## Open <tt> navigation.GoToSource </tt> from the sample project
## Put caret on line 31 word <tt> method</tt>
## Put caret on line 31 word <tt> method</tt>
## from main menu call Navigate | Go To Source
## from main menu call Navigate | Go To Source
-
#* {{result|EXPECTED RESULT:Declaration class is opened, cursor is moved to proper place   }}
+
#* {{result|EXPECTED RESULT:Declaration class is opened, cursor is moved to proper place     }}
# {{testcase|Go To Source - no sources}}
# {{testcase|Go To Source - no sources}}
## Open <tt> navigation.GoToSource </tt> from the sample project
## Open <tt> navigation.GoToSource </tt> from the sample project
## Put caret on line 32 word <tt> String </tt>
## Put caret on line 32 word <tt> String </tt>
## Use ''Ctrl-B'' to invoke go to source
## Use ''Ctrl-B'' to invoke go to source
-
#* {{result|EXPECTED RESULT:Decompiled class is opened (there are only methods declarations, bodies are only in bytecode in comments   }}
+
#* {{result|EXPECTED RESULT:Decompiled class is opened (there are only methods declarations, bodies are only in bytecode in comments     }}
# {{testcase|Go To Declaration}}
# {{testcase|Go To Declaration}}
## Open <tt> navigation.GoToSource </tt> from the sample project
## Open <tt> navigation.GoToSource </tt> from the sample project
## Put caret on line 30 word <tt> Declarations </tt>
## Put caret on line 30 word <tt> Declarations </tt>
-
## From context menu call Navigate | Go To Declaration  
+
## From context menu call Navigate | Go To Declaration
-
#* {{result|EXPECTED RESULT:Declaration class is opened, cursor is moved at the proper place   }}
+
#* {{result|EXPECTED RESULT:Declaration class is opened, cursor is moved at the proper place     }}
# {{testcase|Go to declaration - local variable}}
# {{testcase|Go to declaration - local variable}}
## Open <tt> navigation.GoToSource </tt> from the sample project
## Open <tt> navigation.GoToSource </tt> from the sample project
## Put cursor on ''dec'' at line 31 and press ''Ctrl-B''
## Put cursor on ''dec'' at line 31 and press ''Ctrl-B''
-
#* {{result|EXPECTED RESULT:Cursor is moved to declaration of  variable ''dec'' }}
+
#* {{result|EXPECTED RESULT:Cursor is moved to declaration of  variable ''dec''   }}
# {{testcase|Go To Super Implementation}}
# {{testcase|Go To Super Implementation}}
## Open <tt> navigation.GoToSource </tt> from the sample project
## Open <tt> navigation.GoToSource </tt> from the sample project
## put caret at method ''toString''
## put caret at method ''toString''
## class Navigate -> Go To Super Implementation from context menu (or use ''Ctrl-Shift-P'')
## class Navigate -> Go To Super Implementation from context menu (or use ''Ctrl-Shift-P'')
-
#* {{result|EXPECTED RESULT:Cursor is moved to implementation of the current method in the superclass  - e.g. to the class Object }}
+
#* {{result|EXPECTED RESULT:Cursor is moved to implementation of the current method in the superclass  - e.g. to the class Object   }}
# {{testcase|Ctrl-click}}
# {{testcase|Ctrl-click}}
## Open ''GoToSource''
## Open ''GoToSource''
## press click and hover over ''dec'' at line 31
## press click and hover over ''dec'' at line 31
## ctrl-click at ''dec''
## ctrl-click at ''dec''
-
#* {{result|EXPECTED RESULT:When hovering over the element while ctrl is pushed, the element is blue underlined and small popup containing ''navigation.GoToSource dec'' is opened. Ctrl-click work as go to declaration. }}
+
#* {{result|EXPECTED RESULT:When hovering over the element while ctrl is pushed, the element is blue underlined and small popup containing ''navigation.GoToSource dec'' is opened. Ctrl-click work as go to declaration.   }}
# {{testcase|Ctrl-alt-click}}
# {{testcase|Ctrl-alt-click}}
## Open ''SuperClass''
## Open ''SuperClass''
Line 53: Line 48:
## Perform ctrl-alt-click
## Perform ctrl-alt-click
## Select some item from the list (either by mouse or by arrow keys and enter)
## Select some item from the list (either by mouse or by arrow keys and enter)
-
#* {{result|EXPECTED RESULT:Hovering over method name open popup - ''method overriding test()''.  When clicked small list is opened, containing all methods overriding the selected one. Click on some item will open the related class and moves the cursor at the declaration of overriding method }}
+
#* {{result|EXPECTED RESULT:Hovering over method name open popup - ''method overriding test()''.  When clicked small list is opened, containing all methods overriding the selected one. Click on some item will open the related class and moves the cursor at the declaration of overriding method   }}
# {{testcase|Jump to overriding method}}
# {{testcase|Jump to overriding method}}
## Open ''SuperClass''
## Open ''SuperClass''
## Go to line 34, there should by gray icon containing 'O' in the gutter
## Go to line 34, there should by gray icon containing 'O' in the gutter
## Click on the icon (or use ''Ctrl-Alt-B'')
## Click on the icon (or use ''Ctrl-Alt-B'')
-
#* {{result|EXPECTED RESULT:Popup containing all overriding methods is opened as in previous test case. Selecting one will open related method declaration. }}
+
#* {{result|EXPECTED RESULT:Popup containing all overriding methods is opened as in previous test case. Selecting one will open related method declaration.   }}
# {{testcase|Jump to super method}}
# {{testcase|Jump to super method}}
## Open ''SuperClass''
## Open ''SuperClass''
## Go to line 24, there should by green icon containing 'I' in the gutter
## Go to line 24, there should by green icon containing 'I' in the gutter
## Click on the icon (or use ''Ctrl-Shift-P'')
## Click on the icon (or use ''Ctrl-Shift-P'')
-
#* {{result|EXPECTED RESULT:The ''Runnable'' interface is opened, cursor is moved to the method declaration. }}
+
#* {{result|EXPECTED RESULT:The ''Runnable'' interface is opened, cursor is moved to the method declaration.   }}
====Test suite: Go To Type====
====Test suite: Go To Type====
Line 73: Line 68:
## Use arrow key to browse in the list
## Use arrow key to browse in the list
## Select required class and press ''Enter''
## Select required class and press ''Enter''
-
#* {{result|EXPECTED RESULT:The list of classes is updated immediately while writing. The list can be browsed by arrows keys and PageUp/Page Down. The ''Location'' text field shows the origin of the currently selected class. Enter open the selected class.   }}
+
#* {{result|EXPECTED RESULT:The list of classes is updated immediately while writing. The list can be browsed by arrows keys and PageUp/Page Down. The ''Location'' text field shows the origin of the currently selected class. Enter open the selected class.     }}
# {{testcase|Negative case}}
# {{testcase|Negative case}}
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## Type name of not existing class, e.g. "ThisClassDoesNotExists"
## Type name of not existing class, e.g. "ThisClassDoesNotExists"
-
#* {{result|EXPECTED RESULT:"<No Types Found>" is displayed     }}
+
#* {{result|EXPECTED RESULT:"<No Types Found>" is displayed       }}
# {{testcase|Pre-filled values}}
# {{testcase|Pre-filled values}}
## Open any java file
## Open any java file
## Put cursor at any class, method  or variable in the code and open ''Go To Type'' dialog
## Put cursor at any class, method  or variable in the code and open ''Go To Type'' dialog
## Put cursor at any keyword and open ''Go To Type'' dialog
## Put cursor at any keyword and open ''Go To Type'' dialog
-
#* {{result|EXPECTED RESULT:When cursor is placed over some identifier, the identifier is copied into the ''Type Name'' textfield.  Otherwise name of actual class is used.   }}
+
#* {{result|EXPECTED RESULT:When cursor is placed over some identifier, the identifier is copied into the ''Type Name'' textfield.  Otherwise name of actual class is used.     }}
# {{testcase|Capital letters}}
# {{testcase|Capital letters}}
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## Type only capital letters - for example DTM
## Type only capital letters - for example DTM
-
#* {{result|EXPECTED RESULT:The list contains classes which matches the name (DTM), and the classes which capital letters match the given pattern (DefautTableModel, DefaultTreeModel) }}
+
#* {{result|EXPECTED RESULT:The list contains classes which matches the name (DTM), and the classes which capital letters match the given pattern (DefautTableModel, DefaultTreeModel)   }}
# {{testcase|Case sensitive}}
# {{testcase|Case sensitive}}
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## Check ''Case Sensitive'' checkbox
## Check ''Case Sensitive'' checkbox
## Type any class name, but only in lower case (for example "system")
## Type any class name, but only in lower case (for example "system")
-
#* {{result|EXPECTED RESULT:No classes are found   }}
+
#* {{result|EXPECTED RESULT:No classes are found     }}
# {{testcase|Wildcards}}
# {{testcase|Wildcards}}
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## Type any class name, use ? for single letter, * for 0 or more letters and space at the end for exact match
## Type any class name, use ? for single letter, * for 0 or more letters and space at the end for exact match
-
#* {{result|EXPECTED RESULT:Wildcards works as expected   }}
+
#* {{result|EXPECTED RESULT:Wildcards works as expected     }}
# {{testcase|Fully qualified name}}
# {{testcase|Fully qualified name}}
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## Type any class by FQN, for example java.io.IOException
## Type any class by FQN, for example java.io.IOException
-
#* {{result|EXPECTED RESULT:The class is correctly found. Note that you can get list of all classes in package by typing only package name (java.io.), this list contains also anonymous classes (named 1,2 etc...)   }}
+
#* {{result|EXPECTED RESULT:The class is correctly found. Note that you can get list of all classes in package by typing only package name (java.io.), this list contains also anonymous classes (named 1,2 etc...)     }}
# {{testcase|FQN - first letters}}
# {{testcase|FQN - first letters}}
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## type any class name using FQN,  but use only first letters - e.g. ''j.a.i.Data''
## type any class name using FQN,  but use only first letters - e.g. ''j.a.i.Data''
-
#* {{result|EXPECTED RESULT:Several classes beginning  with ''Data'' from java.awt.image are found }}
+
#* {{result|EXPECTED RESULT:Several classes beginning  with ''Data'' from java.awt.image are found   }}
# {{testcase|Highlight matching}}
# {{testcase|Highlight matching}}
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## Use any of previous test cases or combination
## Use any of previous test cases or combination
-
#* {{result|EXPECTED RESULT:Each item in the list has highlighted  by bold the part which match the pattern in ''Type Name'' text field }}
+
#* {{result|EXPECTED RESULT:Each item in the list has highlighted  by bold the part which match the pattern in ''Type Name'' text field   }}
# {{testcase|Incomplete results}}
# {{testcase|Incomplete results}}
## Open any larger project (e.g. Netbeans sources)
## Open any larger project (e.g. Netbeans sources)
## Open ''Go To Type'' dialog
## Open ''Go To Type'' dialog
## Search for some class
## Search for some class
-
#* {{result|EXPECTED RESULT:In the list there is warning that the sources may be incomplete }}
+
#* {{result|EXPECTED RESULT:In the list there is warning that the sources may be incomplete   }}
====Test suite: Go To File====
====Test suite: Go To File====
Line 120: Line 115:
## Type name of any file in the project directory (e.g. ''manifest.mf'')
## Type name of any file in the project directory (e.g. ''manifest.mf'')
## Select some item and confirm by ''Enter''
## Select some item and confirm by ''Enter''
-
#* {{result|EXPECTED RESULT:List of found files in opened projects are listed.  Each item of the list has correct value ''Location'' which shows where is the file physically stored. At the right side of each item, there is project which the file belongs to. After confirmation the selected file is opened }}
+
#* {{result|EXPECTED RESULT:List of found files in opened projects are listed.  Each item of the list has correct value ''Location'' which shows where is the file physically stored. At the right side of each item, there is project which the file belongs to. After confirmation the selected file is opened   }}
# {{testcase|Wildcards}}
# {{testcase|Wildcards}}
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Type any name using the wildcards (e.g. *.txt)
## Type any name using the wildcards (e.g. *.txt)
-
#* {{result|EXPECTED RESULT:All matching files are correctly found }}
+
#* {{result|EXPECTED RESULT:All matching files are correctly found   }}
# {{testcase|Case sensitivity}}
# {{testcase|Case sensitivity}}
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Check ''Case sensitive'' check box
## Check ''Case sensitive'' check box
## Type name of existing file but with incorrect capital letters
## Type name of existing file but with incorrect capital letters
-
#* {{result|EXPECTED RESULT:No files are found, until search is turned to case insensitive again }}
+
#* {{result|EXPECTED RESULT:No files are found, until search is turned to case insensitive again   }}
# {{testcase|Prefer Current Project}}
# {{testcase|Prefer Current Project}}
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Type a file which exists in more project (e.g. build.xml)
## Type a file which exists in more project (e.g. build.xml)
## Check ''Prefer current project'' checkbox
## Check ''Prefer current project'' checkbox
-
#* {{result|EXPECTED RESULT:The files from actual project are moved at top of the list (current project is determined from the place where the go to file was invoked from) }}
+
#* {{result|EXPECTED RESULT:The files from actual project are moved at top of the list (current project is determined from the place where the go to file was invoked from)   }}
# {{testcase|Line Numbers}}
# {{testcase|Line Numbers}}
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Open ''Go To File'' dialog by pressing ''Alt-Shift-O''
## Type name of existing file followed by ':' and line number
## Type name of existing file followed by ':' and line number
## Press ''Enter''
## Press ''Enter''
-
#* {{result|EXPECTED RESULT:Selected file is opened and cursor is placed at specified position }}
+
#* {{result|EXPECTED RESULT:Selected file is opened and cursor is placed at specified position   }}
====Test suite: Go To Symbol====
====Test suite: Go To Symbol====
Line 148: Line 143:
## Type name of constructor (e.g. GoToSource )
## Type name of constructor (e.g. GoToSource )
## Type named of method (e.g. perform)
## Type named of method (e.g. perform)
-
#* {{result|EXPECTED RESULT:Each time, correct elements are found and listed in the dialog. Each item in the list has correct name and icon, project name where the element belongs to (if available) and the location. After pressing ''Enter'' the related file is opened and cursor is places at the declaration. }}
+
#* {{result|EXPECTED RESULT:Each time, correct elements are found and listed in the dialog. Each item in the list has correct name and icon, project name where the element belongs to (if available) and the location. After pressing ''Enter'' the related file is opened and cursor is places at the declaration.   }}
# {{testcase|Wildcards}}
# {{testcase|Wildcards}}
## Repeat previous testcase, but use "?" "*" wildcards
## Repeat previous testcase, but use "?" "*" wildcards
-
#* {{result|EXPECTED RESULT: }}
+
#* {{result|EXPECTED RESULT:   }}
# {{testcase|Case Sensitivity}}
# {{testcase|Case Sensitivity}}
## Open ''Go To Symbol'' dialog (ctrl-alt-shift-O)
## Open ''Go To Symbol'' dialog (ctrl-alt-shift-O)
## Type name of some element, but with incorrect capital letters
## Type name of some element, but with incorrect capital letters
## Check ''Case Sensitive'' checkbox
## Check ''Case Sensitive'' checkbox
-
#* {{result|EXPECTED RESULT:No elements are found if the search is case sensitive }}
+
#* {{result|EXPECTED RESULT:No elements are found if the search is case sensitive   }}
====Test suite: Navigator Window====
====Test suite: Navigator Window====
Line 164: Line 159:
## Open <tt> navigator.ClassStructure </tt> from sample project
## Open <tt> navigator.ClassStructure </tt> from sample project
## Check content of navigator
## Check content of navigator
-
#* {{result|EXPECTED RESULT:  [[Image:navigator-class_TS_73_Java.png]]     }}
+
#* {{result|EXPECTED RESULT:  [[Image:navigator-class_TS_73_Java.png]]       }}
# {{testcase|Annotation Structure}}
# {{testcase|Annotation Structure}}
## Open <tt> navigator.AnnotationStructure </tt> from sample project
## Open <tt> navigator.AnnotationStructure </tt> from sample project
## Check content of navigator
## Check content of navigator
-
#* {{result|EXPECTED RESULT:  [[Image:navigator-annotation_TS_73_Java.png]]       }}
+
#* {{result|EXPECTED RESULT:  [[Image:navigator-annotation_TS_73_Java.png]]         }}
# {{testcase|Enum Structure}}
# {{testcase|Enum Structure}}
## Open <tt> navigator.EnumStructure </tt> from sample project
## Open <tt> navigator.EnumStructure </tt> from sample project
## Check content of navigator
## Check content of navigator
-
#* {{result|EXPECTED RESULT:  [[Image:navigator-enum_TS_73_Java.png]]     }}
+
#* {{result|EXPECTED RESULT:  [[Image:navigator-enum_TS_73_Java.png]]       }}
# {{testcase|Filters}}
# {{testcase|Filters}}
## Open <tt> navigator.ClassStructure </tt> from sample project
## Open <tt> navigator.ClassStructure </tt> from sample project
Line 184: Line 179:
- Fully qualified names: toggles usages of FQN instead of simple name
- Fully qualified names: toggles usages of FQN instead of simple name
- Sort By Name : members are sorted by their name
- Sort By Name : members are sorted by their name
-
- Sort By Source : members are sorted by their position in source file (the last two filters are mutaly exclusive)     }}
+
- Sort By Source : members are sorted by their position in source file (the last two filters are mutaly exclusive)       }}
# {{testcase|Context menu}}
# {{testcase|Context menu}}
## Open <tt> navigator.ClassStructure </tt> from sample project
## Open <tt> navigator.ClassStructure </tt> from sample project
## Right click on navigator
## Right click on navigator
-
#* {{result|EXPECTED RESULT:The menu contains all functionality, which can be done be filters buttons     }}
+
#* {{result|EXPECTED RESULT:The menu contains all functionality, which can be done be filters buttons       }}
# {{testcase|Navigation To Source}}
# {{testcase|Navigation To Source}}
## Open <tt> navigator.ClassStructure </tt> from sample project
## Open <tt> navigator.ClassStructure </tt> from sample project
## Double click on any item
## Double click on any item
-
#* {{result|EXPECTED RESULT:Cursor is located at the declaration of selected member     }}
+
#* {{result|EXPECTED RESULT:Cursor is located at the declaration of selected member       }}
# {{testcase|Javadoc}}
# {{testcase|Javadoc}}
## Open <tt> navigator.ClassStructure </tt> from sample project
## Open <tt> navigator.ClassStructure </tt> from sample project
## Hover mouse over some item
## Hover mouse over some item
-
#* {{result|EXPECTED RESULT:Popup with javadoc is opened. Ctrl-F1 opens javadoc view for selected item     }}
+
#* {{result|EXPECTED RESULT:Popup with javadoc is opened. Ctrl-F1 opens javadoc view for selected item       }}
# {{testcase|Class file}}
# {{testcase|Class file}}
## Add jar to the project class path (right click on libraries node, Add Jar/Folder and select any jar)
## Add jar to the project class path (right click on libraries node, Add Jar/Folder and select any jar)
## Unfold contents of the added jar and select any .class file
## Unfold contents of the added jar and select any .class file
-
#* {{result|EXPECTED RESULT:Navigator shows members of the class file     }}
+
#* {{result|EXPECTED RESULT:Navigator shows members of the class file       }}
# {{testcase|Class file - Go to source}}
# {{testcase|Class file - Go to source}}
## Create another project with at least one class
## Create another project with at least one class
Line 207: Line 202:
## Unfold jar and select any .class file
## Unfold jar and select any .class file
## Double click on any item in Navigator
## Double click on any item in Navigator
-
#* {{result|EXPECTED RESULT:Related source file should be opened in editor if available. Caret should be placed over declaration of selected member. If sources are not available, there should be displayed warning in the status bar     }}
+
#* {{result|EXPECTED RESULT:Related source file should be opened in editor if available. Caret should be placed over declaration of selected member. If sources are not available, there should be displayed warning in the status bar       }}
# {{testcase|Open JavaDoc window}}
# {{testcase|Open JavaDoc window}}
## Open <tt> navigator.ClassStructure </tt> from sample project
## Open <tt> navigator.ClassStructure </tt> from sample project
## Select any item
## Select any item
## Click on the "Book" icon in the upper right corner
## Click on the "Book" icon in the upper right corner
-
#* {{result|EXPECTED RESULT:Javadoc for selected element is opened in Javadoc view }}
+
#* {{result|EXPECTED RESULT:Javadoc for selected element is opened in Javadoc view   }}
====Test suite: Inspect Hierarchy====
====Test suite: Inspect Hierarchy====
Line 219: Line 214:
## Open ''navigation.SuperClass''
## Open ''navigation.SuperClass''
## Call ''Hierarchy'' (Alt-F12)
## Call ''Hierarchy'' (Alt-F12)
-
#* {{result|EXPECTED RESULT:Hierarchy view is opened at the right side of editor. It contains hierarchy tree for the class opened in editor. When selecting any of the tree node the navigator is updated. Double click of node (or enter) opens the source file }}
+
#* {{result|EXPECTED RESULT:Hierarchy view is opened at the right side of editor. It contains hierarchy tree for the class opened in editor. When selecting any of the tree node the navigator is updated. Double click of node (or enter) opens the source file   }}
# {{testcase|Selected class}}
# {{testcase|Selected class}}
## Put cursor at any class identifier in editor (e.g. InputSteam at line 15 of SuperClass)
## Put cursor at any class identifier in editor (e.g. InputSteam at line 15 of SuperClass)
## Press ''Alt -Shift-F12''
## Press ''Alt -Shift-F12''
-
#* {{result|EXPECTED RESULT:Hierarchy view is updated for the class which is under cursor }}
+
#* {{result|EXPECTED RESULT:Hierarchy view is updated for the class which is under cursor   }}
# {{testcase|Super/Sub hierarchy}}
# {{testcase|Super/Sub hierarchy}}
## Open hierarchy view for ''SuperClass''
## Open hierarchy view for ''SuperClass''
## Switch from the ''Supertypes''  to ''Subtypes'' and back
## Switch from the ''Supertypes''  to ''Subtypes'' and back
-
#* {{result|EXPECTED RESULT:''Supertypes'' shows recursively all supertypes of the selected class - interfaces and supertypes, ''Subtypes'' shows subtypes of the selected class (in this case SubClass1 and SubClass2) }}
+
#* {{result|EXPECTED RESULT:''Supertypes'' shows recursively all supertypes of the selected class - interfaces and supertypes, ''Subtypes'' shows subtypes of the selected class (in this case SubClass1 and SubClass2)   }}
# {{testcase|History}}
# {{testcase|History}}
## Open Hierarchy view for some class
## Open Hierarchy view for some class
## Use the second combobox to inspect history of this view
## Use the second combobox to inspect history of this view
-
#* {{result|EXPECTED RESULT:The second combobox is populated with class names, which was investigated for hierarchy (from previous test cases there should be at least InputStream and SuperClass). When a class is selected from the list the view is updated }}
+
#* {{result|EXPECTED RESULT:The second combobox is populated with class names, which was investigated for hierarchy (from previous test cases there should be at least InputStream and SuperClass). When a class is selected from the list the view is updated   }}
# {{testcase|Refresh}}
# {{testcase|Refresh}}
## Open hierarchy view for ''SuperClass''
## Open hierarchy view for ''SuperClass''
## In editor put cursor at some another class
## In editor put cursor at some another class
-
## Press ''Refresh for entity under cursor'' button  
+
## Press ''Refresh for entity under cursor'' button
-
#* {{result|EXPECTED RESULT:The view is updated with the hierarchy tree for the selected class }}
+
#* {{result|EXPECTED RESULT:The view is updated with the hierarchy tree for the selected class   }}
# {{testcase|Show javadoc}}
# {{testcase|Show javadoc}}
## Open hierarchy for some class
## Open hierarchy for some class
## Press ''Open javadoc window'' button
## Press ''Open javadoc window'' button
-
#* {{result|EXPECTED RESULT:The javadoc window is opened and shows javadoc for the selected element (it works same as for navigator window) }}
+
#* {{result|EXPECTED RESULT:The javadoc window is opened and shows javadoc for the selected element (it works same as for navigator window)   }}
# {{testcase|Filters}}
# {{testcase|Filters}}
## Open hierarchy for ''SuperClass'' (switch to supertypes)
## Open hierarchy for ''SuperClass'' (switch to supertypes)
## Try filter button at the bottom of the view
## Try filter button at the bottom of the view
## Right click in the view (not at any class name) and try the items from context menu
## Right click in the view (not at any class name) and try the items from context menu
-
#* {{result|EXPECTED RESULT:The context menu should contain the same items as the buttons and the bottom. First toggles usage of FQN or simple names in the tree. The second two button control ordering - if the items are ordered alphabetically or  in the order they are written in the source files }}
+
#* {{result|EXPECTED RESULT:The context menu should contain the same items as the buttons and the bottom. First toggles usage of FQN or simple names in the tree. The second two button control ordering - if the items are ordered alphabetically or  in the order they are written in the source files   }}
====Test suite: Inspect Members====
====Test suite: Inspect Members====
Line 251: Line 246:
# {{testcase|Selected class}}
# {{testcase|Selected class}}
## Write tests steps here
## Write tests steps here
-
#* {{result|EXPECTED RESULT: }}
+
#* {{result|EXPECTED RESULT:   }}
# {{testcase|History}}
# {{testcase|History}}
## Open ''Members'' for another class
## Open ''Members'' for another class
## Use the second combobox to inspect the history of the view
## Use the second combobox to inspect the history of the view
-
#* {{result|EXPECTED RESULT:The second combobox is populated with names of the classes which were investigated for members. When some item is selected the content is correctly updated. }}
+
#* {{result|EXPECTED RESULT:The second combobox is populated with names of the classes which were investigated for members. When some item is selected the content is correctly updated.   }}
====Test suite: Analyze Stack Window====
====Test suite: Analyze Stack Window====
Line 262: Line 257:
# {{testcase|Show Analyze Stack Window}}
# {{testcase|Show Analyze Stack Window}}
## Invoke <tt>Window | Other | Analyze Stack </tt> from main menu.
## Invoke <tt>Window | Other | Analyze Stack </tt> from main menu.
-
#* {{result|EXPECTED RESULT:  Analyze Stack Window is opened next to editor area     }}
+
#* {{result|EXPECTED RESULT:  Analyze Stack Window is opened next to editor area       }}
# {{testcase|Jump to line}}
# {{testcase|Jump to line}}
## Open "stacktrace.Run" file
## Open "stacktrace.Run" file
Line 268: Line 263:
## Copy NPE from "Output" tab and push "Insert StackTrace From Clipboard" button.
## Copy NPE from "Output" tab and push "Insert StackTrace From Clipboard" button.
## Close the tab containing ''stacktrace.Rin'' source and double click the line where NPE was thrown.
## Close the tab containing ''stacktrace.Rin'' source and double click the line where NPE was thrown.
-
#* {{result|EXPECTED RESULT:"Run.java" tab is opened and cursor is moved to the line where NPE is thrown.   }}
+
#* {{result|EXPECTED RESULT:"Run.java" tab is opened and cursor is moved to the line where NPE is thrown.     }}
{{attachments|
{{attachments|

Current revision as of 12:35, 5 November 2012

Java Navigation

Author:Jiri Prox
Version:7.3
Last update:2012/10/23
Introduction:

Contents

Test suite: Go To Navigation

  1. Go To Source - class
    1. Open navigation.GoToSource from the sample project
    2. Put caret on line 30 word Declaration
    3. from context menu call Navigate | Go To Source
    • EXPECTED RESULT:The class Decalaration is opened, cursor is moved at the class declaration
         
  1. Go To Source - method
    1. Open navigation.GoToSource from the sample project
    2. Put caret on line 31 word method
    3. from main menu call Navigate | Go To Source
    • EXPECTED RESULT:Declaration class is opened, cursor is moved to proper place
  2. Go To Source - no sources
    1. Open navigation.GoToSource from the sample project
    2. Put caret on line 32 word String
    3. Use Ctrl-B to invoke go to source
    • EXPECTED RESULT:Decompiled class is opened (there are only methods declarations, bodies are only in bytecode in comments
  3. Go To Declaration
    1. Open navigation.GoToSource from the sample project
    2. Put caret on line 30 word Declarations
    3. From context menu call Navigate | Go To Declaration
    • EXPECTED RESULT:Declaration class is opened, cursor is moved at the proper place
  4. Go to declaration - local variable
    1. Open navigation.GoToSource from the sample project
    2. Put cursor on dec at line 31 and press Ctrl-B
    • EXPECTED RESULT:Cursor is moved to declaration of variable dec
  5. Go To Super Implementation
    1. Open navigation.GoToSource from the sample project
    2. put caret at method toString
    3. class Navigate -> Go To Super Implementation from context menu (or use Ctrl-Shift-P)
    • EXPECTED RESULT:Cursor is moved to implementation of the current method in the superclass - e.g. to the class Object
  6. Ctrl-click
    1. Open GoToSource
    2. press click and hover over dec at line 31
    3. ctrl-click at dec
    • EXPECTED RESULT:When hovering over the element while ctrl is pushed, the element is blue underlined and small popup containing navigation.GoToSource dec is opened. Ctrl-click work as go to declaration.
  7. Ctrl-alt-click
    1. Open SuperClass
    2. Press ctrl-alt and hover mouse over test at line 34
    3. Perform ctrl-alt-click
    4. Select some item from the list (either by mouse or by arrow keys and enter)
    • EXPECTED RESULT:Hovering over method name open popup - method overriding test(). When clicked small list is opened, containing all methods overriding the selected one. Click on some item will open the related class and moves the cursor at the declaration of overriding method
  8. Jump to overriding method
    1. Open SuperClass
    2. Go to line 34, there should by gray icon containing 'O' in the gutter
    3. Click on the icon (or use Ctrl-Alt-B)
    • EXPECTED RESULT:Popup containing all overriding methods is opened as in previous test case. Selecting one will open related method declaration.
  9. Jump to super method
    1. Open SuperClass
    2. Go to line 24, there should by green icon containing 'I' in the gutter
    3. Click on the icon (or use Ctrl-Shift-P)
    • EXPECTED RESULT:The Runnable interface is opened, cursor is moved to the method declaration.

Test suite: Go To Type

Purpose: This test suite covers Go To Type dialog witch all its functionality

  1. Basic case
    1. Open Go To Type dialog (ctrl-O)
    2. Start typing name of any class
    3. Use arrow key to browse in the list
    4. Select required class and press Enter
    • EXPECTED RESULT:The list of classes is updated immediately while writing. The list can be browsed by arrows keys and PageUp/Page Down. The Location text field shows the origin of the currently selected class. Enter open the selected class.
  2. Negative case
    1. Open Go To Type dialog
    2. Type name of not existing class, e.g. "ThisClassDoesNotExists"
    • EXPECTED RESULT:"<No Types Found>" is displayed
  3. Pre-filled values
    1. Open any java file
    2. Put cursor at any class, method or variable in the code and open Go To Type dialog
    3. Put cursor at any keyword and open Go To Type dialog
    • EXPECTED RESULT:When cursor is placed over some identifier, the identifier is copied into the Type Name textfield. Otherwise name of actual class is used.
  4. Capital letters
    1. Open Go To Type dialog
    2. Type only capital letters - for example DTM
    • EXPECTED RESULT:The list contains classes which matches the name (DTM), and the classes which capital letters match the given pattern (DefautTableModel, DefaultTreeModel)
  5. Case sensitive
    1. Open Go To Type dialog
    2. Check Case Sensitive checkbox
    3. Type any class name, but only in lower case (for example "system")
    • EXPECTED RESULT:No classes are found
  6. Wildcards
    1. Open Go To Type dialog
    2. Type any class name, use ? for single letter, * for 0 or more letters and space at the end for exact match
    • EXPECTED RESULT:Wildcards works as expected
  7. Fully qualified name
    1. Open Go To Type dialog
    2. Type any class by FQN, for example java.io.IOException
    • EXPECTED RESULT:The class is correctly found. Note that you can get list of all classes in package by typing only package name (java.io.), this list contains also anonymous classes (named 1,2 etc...)
  8. FQN - first letters
    1. Open Go To Type dialog
    2. type any class name using FQN, but use only first letters - e.g. j.a.i.Data
    • EXPECTED RESULT:Several classes beginning with Data from java.awt.image are found
  9. Highlight matching
    1. Open Go To Type dialog
    2. Use any of previous test cases or combination
    • EXPECTED RESULT:Each item in the list has highlighted by bold the part which match the pattern in Type Name text field
  10. Incomplete results
    1. Open any larger project (e.g. Netbeans sources)
    2. Open Go To Type dialog
    3. Search for some class
    • EXPECTED RESULT:In the list there is warning that the sources may be incomplete

Test suite: Go To File

  1. Basic use case
    1. Open Go To File dialog by pressing Alt-Shift-O
    2. Type name of any file in the project directory (e.g. manifest.mf)
    3. Select some item and confirm by Enter
    • EXPECTED RESULT:List of found files in opened projects are listed. Each item of the list has correct value Location which shows where is the file physically stored. At the right side of each item, there is project which the file belongs to. After confirmation the selected file is opened
  2. Wildcards
    1. Open Go To File dialog by pressing Alt-Shift-O
    2. Type any name using the wildcards (e.g. *.txt)
    • EXPECTED RESULT:All matching files are correctly found
  3. Case sensitivity
    1. Open Go To File dialog by pressing Alt-Shift-O
    2. Check Case sensitive check box
    3. Type name of existing file but with incorrect capital letters
    • EXPECTED RESULT:No files are found, until search is turned to case insensitive again
  4. Prefer Current Project
    1. Open Go To File dialog by pressing Alt-Shift-O
    2. Type a file which exists in more project (e.g. build.xml)
    3. Check Prefer current project checkbox
    • EXPECTED RESULT:The files from actual project are moved at top of the list (current project is determined from the place where the go to file was invoked from)
  5. Line Numbers
    1. Open Go To File dialog by pressing Alt-Shift-O
    2. Type name of existing file followed by ':' and line number
    3. Press Enter
    • EXPECTED RESULT:Selected file is opened and cursor is placed at specified position

Test suite: Go To Symbol

  1. Basic Case
    1. Open Go To Symbol dialog (ctrl-alt-shift-O)
    2. Type name of the class (e.g. Declaration)
    3. Type name of constructor (e.g. GoToSource )
    4. Type named of method (e.g. perform)
    • EXPECTED RESULT:Each time, correct elements are found and listed in the dialog. Each item in the list has correct name and icon, project name where the element belongs to (if available) and the location. After pressing Enter the related file is opened and cursor is places at the declaration.
  2. Wildcards
    1. Repeat previous testcase, but use "?" "*" wildcards
    • EXPECTED RESULT:
  3. Case Sensitivity
    1. Open Go To Symbol dialog (ctrl-alt-shift-O)
    2. Type name of some element, but with incorrect capital letters
    3. Check Case Sensitive checkbox
    • EXPECTED RESULT:No elements are found if the search is case sensitive

Test suite: Navigator Window

Purpose: Navigator window, located below the project view, displays inner structure of the selected class. It can be filtered and sorted. Double click on tree list will bring cursor to the source (Go To Source function)

  1. Class Structure
    1. Open navigator.ClassStructure from sample project
    2. Check content of navigator
    • EXPECTED RESULT: Image:navigator-class_TS_73_Java.png
  2. Annotation Structure
    1. Open navigator.AnnotationStructure from sample project
    2. Check content of navigator
    • EXPECTED RESULT: Image:navigator-annotation_TS_73_Java.png
  3. Enum Structure
    1. Open navigator.EnumStructure from sample project
    2. Check content of navigator
    • EXPECTED RESULT: Image:navigator-enum_TS_73_Java.png
  4. Filters
    1. Open navigator.ClassStructure from sample project
    2. Change navigator filters - use buttons and context menu
    3. Each time check context of navigator
    • EXPECTED RESULT: - Show Inherited Members : Shows also members from all superclasses</br>

- Show Fields: hides/shows fields - Show Static Members: hides/shows static members (methods, fields, inner classes ....) - Show Non Public Members: if turned off, only public members are displayed - Show Inner Classes: hides/shows inner classes - Fully qualified names: toggles usages of FQN instead of simple name - Sort By Name : members are sorted by their name - Sort By Source : members are sorted by their position in source file (the last two filters are mutaly exclusive)

  1. Context menu
    1. Open navigator.ClassStructure from sample project
    2. Right click on navigator
    • EXPECTED RESULT:The menu contains all functionality, which can be done be filters buttons
  2. Navigation To Source
    1. Open navigator.ClassStructure from sample project
    2. Double click on any item
    • EXPECTED RESULT:Cursor is located at the declaration of selected member
  3. Javadoc
    1. Open navigator.ClassStructure from sample project
    2. Hover mouse over some item
    • EXPECTED RESULT:Popup with javadoc is opened. Ctrl-F1 opens javadoc view for selected item
  4. Class file
    1. Add jar to the project class path (right click on libraries node, Add Jar/Folder and select any jar)
    2. Unfold contents of the added jar and select any .class file
    • EXPECTED RESULT:Navigator shows members of the class file
  5. Class file - Go to source
    1. Create another project with at least one class
    2. Build the project
    3. Add jar created in dist folder to the classpath of original project
    4. Unfold jar and select any .class file
    5. Double click on any item in Navigator
    • EXPECTED RESULT:Related source file should be opened in editor if available. Caret should be placed over declaration of selected member. If sources are not available, there should be displayed warning in the status bar
  6. Open JavaDoc window
    1. Open navigator.ClassStructure from sample project
    2. Select any item
    3. Click on the "Book" icon in the upper right corner
    • EXPECTED RESULT:Javadoc for selected element is opened in Javadoc view

Test suite: Inspect Hierarchy

  1. Actual class
    1. Open navigation.SuperClass
    2. Call Hierarchy (Alt-F12)
    • EXPECTED RESULT:Hierarchy view is opened at the right side of editor. It contains hierarchy tree for the class opened in editor. When selecting any of the tree node the navigator is updated. Double click of node (or enter) opens the source file
  2. Selected class
    1. Put cursor at any class identifier in editor (e.g. InputSteam at line 15 of SuperClass)
    2. Press Alt -Shift-F12
    • EXPECTED RESULT:Hierarchy view is updated for the class which is under cursor
  3. Super/Sub hierarchy
    1. Open hierarchy view for SuperClass
    2. Switch from the Supertypes to Subtypes and back
    • EXPECTED RESULT:Supertypes shows recursively all supertypes of the selected class - interfaces and supertypes, Subtypes shows subtypes of the selected class (in this case SubClass1 and SubClass2)
  4. History
    1. Open Hierarchy view for some class
    2. Use the second combobox to inspect history of this view
    • EXPECTED RESULT:The second combobox is populated with class names, which was investigated for hierarchy (from previous test cases there should be at least InputStream and SuperClass). When a class is selected from the list the view is updated
  5. Refresh
    1. Open hierarchy view for SuperClass
    2. In editor put cursor at some another class
    3. Press Refresh for entity under cursor button
    • EXPECTED RESULT:The view is updated with the hierarchy tree for the selected class
  6. Show javadoc
    1. Open hierarchy for some class
    2. Press Open javadoc window button
    • EXPECTED RESULT:The javadoc window is opened and shows javadoc for the selected element (it works same as for navigator window)
  7. Filters
    1. Open hierarchy for SuperClass (switch to supertypes)
    2. Try filter button at the bottom of the view
    3. Right click in the view (not at any class name) and try the items from context menu
    • EXPECTED RESULT:The context menu should contain the same items as the buttons and the bottom. First toggles usage of FQN or simple names in the tree. The second two button control ordering - if the items are ordered alphabetically or in the order they are written in the source files

Test suite: Inspect Members

  1. Selected class
    1. Write tests steps here
    • EXPECTED RESULT:
  2. History
    1. Open Members for another class
    2. Use the second combobox to inspect the history of the view
    • EXPECTED RESULT:The second combobox is populated with names of the classes which were investigated for members. When some item is selected the content is correctly updated.

Test suite: Analyze Stack Window

Purpose: Analyze Stack window, If you want to quickly jump from a stack trace to the corresponding line in the editor.

  1. Show Analyze Stack Window
    1. Invoke Window | Other | Analyze Stack from main menu.
    • EXPECTED RESULT: Analyze Stack Window is opened next to editor area
  2. Jump to line
    1. Open "stacktrace.Run" file
    2. Run the file (code fails with NPE)
    3. Copy NPE from "Output" tab and push "Insert StackTrace From Clipboard" button.
    4. Close the tab containing stacktrace.Rin source and double click the line where NPE was thrown.
    • EXPECTED RESULT:"Run.java" tab is opened and cursor is moved to the line where NPE is thrown.
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