Mercurial > projects > dwt2
annotate org.eclipse.text/src/org/eclipse/jface/text/IDocumentExtension3.d @ 14:5feec68b4556
First run of automatic package imports
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:41:58 +0100 |
parents | bc29606a740c |
children | c4b1a29263fc |
rev | line source |
---|---|
12
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1 /******************************************************************************* |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2 * Copyright (c) 2000, 2005 IBM Corporation and others. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
3 * All rights reserved. This program and the accompanying materials |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
5 * which accompanies this distribution, and is available at |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
6 * http://www.eclipse.org/legal/epl-v10.html |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
7 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
8 * Contributors: |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
9 * IBM Corporation - initial API and implementation |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
10 * Port to the D programming language: |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
11 * Frank Benoit <benoit@tionex.de> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
12 *******************************************************************************/ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
13 module org.eclipse.jface.text.IDocumentExtension3; |
14
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
14 import org.eclipse.jface.text.IRepairableDocument; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
15 import org.eclipse.jface.text.AbstractDocument; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
16 import org.eclipse.jface.text.IDocumentPartitionerExtension3; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
17 import org.eclipse.jface.text.ConfigurableLineTracker; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
18 import org.eclipse.jface.text.IRegion; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
19 import org.eclipse.jface.text.TypedRegion; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
20 import org.eclipse.jface.text.IDocumentExtension2; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
21 import org.eclipse.jface.text.TypedPosition; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
22 import org.eclipse.jface.text.RewriteSessionEditProcessor; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
23 import org.eclipse.jface.text.SlaveDocumentEvent; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
24 import org.eclipse.jface.text.IDocumentListener; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
25 import org.eclipse.jface.text.ISynchronizable; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
26 import org.eclipse.jface.text.DocumentEvent; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
27 import org.eclipse.jface.text.Position; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
28 import org.eclipse.jface.text.IRepairableDocumentExtension; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
29 import org.eclipse.jface.text.DocumentRewriteSessionType; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
30 import org.eclipse.jface.text.Region; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
31 import org.eclipse.jface.text.IDocumentExtension4; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
32 import org.eclipse.jface.text.BadLocationException; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
33 import org.eclipse.jface.text.TextMessages; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
34 import org.eclipse.jface.text.IDocumentPartitioningListenerExtension2; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
35 import org.eclipse.jface.text.IDocumentInformationMappingExtension; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
36 import org.eclipse.jface.text.IDocumentPartitioningListenerExtension; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
37 import org.eclipse.jface.text.ITextStore; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
38 import org.eclipse.jface.text.IDocumentPartitionerExtension; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
39 import org.eclipse.jface.text.DocumentRewriteSession; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
40 import org.eclipse.jface.text.IPositionUpdater; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
41 import org.eclipse.jface.text.ISlaveDocumentManagerExtension; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
42 import org.eclipse.jface.text.ILineTracker; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
43 import org.eclipse.jface.text.ListLineTracker; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
44 import org.eclipse.jface.text.IDocumentInformationMapping; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
45 import org.eclipse.jface.text.IDocumentRewriteSessionListener; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
46 import org.eclipse.jface.text.Assert; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
47 import org.eclipse.jface.text.AbstractLineTracker; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
48 import org.eclipse.jface.text.DefaultLineTracker; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
49 import org.eclipse.jface.text.BadPositionCategoryException; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
50 import org.eclipse.jface.text.BadPartitioningException; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
51 import org.eclipse.jface.text.SequentialRewriteTextStore; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
52 import org.eclipse.jface.text.IDocumentInformationMappingExtension2; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
53 import org.eclipse.jface.text.DocumentPartitioningChangedEvent; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
54 import org.eclipse.jface.text.FindReplaceDocumentAdapter; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
55 import org.eclipse.jface.text.TextUtilities; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
56 import org.eclipse.jface.text.ISlaveDocumentManager; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
57 import org.eclipse.jface.text.IDocument; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
58 import org.eclipse.jface.text.ILineTrackerExtension; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
59 import org.eclipse.jface.text.IDocumentPartitioner; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
60 import org.eclipse.jface.text.GapTextStore; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
61 import org.eclipse.jface.text.Document; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
62 import org.eclipse.jface.text.IDocumentExtension; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
63 import org.eclipse.jface.text.IDocumentPartitioningListener; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
64 import org.eclipse.jface.text.CopyOnWriteTextStore; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
65 import org.eclipse.jface.text.DefaultPositionUpdater; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
66 import org.eclipse.jface.text.Line; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
67 import org.eclipse.jface.text.DocumentRewriteSessionEvent; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
68 import org.eclipse.jface.text.IDocumentPartitionerExtension2; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
69 import org.eclipse.jface.text.ITypedRegion; |
5feec68b4556
First run of automatic package imports
Frank Benoit <benoit@tionex.de>
parents:
12
diff
changeset
|
70 import org.eclipse.jface.text.TreeLineTracker; |
12
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
71 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
72 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
73 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
74 import java.lang.all; |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
75 import java.util.Set; |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
76 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
77 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
78 * Extension interface for {@link org.eclipse.jface.text.IDocument}. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
79 * <p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
80 * Adds the concept of multiple partitionings and the concept of zero-length |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
81 * partitions in conjunction with open and delimited partitions. A delimited |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
82 * partition has a well defined start delimiter and a well defined end |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
83 * delimiter. Between two delimited partitions there may be an open partition of |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
84 * length zero. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
85 * <p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
86 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
87 * In order to fulfill the contract of this interface, the document must be |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
88 * configured with a document partitioner implementing |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
89 * {@link org.eclipse.jface.text.IDocumentPartitionerExtension2}. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
90 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
91 * @see org.eclipse.jface.text.IDocumentPartitionerExtension2 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
92 * @since 3.0 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
93 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
94 public interface IDocumentExtension3 { |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
95 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
96 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
97 * The identifier of the default partitioning. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
98 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
99 final static String DEFAULT_PARTITIONING= "__dftl_partitioning"; //$NON-NLS-1$ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
100 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
101 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
102 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
103 * Returns the existing partitionings for this document. This includes |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
104 * the default partitioning. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
105 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
106 * @return the existing partitionings for this document |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
107 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
108 String[] getPartitionings(); |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
109 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
110 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
111 * Returns the set of legal content types of document partitions for the given partitioning |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
112 * This set can be empty. The set can contain more content types than contained by the |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
113 * result of <code>getPartitioning(partitioning, 0, getLength())</code>. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
114 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
115 * @param partitioning the partitioning for which to return the legal content types |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
116 * @return the set of legal content types |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
117 * @exception BadPartitioningException if partitioning is invalid for this document |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
118 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
119 String[] getLegalContentTypes(String partitioning) ; |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
120 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
121 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
122 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
123 * Returns the type of the document partition containing the given offset |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
124 * for the given partitioning. This is a convenience method for |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
125 * <code>getPartition(partitioning, offset, bool).getType()</code>. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
126 * <p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
127 * If <code>preferOpenPartitions</code> is <code>true</code>, |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
128 * precedence is given to an open partition ending at <code>offset</code> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
129 * over a delimited partition starting at <code>offset</code>. If it is |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
130 * <code>false</code>, precedence is given to the partition that does not |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
131 * end at <code>offset</code>. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
132 * </p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
133 * This is only supported if the connected <code>IDocumentPartitioner</code> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
134 * supports it, i.e. implements <code>IDocumentPartitionerExtension2</code>. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
135 * Otherwise, <code>preferOpenPartitions</code> is ignored. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
136 * </p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
137 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
138 * @param partitioning the partitioning |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
139 * @param offset the document offset |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
140 * @param preferOpenPartitions <code>true</code> if precedence should be |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
141 * given to a open partition ending at <code>offset</code> over a |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
142 * closed partition starting at <code>offset</code> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
143 * @return the partition type |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
144 * @exception BadLocationException if offset is invalid in this document |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
145 * @exception BadPartitioningException if partitioning is invalid for this document |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
146 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
147 String getContentType(String partitioning, int offset, bool preferOpenPartitions); |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
148 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
149 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
150 * Returns the document partition of the given partitioning in which the |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
151 * given offset is located. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
152 * <p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
153 * If <code>preferOpenPartitions</code> is <code>true</code>, |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
154 * precedence is given to an open partition ending at <code>offset</code> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
155 * over a delimited partition starting at <code>offset</code>. If it is |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
156 * <code>false</code>, precedence is given to the partition that does not |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
157 * end at <code>offset</code>. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
158 * </p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
159 * This is only supported if the connected <code>IDocumentPartitioner</code> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
160 * supports it, i.e. implements <code>IDocumentPartitionerExtension2</code>. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
161 * Otherwise, <code>preferOpenPartitions</code> is ignored. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
162 * </p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
163 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
164 * @param partitioning the partitioning |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
165 * @param offset the document offset |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
166 * @param preferOpenPartitions <code>true</code> if precedence should be |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
167 * given to a open partition ending at <code>offset</code> over a |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
168 * closed partition starting at <code>offset</code> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
169 * @return a specification of the partition |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
170 * @exception BadLocationException if offset is invalid in this document |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
171 * @exception BadPartitioningException if partitioning is invalid for this document |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
172 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
173 ITypedRegion getPartition(String partitioning, int offset, bool preferOpenPartitions); |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
174 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
175 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
176 * Computes the partitioning of the given document range based on the given |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
177 * partitioning type. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
178 * <p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
179 * If <code>includeZeroLengthPartitions</code> is <code>true</code>, a |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
180 * zero-length partition of an open partition type (usually the default |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
181 * partition) is included between two closed partitions. If it is |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
182 * <code>false</code>, no zero-length partitions are included. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
183 * </p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
184 * This is only supported if the connected <code>IDocumentPartitioner</code> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
185 * supports it, i.e. implements <code>IDocumentPartitionerExtension2</code>. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
186 * Otherwise, <code>includeZeroLengthPartitions</code> is ignored. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
187 * </p> |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
188 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
189 * @param partitioning the document's partitioning type |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
190 * @param offset the document offset at which the range starts |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
191 * @param length the length of the document range |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
192 * @param includeZeroLengthPartitions <code>true</code> if zero-length |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
193 * partitions should be returned as part of the computed partitioning |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
194 * @return a specification of the range's partitioning |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
195 * @exception BadLocationException if the range is invalid in this document$ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
196 * @exception BadPartitioningException if partitioning is invalid for this document |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
197 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
198 ITypedRegion[] computePartitioning(String partitioning, int offset, int length, bool includeZeroLengthPartitions); |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
199 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
200 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
201 * Sets this document's partitioner. The caller of this method is responsible for |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
202 * disconnecting the document's old partitioner from the document and to |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
203 * connect the new partitioner to the document. Informs all document partitioning |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
204 * listeners about this change. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
205 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
206 * @param partitioning the partitioning for which to set the partitioner |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
207 * @param partitioner the document's new partitioner |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
208 * @see IDocumentPartitioningListener |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
209 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
210 void setDocumentPartitioner(String partitioning, IDocumentPartitioner partitioner); |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
211 |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
212 /** |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
213 * Returns the partitioner for the given partitioning or <code>null</code> if |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
214 * no partitioner is registered. |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
215 * |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
216 * @param partitioning the partitioning for which to set the partitioner |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
217 * @return the partitioner for the given partitioning |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
218 */ |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
219 IDocumentPartitioner getDocumentPartitioner(String partitioning); |
bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
220 } |