Test the template set.
| |
Purpose |
Context |
Operations |
Expected Result |
Results |
| 2.1.1_1 |
Test the template import function |
In Silverlight perspective |
- Call Window -> Preferences -> Silverlight-> C#
Editor->Template>Import
- Selected a C# template file "msgbox.xml"(contains
a template of MessageBox.Show())
|
The templates in template file are add into template list. |
ok
|
| 2.1.1_2 |
Test the template export function |
In Silverlight perspective |
- Open perspective "Window -> Preferences ->
Silverlight-> C# Editor->Template"
- Select some templates, then click button "export"
- Enter template file name and saved location, click "save"
button
|
The selected template are saved in the template file |
ok
|
| 2.1.1_3 |
Test the "New Template" function |
In Silverlight perspective |
- Open perspective "Window -> Preferences ->
Silverlight-> C# Editor->Template"
- Click button "New"
- Enter The following parameters
- Name: msgbox
- Context: C# statements
- Description: Generate an "MessageBox.Show()" Method
- Pattern:
MessageBox.Show(${word_selection}${});${cursor}
|
The "msgbox" template has added to the template list |
ok
|
| 2.1.1_4 |
Test the "Edit Template" function |
In Silverlight perspective |
- Open perspective "Window -> Preferences ->
Silverlight-> C# Editor->Template"
- Select code template "msgbox"
- Click button "Edit"
- Modify the contents as following shows
- Name: msg
- Context: C# statements
- Description: Generate an "MessageBox.Show("")" code
- Pattern:
MessageBox.Show("${word_selection}${}");${cursor}
|
The "msgbox" template has been modified correctly |
ok
|
| 2.1.1_5 |
Test the "Remove Template" function |
In Silverlight perspective |
- Open perspective "Window -> Preferences ->
Silverlight-> C# Editor->Template"
- Select code template "msgbox"
- Click button "Remove"
|
The "msgbox" template has been removed |
ok
|
| 2.1.1_6 |
Test the Code Template Auto Completion function |
In Silverlight perspective |
- Create an Silverlight project, open an C# class file
- type one of the template, such as "msgbox", press Ctrl+Enter
to invoke code auto completion
|
The following code was added automatic
MessageBox.Show("");
And the cursor position is in the end of current line |
ok
|