-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
help.html
79 lines (79 loc) · 5.16 KB
/
help.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?xml version="1.0" encoding="UTF-8"?>
<article>
<section>
<img src="resources/images/help1.png"/>
<h1>Auto-completion and Templates</h1>
<p>To select a template, complete a variable reference or a function call, press the <code>Tab</code> key after
a character sequence. The suggestions shown depend on the current context. For example, to complete a variable reference,
type $ followed by the first characters of the variable and press <code>Tab</code>.
To enforce auto-complete and see all suggestions, press <code>Ctrl-Space</code> (or <code>Option-Space</code> on Firefox for Mac), which
will also show a list of all available templates when activated on a new line or after whitespace.</p>
<p>If there's only one suggestion, it will be inserted immediately. Otherwise, a popup is shown. In the popup, use the cursor
keys to choose a suggested code or function template. Press
<code>Enter</code> to select the current template.</p>
</section>
<section>
<h1>Code Templates</h1>
<p>eXide supports the same code templates as the textmate editor (a well-known editor on the Mac). To see all available code
templates in a mode, place the cursor after whitespace and press <code>Ctrl-Space</code> (or <code>Option-Space</code>).</p>
<p>For example, to add a new function, enter "fun" and press <code>Tab</code>. Some templates also respect the current text
selection: to transform a block of code into a "let" statement, select the block, call autocomplete and choose the
"let" template.
</p>
<h3>Adding Templates</h3>
<p>New templates can be added by editing the <code>.snippets</code> files which can be found in the <code>eXide/templates</code>
collection.</p>
</section>
<section>
<img src="resources/images/help2.png"/>
<h1>Navigating within templates</h1>
<p>Within a code or function template, press <code>Tab</code> to cycle between template
parameters. Press <code>Escape</code> when you are done with the parameters and want to
input an ordinary tab character.</p>
</section>
<section>
<h1>Browsing the code</h1>
<p>eXide not only parses the code currently open in the editor, it also knows all imported
modules. To directly jump to the definition of a function in an imported module, place
the cursor somewhere in the name of the called function and press <code>F3</code>. If
the function is in an imported XQuery module, eXide will open it in a new tab. Note:
this only works for modules written in XQuery, which reside in the database, not Java
modules.</p>
<p>To get help on a called function, press <code>F1</code> instead of F3 while the cursor is
positioned within the function's name.</p>
</section>
<section>
<h1>Code Hints and Quick Fixes</h1>
<p>eXide continuously validates your XQuery code. Errors show up with a red icon in the side bar, while code hints appear with
a yellow warning sign. Moving the mouse over the icon displays a description. For some types of errors or warnings, a quick fix might be
available if you click on the icon. Currently this includes the following errors/warnings:</p>
<ul>
<li>Unknown namespace</li>
<li>Unknown function</li>
<li>Namespace not used</li>
<li>Unused import</li>
</ul>
</section>
<section>
<h1>Refactoring</h1>
<h2>Variables and Function Names</h2>
<p>In XQuery mode, eXide can refactor local variables and function names. To start refactoring, place the cursor into the name
of the function in a function declaration or the name of a variable. Select the <strong>Rename</strong> action
from the XQuery menu. All occurrences of the function or variable will be added to the current editor selection. All selections
will change synchronously as you type. To end the editing, press <code>ESC</code>.</p>
<h2>Extract New Function</h2>
<p>To create a new function from a selected piece of code, choose the menu item <strong>Extract function</strong> from
the XQuery menu. The selection must contain a complete code block. This code will be parsed and a new function is
created from it with all required parameters declared.</p>
</section>
<section>
<h1>Browsing and importing modules</h1>
<p>To open or import an XQuery module, press <code>F4</code> anywhere in the editor to see
all modules available in the database. To insert an import statement for a module at the
current cursor position, click on the <code>Import</code> button. eXide automatically
determines the path to use for the import. Modules residing in the same application
collection will be imported with a relative path.</p>
<p>Note: the <code>Import</code> button will only be shown if the active editor tab contains
an XQuery document.</p>
</section>
</article>