Source Code Cross Referenced for IDocumentExtension3.java in  » IDE-Eclipse » text » org » eclipse » jface » text » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » text » org.eclipse.jface.text 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 2005 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.jface.text;
011:
012:        /**
013:         * Extension interface for {@link org.eclipse.jface.text.IDocument}.
014:         * <p>
015:         * Adds the concept of multiple partitionings and the concept of zero-length
016:         * partitions in conjunction with open and delimited partitions. A delimited
017:         * partition has a well defined start delimiter and a well defined end
018:         * delimiter. Between two delimited partitions there may be an open partition of
019:         * length zero.
020:         * <p>
021:         *
022:         * In order to fulfill the contract of this interface, the document must be
023:         * configured with a document partitioner implementing
024:         * {@link org.eclipse.jface.text.IDocumentPartitionerExtension2}.
025:         *
026:         * @see org.eclipse.jface.text.IDocumentPartitionerExtension2
027:         * @since 3.0
028:         */
029:        public interface IDocumentExtension3 {
030:
031:            /**
032:             * The identifier of the default partitioning.
033:             */
034:            final static String DEFAULT_PARTITIONING = "__dftl_partitioning"; //$NON-NLS-1$
035:
036:            /**
037:             * Returns the existing partitionings for this document. This includes
038:             * the default partitioning.
039:             *
040:             * @return the existing partitionings for this document
041:             */
042:            String[] getPartitionings();
043:
044:            /**
045:             * Returns the set of legal content types of document partitions for the given partitioning
046:             * This set can be empty. The set can contain more content types than  contained by the
047:             * result of <code>getPartitioning(partitioning, 0, getLength())</code>.
048:             *
049:             * @param partitioning the partitioning for which to return the legal content types
050:             * @return the set of legal content types
051:             * @exception BadPartitioningException if partitioning is invalid for this document
052:             */
053:            String[] getLegalContentTypes(String partitioning)
054:                    throws BadPartitioningException;
055:
056:            /**
057:             * Returns the type of the document partition containing the given offset
058:             * for the given partitioning. This is a convenience method for
059:             * <code>getPartition(partitioning, offset, boolean).getType()</code>.
060:             * <p>
061:             * If <code>preferOpenPartitions</code> is <code>true</code>,
062:             * precedence is given to an open partition ending at <code>offset</code>
063:             * over a delimited partition starting at <code>offset</code>. If it is
064:             * <code>false</code>, precedence is given to the partition that does not
065:             * end at <code>offset</code>.
066:             * </p>
067:             * This is only supported if the connected <code>IDocumentPartitioner</code>
068:             * supports it, i.e. implements <code>IDocumentPartitionerExtension2</code>.
069:             * Otherwise, <code>preferOpenPartitions</code> is ignored.
070:             * </p>
071:             *
072:             * @param partitioning the partitioning
073:             * @param offset the document offset
074:             * @param preferOpenPartitions <code>true</code> if precedence should be
075:             *        given to a open partition ending at <code>offset</code> over a
076:             *        closed partition starting at <code>offset</code>
077:             * @return the partition type
078:             * @exception BadLocationException if offset is invalid in this document
079:             * @exception BadPartitioningException if partitioning is invalid for this document
080:             */
081:            String getContentType(String partitioning, int offset,
082:                    boolean preferOpenPartitions) throws BadLocationException,
083:                    BadPartitioningException;
084:
085:            /**
086:             * Returns the document partition of the given partitioning in which the
087:             * given offset is located.
088:             * <p>
089:             * If <code>preferOpenPartitions</code> is <code>true</code>,
090:             * precedence is given to an open partition ending at <code>offset</code>
091:             * over a delimited partition starting at <code>offset</code>. If it is
092:             * <code>false</code>, precedence is given to the partition that does not
093:             * end at <code>offset</code>.
094:             * </p>
095:             * This is only supported if the connected <code>IDocumentPartitioner</code>
096:             * supports it, i.e. implements <code>IDocumentPartitionerExtension2</code>.
097:             * Otherwise, <code>preferOpenPartitions</code> is ignored.
098:             * </p>
099:             *
100:             * @param partitioning the partitioning
101:             * @param offset the document offset
102:             * @param preferOpenPartitions <code>true</code> if precedence should be
103:             *        given to a open partition ending at <code>offset</code> over a
104:             *        closed partition starting at <code>offset</code>
105:             * @return a specification of the partition
106:             * @exception BadLocationException if offset is invalid in this document
107:             * @exception BadPartitioningException if partitioning is invalid for this document
108:             */
109:            ITypedRegion getPartition(String partitioning, int offset,
110:                    boolean preferOpenPartitions) throws BadLocationException,
111:                    BadPartitioningException;
112:
113:            /**
114:             * Computes the partitioning of the given document range based on the given
115:             * partitioning type.
116:             * <p>
117:             * If <code>includeZeroLengthPartitions</code> is <code>true</code>, a
118:             * zero-length partition of an open partition type (usually the default
119:             * partition) is included between two closed partitions. If it is
120:             * <code>false</code>, no zero-length partitions are included.
121:             * </p>
122:             * This is only supported if the connected <code>IDocumentPartitioner</code>
123:             * supports it, i.e. implements <code>IDocumentPartitionerExtension2</code>.
124:             * Otherwise, <code>includeZeroLengthPartitions</code> is ignored.
125:             * </p>
126:             *
127:             * @param partitioning the document's partitioning type
128:             * @param offset the document offset at which the range starts
129:             * @param length the length of the document range
130:             * @param includeZeroLengthPartitions <code>true</code> if zero-length
131:             *        partitions should be returned as part of the computed partitioning
132:             * @return a specification of the range's partitioning
133:             * @exception BadLocationException if the range is invalid in this document$
134:             * @exception BadPartitioningException if partitioning is invalid for this document
135:             */
136:            ITypedRegion[] computePartitioning(String partitioning, int offset,
137:                    int length, boolean includeZeroLengthPartitions)
138:                    throws BadLocationException, BadPartitioningException;
139:
140:            /**
141:             * Sets this document's partitioner. The caller of this method is responsible for
142:             * disconnecting the document's old partitioner from the document and to
143:             * connect the new partitioner to the document. Informs all document partitioning
144:             * listeners about this change.
145:             *
146:             * @param  partitioning the partitioning for which to set the partitioner
147:             * @param partitioner the document's new partitioner
148:             * @see IDocumentPartitioningListener
149:             */
150:            void setDocumentPartitioner(String partitioning,
151:                    IDocumentPartitioner partitioner);
152:
153:            /**
154:             * Returns the partitioner for the given partitioning or <code>null</code> if
155:             * no partitioner is registered.
156:             *
157:             * @param  partitioning the partitioning for which to set the partitioner
158:             * @return the partitioner for the given partitioning
159:             */
160:            IDocumentPartitioner getDocumentPartitioner(String partitioning);
161:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.