| # | Test case | Description |
| 1 | Directives |
-
Open index.jsp page and type somewhere in the code <%@.
- Wait 500 ms or press CTRL+Space to invoke code completion.
-
3 directives must be offered: include, page and taglib.
- Repeat steps 1 and 2 but with test.tag tag file this time.
|
|
| RESULT: |
5 directives must be offered in tag files: attribute, include, tag, taglib and variable.
|
|
| 2 | Attributes |
-
Type <%@page | in index.jsp file and invoke code completion.
-
13 attributes should be offered initially. Type i which should reduce the list to 5 items including import. Press Enter.
-
Now you should have <%@page import="|" in the JSP editor.
-
Repeat steps 1 and 2 in test.tag file with <%@tag | directive.
|
|
| RESULT: |
Code completion must offer relevant attributes for directives based on file type and context - used attributes are not suggested again. Specifically, autoFlush, buffer, contentType, errorPage, extends, info, isELIgnored, isErrorPage, isThreadSafe, language, pageEncoding and session for page directive and body-content, description, display-name, dynamic-attributes, example, import, isELIgnored, large-icon, language, pageEncoding and small-icon for tag directive.
|
|
| 3 | Values |
-
Type <%@page isELIgnored="|"%> in index.jsp and press CTRL+Space.
-
Two options false and true will be suggested. Press Enter to select the first one.
-
Repeat steps 1 and 2 in test.tag file with <%@tag isELIgnored="|"%>.
|
|
| RESULT: |
Where appropriate (i.e. set of attribute values is limited) these values should be offered by code completion.
|
|
| 4 | Entities |
- Type & and wait for code completion or press CTRL+Space.
-
A long list of items will be suggested. Type q character.
-
This should reduce the list to only 1 suggestion ". Press Enter.
|
|
| RESULT: | " should be automatically completed. |
|
| 5 | Page encoding |
-
Type <%@page pageEncoding="|"%> in index.jsp and press CTRL+Space.
- List of all known encodings will show up.
-
Type K which reduces the list to KOI8-R item only. Press Enter to select it.
-
Repeat steps 1 and 3 in test.tag file with <%@tag pageEncoding="|"%>.
|
|
| RESULT: |
Auto completion must suggest all possible character encodings in both JSP and Tag editors.
|
|
| 6 | Import |
-
Type <%@page import="|"%> in index.jsp and press CTRL+Space.
-
Four root packages should be offered initially: com, java, javax and org.
-
Type o, press Enter and type . char.
-
Now you should have <%@page import="org|"%>. Press CTRL+Space again.
-
This way use code completion to import e.g. org.xml.sax.SAXException class.
-
Repeat the same in test.tag file with <%@tag import="|"%>.
|
|
| RESULT: |
Auto completion must help with selecting any j2se or j2ee package or class as value of import attribute.
|
|
| 7 | Include |
-
Type <%@include file="|"%> in test.tag and press CTRL+Space.
-
Only two items show up: ../ and test.tag. Type / char.
-
Completion suggests META-INF/, WEB-INF/ and index.jsp. Press Enter and CTRL+Space.
-
Now you should have <%@include file="/META-INF/context.xml|"%>
-
Repeat the same in index.jsp file with <jsp:include page="|"%>.
|
|
| RESULT: |
Code completion allows to select any file as value of file attribute. If path starts with / char, completion should offer files in document root directory (i.e. Web Pages node) whereas path without leading / offers files from the same directory as edited file initially.
|
|
| 8 | Scriptlets |
-
| Type | <% String var; var.| | somewhere in both index.jsp and test.tag files. |
-
Press CTRL+Space. Appropriate fields and methogs of java.lang.String class must be suggested.
-
| Type | %> | <!-- comment --> | <% var.| | to close the scriptlet and start another one. |
- Repeat step 2.
-
| Type | %> <% "hello".| | and press CTRL+Space again. |
- Repeat step 2.
-
| Type | %> <% | | and press CTRL+Space again. |
|
|
| RESULT: |
Implicit objects application, config, out, page, pageContext, request, response and session will show up. Besides normal Java code completion must be provided inside scriptlets. Declared variables must be available across more scriptlet blocks.
|
|
| 9 | HTML tags |
-
Type < char somewhere in both index.jsp and test.tag files.
-
Press CTRL+Space to invoke code completion. Type ht which should narrow selection only to 1 item.
-
Press Enter. This should auto complete <html> tag.
-
Verify that other HTML tags and their appropriate attributes are available in code completion.
|
|
| RESULT: |
Code completion offers all HTML tags like <body>, <table>, <form> etc.
|
|
| 10 | JSP tags |
-
Type <jsp:| in index.jsp and press CTRL+Space.
-
The following JSP tags are offered by default: attribute, body, element, expression, fallback, forward, getProperty, include, param, params, plugin, setProperty, text and useBean.
- Repeat step 1 in test.tag file editor.
|
|
| RESULT: |
The same set of JSP tags is offered in tag file editor plus two more tags: doBody and invoke.
|
|
| 11 | Implicit objects |
-
| Type | <% response.| | somewhere in both index.jsp and test.tag files and press CTRL+Space. |
-
Code completion offers relevant fields and methods of javax.servlet.http.HttpServletResponse class.
-
| In both files replace | response | by | session.getSessionContext().| | and press CTRL+Space again. |
|
|
| RESULT: |
Code completion offers relevant fields and methods of javax.servlet.http.HttpSessionResponse class.
|
|
| 12 | Java beans |
-
Type <jsp:useBean id="myDate" scope="request" class="| in both index.jsp and test.tag files and press CTRL+Space.
-
Java packages and classes will be offered. Use code completion to select java.util.Date and finish the tag by "/>.
-
| Type | <% myD| | and press CTRL+Space. |
-
| myDate | will be automatically completed. Type | . | and press CTRL+Space. |
|
|
| RESULT: |
Code completion offers all fields and methods of java.util.Date class.
|
|
| 13 | Declarations |
-
| Type | <%! | | in both index.jsp and test.tag files and press CTRL+Space. |
- Java packages and classes will be offered except implicit objects.
-
| Type | void hello() { this.| | and press CTRL+Space. |
|
|
| RESULT: |
Code completion offers only appropriate fields and methods of servlet i.e. no packages or classes or implicit objects.
|
|
| 14 | Expressions |
-
| Type | <%= re| | in both index.jsp and test.tag files and press CTRL+Space. |
-
| Both request and response are suggested. Press Enter and type | . |
- Press CTRL+Space to invoke code completion.
|
|
| RESULT: |
Code completion offers relevant fields and methods of javax.servlet.http.HttpServletRequest class.
|
|
| 15 | Library tags |
- Right click Web Pages node and select New | File/Folder....
-
Select Web category and Tag Library Descriptor... file type and press Next >.
- Setup library as TLD Name and press Finish.
- Repeat steps 1 and 2 but select Tag File as file type.
-
Setup example as Tag File Name and check Add Tag File to Tag Library Descriptor option.
-
Use Browse button to select WEB-INF/tlds/library.tld as TLD File and push Finish.
-
In example.tag delete lines 9 and 13 to uncomment declaration of attributes. Press CTRL+S.
-
Type <%@taglib prefix="ex" uri="/WEB-INF/tlds/library.tld"%> in index.jsp.
-
Type <ex| somewhere below and press CTRL+Space.
-
It will get expanded to <ex:example|. Press Space and CTRL+Space.
|
|
| RESULT: |
Code completion offers three attributes title, author and price_info declared in example.tag tag file.
|
|
| 16 | Help window |
- Type <%@| and press CTRL+Space.
-
Code completion will show up together with help window. Use arrows to browse through items.
-
Verify that help window displays appropriate description for selected directive. Press Esc.
- Press CTRL+Shift+Space which will open help window only.
-
Press Shift+Arrow Down which will scroll down the contents of help window.
-
Verify that help window is available for all JSP, custom or HTML tags and their attributes.
|
|
| RESULT: |
Help window is opened on each code completion invocation or alone if needed. The contents must be scrollable.
|
|