Révision 2399

tmp/org.txm.partition.rcp/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.python.core/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry exported="true" kind="lib" path="lib/jython-standalone-2.7.0.jar"/>
4
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
6
		    <accessrules>
7
			      <accessrule kind="accessible" pattern="**"/>
8
		    </accessrules>
9
	  </classpathentry>
10
	  <classpathentry kind="src" path="src"/>
11
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry exported="true" kind="lib"
4
		path="lib/jython-standalone-2.7.0.jar" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
7
	<classpathentry kind="con"
8
		path="org.eclipse.pde.core.requiredPlugins">
9
		<accessrules>
10
			<accessrule kind="accessible" pattern="**" />
11
		</accessrules>
12
	</classpathentry>
13
	<classpathentry kind="src" path="src" />
14
	<classpathentry kind="output" path="bin" />
12 15
</classpath>
tmp/org.txm.para.rcp/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.properties.rcp/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.partition.core/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.progression.rcp/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.querycooccurrences.rcp/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/package.html (revision 2399)
1 1
<html>
2 2
<body>
3
<p>Cooccurrence Matrix</p>
3
	<p>Cooccurrence Matrix</p>
4 4
</body>
5 5
</html>
tmp/org.txm.para.core/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.para.core/src/org/txm/para/core/functions/package.html (revision 2399)
1 1
<html>
2 2
<body>
3
<p>Prototype of aligned edition browser</p>
3
	<p>Prototype of aligned edition browser</p>
4 4
</body>
5 5
</html>
tmp/org.txm.progression.core/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.progression.core/src/org/txm/progression/core/package.html (revision 2399)
1 1
<html>
2 2
<body>
3
<p>Progression - inspired by Weblex.</p>
3
	<p>Progression - inspired by Weblex.</p>
4 4
</body>
5 5
</html>
tmp/org.txm.properties.core/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
4
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
5
		    <accessrules>
6
			      <accessrule kind="accessible" pattern="**"/>
7
		    </accessrules>
8
	  </classpathentry>
9
	  <classpathentry kind="src" path="src"/>
10
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
5
	<classpathentry kind="con"
6
		path="org.eclipse.pde.core.requiredPlugins">
7
		<accessrules>
8
			<accessrule kind="accessible" pattern="**" />
9
		</accessrules>
10
	</classpathentry>
11
	<classpathentry kind="src" path="src" />
12
	<classpathentry kind="output" path="bin" />
11 13
</classpath>
tmp/org.txm.properties.core/src/org/txm/properties/core/package.html (revision 2399)
1 1
<html>
2 2
<body>
3
<p>Diagnostic function</p>
3
	<p>Diagnostic function</p>
4 4
</body>
5 5
</html>
tmp/org.txm.practically.rcp/helpContexts.xml (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<?NLS TYPE="org.eclipse.help.contexts"?>
3
  
4
  <contexts>
5
    <context id="overallHelp">
6
      <description>Help for Practically Macro plugin</description>
7
      <topic href="doc/overall.html" label="Practically Macro"/>
8
    </context>
9
    <context id="editDialogHelp">
10
      <description>Help for Practically Macro edit dialog</description>
11
      <topic href="doc/macroEdit.html" label="Practically Macro macro editing"/>
12
    </context>
13
    <context id="managingMacrosHelp">
14
      <description>Help for Practically Macro edit dialog</description>
15
      <topic href="doc/macroManage.html" label="Practically Macro macro management"/>
16
    </context>
17
  </contexts>
3

  
4
<contexts>
5
	<context id="overallHelp">
6
		<description>Help for Practically Macro plugin</description>
7
		<topic href="doc/overall.html" label="Practically Macro" />
8
	</context>
9
	<context id="editDialogHelp">
10
		<description>Help for Practically Macro edit dialog</description>
11
		<topic href="doc/macroEdit.html"
12
			label="Practically Macro macro editing" />
13
	</context>
14
	<context id="managingMacrosHelp">
15
		<description>Help for Practically Macro edit dialog</description>
16
		<topic href="doc/macroManage.html"
17
			label="Practically Macro macro management" />
18
	</context>
19
</contexts>
tmp/org.txm.practically.rcp/.classpath (revision 2399)
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
4
	  <classpathentry kind="src" path="src"/>
5
	  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6
	  <classpathentry kind="output" path="bin"/>
3
	<classpathentry kind="con"
4
		path="org.eclipse.pde.core.requiredPlugins" />
5
	<classpathentry kind="src" path="src" />
6
	<classpathentry kind="con"
7
		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
8
	<classpathentry kind="output" path="bin" />
7 9
</classpath>
tmp/org.txm.practically.rcp/doc/overall.html (revision 2399)
1 1
<html>
2 2
<h1>Practically Macro</h1>
3
Practically Macro is an attempt to add simple editor scripting to the Eclipse platform; it is not an attempt at scripting the Eclipse platform in general.  I believe that editor scripting, while similar to general scripting, is fundamentally a different problem.  The intent of this plug-in is to enable users to record/create editor macros in a lightweight manner that can be used temporarily or easily shared with others.  I have tried to do this in a way that uses public API and public assumptions, and I've mostly been able to do so.  In my opinion, every character entered or navigation button pressed should generate a command that can be recorded.  However, Eclipse doesn't generate commands for everything, so I've done the best I can.
3
Practically Macro is an attempt to add simple editor scripting to the
4
Eclipse platform; it is not an attempt at scripting the Eclipse platform
5
in general. I believe that editor scripting, while similar to general
6
scripting, is fundamentally a different problem. The intent of this
7
plug-in is to enable users to record/create editor macros in a
8
lightweight manner that can be used temporarily or easily shared with
9
others. I have tried to do this in a way that uses public API and public
10
assumptions, and I've mostly been able to do so. In my opinion, every
11
character entered or navigation button pressed should generate a command
12
that can be recorded. However, Eclipse doesn't generate commands for
13
everything, so I've done the best I can.
4 14

  
5 15
<h2>Requirements</h2>
6
Eclipse 3.4 or greater; will not run correctly at 3.3.  Requires the workbench.  Shouldn't require jdt.  
16
Eclipse 3.4 or greater; will not run correctly at 3.3. Requires the
17
workbench. Shouldn't require jdt.
7 18

  
8 19
<h2>Recording a macro</h2>
9
Start recording a macro by typing Alt+Ctrl+R or clicking the "Record Macro" button on the main toolbar.  The Record button is only enabled when a text editor has input focus.  Once record mode is invoked, the record button will appear depressed.  
10
Actions that will be captured by recording a macro are Eclipse commands and keystrokes.  Mouse activity is not captured and should be avoided in the editor window.
11
Once you are done recording a macro, click the "Record Macro" button again.  If you have recorded any macro contents, a Save dialog will pop up allowing you to supply a name/id/description for the macro.  You can cancel if you don't want to keep the macro.  To allow the macro to be persisted across Eclipse invocations or to allow mapping the command to a keystroke, you must supply an ID.  If you only supply a name, the macro can be used during the Eclipse session only.  You can modify/add an ID later in the session. 
20
Start recording a macro by typing Alt+Ctrl+R or clicking the "Record
21
Macro" button on the main toolbar. The Record button is only enabled
22
when a text editor has input focus. Once record mode is invoked, the
23
record button will appear depressed. Actions that will be captured by
24
recording a macro are Eclipse commands and keystrokes. Mouse activity is
25
not captured and should be avoided in the editor window. Once you are
26
done recording a macro, click the "Record Macro" button again. If you
27
have recorded any macro contents, a Save dialog will pop up allowing you
28
to supply a name/id/description for the macro. You can cancel if you
29
don't want to keep the macro. To allow the macro to be persisted across
30
Eclipse invocations or to allow mapping the command to a keystroke, you
31
must supply an ID. If you only supply a name, the macro can be used
32
during the Eclipse session only. You can modify/add an ID later in the
33
session.
12 34

  
13 35
<h2>Playing a macro</h2>
14
To play a macro, use the drop down menu on the "Play Macro" button.  You can use the "Play command..." button to execute any Eclipse command or macro that is already defined.  If there are user macros defined with ids, they will show up in a menu called "Macros".  Only the last few will be available, and they will be ordered by last used time.  If there are commands that do not have associated ids, they will show up in the submenu named "Temporary Macros", ordered by last used time.  After you have execute a macro, clicking the Play button will execute the last executed macro.
36
To play a macro, use the drop down menu on the "Play Macro" button. You
37
can use the "Play command..." button to execute any Eclipse command or
38
macro that is already defined. If there are user macros defined with
39
ids, they will show up in a menu called "Macros". Only the last few will
40
be available, and they will be ordered by last used time. If there are
41
commands that do not have associated ids, they will show up in the
42
submenu named "Temporary Macros", ordered by last used time. After you
43
have execute a macro, clicking the Play button will execute the last
44
executed macro.
15 45

  
16 46
<h2>Gotchas</h2>
17
This plug-in is built on top of the Eclipse platform. Unfortunately, the Eclipse command structure is not designed with macro recording in mind.  What this means is that not all commands are recordable, and some behavior may be a little sketchy.  However, you can edit a macro after recording, so you should be able to patch up behavior that isn't desirable.  The lack of an official Eclipse strategy means that there is no guide to what commands should be recordable, so I don't impose any artificial limitations.<br>
18
Here are some types of actions that make sense to record as part of a macro:<br>
19
<ul>typing characters (see note below)</ul>
20
<ul>navigation characters (ex. arrows, page down)</ul>
21
<ul>find dialog (I've supplied my own since the standard dialog isn't public)</ul>
22
<ul>incremental find (with some hacking)</ul>
23
<ul>previously recorded macros</ul>
24
<ul>other commands that don't pop up dialogs (ex. file save, find next, organize imports, toggle insert mode)</ul>
25
<br> 
26
Here are some types of actions that almost certainly won't work correctly:<br>
27
<ul>Commands that bring up dialogs (ex. Go to line)</ul>
28
<ul>Wizards and other dialogs (ex. Open File)</ul>
29
<ul>ctrl+space intellisense</ul>
30
<ul>invoking code templates like "foreach"</ul>
47
This plug-in is built on top of the Eclipse platform. Unfortunately, the
48
Eclipse command structure is not designed with macro recording in mind.
49
What this means is that not all commands are recordable, and some
50
behavior may be a little sketchy. However, you can edit a macro after
51
recording, so you should be able to patch up behavior that isn't
52
desirable. The lack of an official Eclipse strategy means that there is
53
no guide to what commands should be recordable, so I don't impose any
54
artificial limitations.
55
<br> Here are some types of actions that make sense to record as
56
part of a macro:
57
<br>
58
<ul>typing characters (see note below)
59
</ul>
60
<ul>navigation characters (ex. arrows, page down)
61
</ul>
62
<ul>find dialog (I've supplied my own since the standard dialog
63
	isn't public)
64
</ul>
65
<ul>incremental find (with some hacking)
66
</ul>
67
<ul>previously recorded macros
68
</ul>
69
<ul>other commands that don't pop up dialogs (ex. file save, find
70
	next, organize imports, toggle insert mode)
71
</ul>
72
<br> Here are some types of actions that almost certainly won't
73
work correctly:
74
<br>
75
<ul>Commands that bring up dialogs (ex. Go to line)
76
</ul>
77
<ul>Wizards and other dialogs (ex. Open File)
78
</ul>
79
<ul>ctrl+space intellisense
80
</ul>
81
<ul>invoking code templates like "foreach"
82
</ul>
31 83

  
32 84
<h3>Special notes</h3>
33
Certain keystrokes are handled specially by the language editor.  However, these editors don't generate commands associated with their behavior, so they are difficult to interpret.  For example, in a Java file, if you type in a '<', a '>' will be inserted and the cursor will be placed between the two symbols.  Also, the editor is put into a special edit mode so that if you backspace, both characters are deleted.  However, there is no set of commands generated that accomplishes these tasks.  Instead, the editor document captures the initial '<' via a VerifyKeyListener and then does the inserts and sets the mode directly on the document.  Therefore, if you have this setting ("Automatically Close") turned on and type a '<', then the macro will not have any commands corresponding to some of these operations.  You can edit the macro afterward, but that may be inconvenient.  I've added another mode on the Options page that records keys as raw key events and plays them back.  This preserves the behavior of special characters like '<', but is more difficult to edit and may not be sharable with users on other platforms.
34
<br><bold>In general, I recommend running in 'Command' mode and 'typing through' special keystroke modes while recording a macro.</bold>
85
Certain keystrokes are handled specially by the language editor.
86
However, these editors don't generate commands associated with their
87
behavior, so they are difficult to interpret. For example, in a Java
88
file, if you type in a '<', a '>' will be inserted and the cursor will
89
be placed between the two symbols. Also, the editor is put into a
90
special edit mode so that if you backspace, both characters are deleted.
91
However, there is no set of commands generated that accomplishes these
92
tasks. Instead, the editor document captures the initial '<' via a
93
VerifyKeyListener and then does the inserts and sets the mode directly
94
on the document. Therefore, if you have this setting ("Automatically
95
Close") turned on and type a '<', then the macro will not have any
96
commands corresponding to some of these operations. You can edit the
97
macro afterward, but that may be inconvenient. I've added another mode
98
on the Options page that records keys as raw key events and plays them
99
back. This preserves the behavior of special characters like '<', but is
100
more difficult to edit and may not be sharable with users on other
101
platforms.
102
<br>
103
<bold>In general, I recommend running in 'Command' mode and
104
'typing through' special keystroke modes while recording a macro.</bold>
35 105

  
36 106
<h2>Editing macros</h2>
37
You can edit macros you have recorded via the Window->Preferences->PracticallyMacro Options->Editor Macro Definitions page.  From this page, you can delete existing macros or edit macros.  Select a macro and click the Edit... button.  From the edit dialog, you can reorder commands in the macro, remove commands, add new commands, and edit commands that have data associated with them (ex. the Find command).
38
The Edit dialog also allows you to add a new macro id to a command that didn't previously have an associated id (thus turning it into a persistent command), or alter the id of an existing command.
107
You can edit macros you have recorded via the
108
Window->Preferences->PracticallyMacro Options->Editor Macro Definitions
109
page. From this page, you can delete existing macros or edit macros.
110
Select a macro and click the Edit... button. From the edit dialog, you
111
can reorder commands in the macro, remove commands, add new commands,
112
and edit commands that have data associated with them (ex. the Find
113
command). The Edit dialog also allows you to add a new macro id to a
114
command that didn't previously have an associated id (thus turning it
115
into a persistent command), or alter the id of an existing command.
39 116

  
40 117
<h2>Sharing macros</h2>
41
From the Editor Macro Definitions page you can export or import macros.  Macros exported to a file can be imported via the import dialog into another eclipse (with the Practically Macro plugins installed, as well as any required plugins/commands).  
118
From the Editor Macro Definitions page you can export or import macros.
119
Macros exported to a file can be imported via the import dialog into
120
another eclipse (with the Practically Macro plugins installed, as well
121
as any required plugins/commands).
42 122

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

  
26 62
</html>
tmp/org.txm.practically.rcp/doc/macroManage.html (revision 2399)
1 1
<html>
2 2

  
3
<h1>Creating new macros</h2>
4
Click the <bold>New</bold> button to create a new macro from scratch.
5
<h1>Deleting Macros</h2>
6
Select one or more macros to delete and click the delete button.  Macros that are mapped to keystrokes will fail to delete, as will macro contributed by plug-ins.  To delete a macro mapped to a key, you must first remove the key binding.
7
<h1>Editing Macros</h2>
8
Click the <bold>Edit</bold> button to edit an existing macro.  Macros contributed from plug-ins cannot be edited.
9
<h1>Copying Macros</h2>
10
To copy one or more macros, select them and click the <bold>Copy</bold> button.  Each macro will be copied and added to the list with a new name.  This is useful if you need another similar command, or if you want to see the contents of a macro contributed from a plug-in.
11
<h1>Sharing macros</h2>
12
Click the <bold>Export</bold> or <bold>Import</bold> buttons to export or import macros.  Macros exported to a file can be imported via the import dialog into another eclipse (with the Practically Macro plugins installed, as well as any required plugins/commands).  Macros with ids that already exist in the current Eclipse will be skipped (i.e. they will not replace the current command with that ID).  Also, from the export dialog you can copy the XML from the text box and put that directly into a plugin.xml definition with the following extension point:
13
<br><pre>   &lt;extension point="PracticallyMacro.defineMacro"&gt;
3
<h1>
4
	Creating new macros
5
	</h2>
6
	Click the
7
	<bold>New</bold>
8
	button to create a new macro from scratch.
9
	<h1>
10
		Deleting Macros
11
		</h2>
12
		Select one or more macros to delete and click the delete button.
13
		Macros that are mapped to keystrokes will fail to delete, as will
14
		macro contributed by plug-ins. To delete a macro mapped to a key, you
15
		must first remove the key binding.
16
		<h1>
17
			Editing Macros
18
			</h2>
19
			Click the
20
			<bold>Edit</bold>
21
			button to edit an existing macro. Macros contributed from plug-ins
22
			cannot be edited.
23
			<h1>
24
				Copying Macros
25
				</h2>
26
				To copy one or more macros, select them and click the
27
				<bold>Copy</bold>
28
				button. Each macro will be copied and added to the list with a new
29
				name. This is useful if you need another similar command, or if you
30
				want to see the contents of a macro contributed from a plug-in.
31
				<h1>
32
					Sharing macros
33
					</h2>
34
					Click the
35
					<bold>Export</bold>
36
					or
37
					<bold>Import</bold>
38
					buttons to export or import macros. Macros exported to a file can
39
					be imported via the import dialog into another eclipse (with the
40
					Practically Macro plugins installed, as well as any required
41
					plugins/commands). Macros with ids that already exist in the
42
					current Eclipse will be skipped (i.e. they will not replace the
43
					current command with that ID). Also, from the export dialog you can
44
					copy the XML from the text box and put that directly into a
45
					plugin.xml definition with the following extension point: <br>
46
					<pre>   &lt;extension point="PracticallyMacro.defineMacro"&gt;
14 47
      include the text from the export page here
15
   &lt;/extension&gt;</pre><br>
16
When exporting to a file, you can export one macro or a set of macros to the same file.  If a macro uses other macros you have defined, you should export them all together.
17

  
48
   &lt;/extension&gt;</pre>
49
					<br> When exporting to a file, you can export one macro or a
50
					set of macros to the same file. If a macro uses other macros you
51
					have defined, you should export them all together.
18 52
</html>

Formats disponibles : Unified diff