Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.text/src/org/eclipse/jface/text/link/package.html')
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/link/package.html51
1 files changed, 16 insertions, 35 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/link/package.html b/org.eclipse.text/src/org/eclipse/jface/text/link/package.html
index aeab0f0e75e..bc58040011e 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/link/package.html
+++ b/org.eclipse.text/src/org/eclipse/jface/text/link/package.html
@@ -1,13 +1,9 @@
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta content="text/html; charset=iso-8859-1"
- http-equiv="Content-Type">
+<html><head>
+ <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta content="IBM" name="Author">
- <meta content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]"
- name="GENERATOR">
- <title>Linked Position Infrastructure</title>
-</head>
+ <meta content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]" name="GENERATOR"><title>Linked Position Infrastructure</title></head>
+
<body>
Application programming interfaces for interaction
with the Eclipse Java User Interface text support.
@@ -22,27 +18,18 @@ of one linked position will be reflected in the others.
<h4>Classes</h4>
<ul>
<li><code>LinkedPositionGroup</code>: a set of linked positions. Add
-positions to a group using the <code>addPosition</code> and <code>createPosition</code>
-methods, which
-also allow to specify an iteration order. See <span
- style="font-family: monospace;">ProposalPosition</span><code><span
- style="font-family: helvetica,arial,sans-serif;"> </span></code><span
- style="font-family: helvetica,arial,sans-serif;">for a position type
-that lets one attach </span><span style="font-family: monospace;">ICompletionProposals</span><span
- style="font-family: monospace;"></span><span
- style="font-family: helvetica,arial,sans-serif;"> </span><span
- style="font-family: helvetica,arial,sans-serif;">to</span>
+positions to a group using the <code>addPosition</code> method. See <span style="font-family: monospace;">LinkedPosition</span><code><span style="font-family: helvetica,arial,sans-serif;"> and</span></code> <span style="font-family: monospace;">ProposalPosition</span><code><span style="font-family: helvetica,arial,sans-serif;"> </span></code><span style="font-family: helvetica,arial,sans-serif;">for a position type
+that lets one attach </span><span style="font-family: monospace;">ICompletionProposals</span><span style="font-family: monospace;"></span><span style="font-family: helvetica,arial,sans-serif;"> </span><span style="font-family: helvetica,arial,sans-serif;">to</span>
be shown when the position is hit.</li>
- <li><code>LinkedEnvironment</code>: umbrellas several <code>PositionGroup</code>s,
+ <li><code>LinkedModeModel</code>: umbrellas several <code>LinkedPositionGroup</code>s,
e.g. in a template that has several groups of linked positions. Handles
-the forwarding of updates received via an IDocumentListener. Add <code>PositionGroup</code>s
+the forwarding of updates received via an IDocumentListener. Add <code>LinkedPositionGroup</code>s
to
-an environment using the <code>addGroup</code> method. Existence of a <span
- style="font-family: monospace;">LinkedEnvironment </span>can be
+an model using the <code>addGroup</code> method. Existence of a <span style="font-family: monospace;">LinkedModeModel </span>can be
tested by one of the static methods.<br>
</li>
- <li><code>LinkedUIControl</code>: The UI for linked mode (for one
-environment, to be precise). Monitors key etc. activity, monitors exit
+ <li><code>LinkedModeUI</code>: The UI for linked mode (for one
+model, to be precise). Monitors key etc. activity, monitors exit
conditions, creates a painter etc. <br>
Properties:
<ul>
@@ -54,9 +41,9 @@ mode (e.g. using Enter, or Tab from the last position when not
cycling). Set <code>isTabStop</code> to <code>true</code> if tabbing
should stop over when cycling.</li>
<li><span style="font-weight: bold;">position listener</span>:
-you can register a position listener which will get notified whenever
-the focus position changes. An example is <span
- style="font-family: monospace;">org.eclipse.ui.texteditor.link.EditorHistoryUpdater</span>
+extending classes may register a position listener which will get
+notified whenever
+the focus position changes. An example is <span style="font-family: monospace;">org.eclipse.ui.texteditor.link.EditorLinkedModeUI.EditorHistoryUpdater</span>
which will store the edit location in the editor navigation history.<br>
</li>
</ul>
@@ -64,11 +51,5 @@ which will store the edit location in the editor navigation history.<br>
.
</ul>
<h4>Example</h4>
-<pre> IDocument doc1, doc2;<br> ITextViewer viewer1, viewer2;<br> <br> /* create groups - this step is independent of the linked mode */<br> PositionGroup group1= new PositionGroup();<br> group1.addPosition(doc1, 3,4);<br> group1.addPosition(doc1, 7,8);<br> <br> PositionGroup group2= newPositionGroup();<br> group2.addPosition(doc1, 15, 25);<br> group2.addPosition(doc2, 0, 10);<br> <br> /* set up linked mode */<br> LinkedEnvironment env= new LinkedEnvironment();<br> env.addGroup(group1);<br> env.addGroup(group2);<br> env.forceInstall();<br> <br> /* create UI */<br> LinkedUIControl ui= new LinkedUIControl(env, new ITextViewer[] { viewer1, viewer2 });<br> ui.enter();<br></pre>
-<h4>Todo</h4>
-<ul>
- <li>handle lazy computation of per-group proposals using a <code>IContentAssistProcessor</code>
-(see PositionGroup, ProposalPosition) .</li>
-</ul>
-</body>
-</html>
+<pre> IDocument doc1, doc2;<br> ITextViewer viewer1, viewer2;<br> <br> /* create groups - this step is independent of the linked mode */<br> LinkedPositionGroup group1= new LinkedPositionGroup();<br> group1.addPosition(new LinkedPosition(doc1, 3, 4));<br> group1.addPosition(new LinkedPosition(doc1, 7, 8));<br> <br> LinkedPositionGroup group2= new LinkedPositionGroup();<br> group2.addPosition(new LinkedPosition(doc1, 15, 25));<br> group2.addPosition(new LinkedPosition(doc2, 0, 10));<br> <br> /* set up linked mode */<br> LinkedModeModel model= new LinkedModeModel();<br> model.addGroup(group1);<br> model.addGroup(group2);<br> model.forceInstall();<br> <br> /* create UI */<br> LinkedModeUI ui= new LinkedModeUI(model, new ITextViewer[] { viewer1, viewer2 });<br> ui.enter();<span style="font-family: sans-serif;"><br><br></span></pre>
+</body></html> \ No newline at end of file

Back to the top