Statistiques
| Révision :

root / tmp / org.txm.practically.rcp / doc / macroEdit.html @ 3225

Historique | Voir | Annoter | Télécharger (2,04 ko)

1 486 mdecorde
<html>
2 2399 sjacqu01
From the edit dialog, you can:
3 2399 sjacqu01
<br>
4 2399 sjacqu01
<ul>reorder commands in the macro
5 2399 sjacqu01
</ul>
6 2399 sjacqu01
<ul>remove commands
7 2399 sjacqu01
</ul>
8 2399 sjacqu01
<ul>add new commands
9 2399 sjacqu01
</ul>
10 2399 sjacqu01
<ul>edit commands that have data associated with them (ex. the Find
11 2399 sjacqu01
        command).
12 2399 sjacqu01
</ul>
13 2399 sjacqu01
<br>The Edit dialog also allows you to add a new macro id to a
14 2399 sjacqu01
command that didn't previously have an associated id (thus turning it
15 2399 sjacqu01
into a persistent command), or alter (or remove) the id of an existing
16 2399 sjacqu01
command.
17 2399 sjacqu01
<br>Adding new commands to the macro requires that you have some
18 2399 sjacqu01
knowledge of the commands. There is a filter above the
19 2399 sjacqu01
<bold>Available Commands</bold>
20 2399 sjacqu01
list that defaults to showing only edit commands (based on looking at
21 2399 sjacqu01
categories). Some commands are not appropriate to a macro, but it's
22 2399 sjacqu01
impossible for me to tell what they are, so you may have to experiment.
23 486 mdecorde
<h3>Special macro helper commands</h3>
24 2399 sjacqu01
<ul>Mark selection start - set a 'mark' at the current selection
25 2399 sjacqu01
        start, or at the caret pos if no selection
26 2399 sjacqu01
</ul>
27 2399 sjacqu01
<ul>Mark selection end - set a 'mark' at the current selection end,
28 2399 sjacqu01
        or at the caret pos if no selection
29 2399 sjacqu01
</ul>
30 2399 sjacqu01
<ul>Move cursor to mark - Set the editor cursor to the current mark
31 2399 sjacqu01
        position
32 2399 sjacqu01
</ul>
33 2399 sjacqu01
<ul>Insert string - this is the workhorse command used to add text.
34 2399 sjacqu01
        Can contain carriage returns.
35 2399 sjacqu01
</ul>
36 2399 sjacqu01
<ul>Find - perform various kinds of text searching
37 2399 sjacqu01
</ul>
38 2399 sjacqu01
<ul>Styled Text commands - These are commands I've added to the
39 2399 sjacqu01
        system since they aren't commands by default. Actions like "move cursor
40 2399 sjacqu01
        right" are supported by the StyledText widget but aren't mapped as key
41 2399 sjacqu01
        bindings.
42 2399 sjacqu01
</ul>
43 2399 sjacqu01
<ul>Macro script - You can write whatever scripts you'd like using
44 2399 sjacqu01
        beanshell. I pass in several variables for the editor that should be
45 2399 sjacqu01
        useful.
46 2399 sjacqu01
</ul>
47 2399 sjacqu01
<br> The Mark commands are provided as a way to maintain some state
48 2399 sjacqu01
while other operations are performed without requiring scripting. For
49 2399 sjacqu01
example, to comment a selected area, you could record a sequence of
50 2399 sjacqu01
commands like:
51 2399 sjacqu01
<ol>mark selection start
52 2399 sjacqu01
</ol>
53 2399 sjacqu01
<ol>move cursor right (puts cursor at end of selection
54 2399 sjacqu01
</ol>
55 2399 sjacqu01
<ol>insert string "*/"
56 2399 sjacqu01
</ol>
57 2399 sjacqu01
<ol>move cursor to mark
58 2399 sjacqu01
</ol>
59 2399 sjacqu01
<ol>insert string "/*"
60 2399 sjacqu01
</ol>
61 486 mdecorde
62 486 mdecorde
</html>