Source Code Cross Referenced for ILineTracker.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:         * A line tracker maps character positions to line numbers and vice versa.
014:         * Initially the line tracker is informed about its underlying text in order to
015:         * initialize the mapping information. After that, the line tracker is informed
016:         * about all changes of the underlying text allowing for incremental updates of
017:         * the mapping information. It is the client's responsibility to actively inform
018:         * the line tacker about text changes. For example, when using a line tracker in
019:         * combination with a document the document controls the line tracker.
020:         * <p>
021:         * In order to provide backward compatibility for clients of <code>ILineTracker</code>, extension
022:         * interfaces are used to provide a means of evolution. The following extension interfaces
023:         * exist:
024:         * <ul>
025:         * <li> {@link org.eclipse.jface.text.ILineTrackerExtension} since version 3.1 introducing the concept
026:         *      of rewrite sessions.</li>
027:         * </ul>
028:         * <p>
029:         * Clients may implement this interface or use the standard implementation
030:         * </p>
031:         * {@link org.eclipse.jface.text.DefaultLineTracker}or
032:         * {@link org.eclipse.jface.text.ConfigurableLineTracker}.
033:         */
034:        public interface ILineTracker {
035:
036:            /**
037:             * Returns the strings this tracker considers as legal line delimiters.
038:             *
039:             * @return the legal line delimiters
040:             */
041:            String[] getLegalLineDelimiters();
042:
043:            /**
044:             * Returns the line delimiter of the specified line. Returns <code>null</code> if the
045:             * line is not closed with a line delimiter.
046:             *
047:             * @param line the line whose line delimiter is queried
048:             * @return the line's delimiter or <code>null</code> if line does not have a delimiter
049:             * @exception BadLocationException if the line number is invalid in this tracker's line structure
050:             */
051:            String getLineDelimiter(int line) throws BadLocationException;
052:
053:            /**
054:             * Computes the number of lines in the given text.
055:             *
056:             * @param text the text whose number of lines should be computed
057:             * @return the number of lines in the given text
058:             */
059:            int computeNumberOfLines(String text);
060:
061:            /**
062:             * Returns the number of lines.
063:             *
064:             * @return the number of lines in this tracker's line structure
065:             */
066:            int getNumberOfLines();
067:
068:            /**
069:             * Returns the number of lines which are occupied by a given text range.
070:             *
071:             * @param offset the offset of the specified text range
072:             * @param length the length of the specified text range
073:             * @return the number of lines occupied by the specified range
074:             * @exception BadLocationException if specified range is unknown to this tracker
075:             */
076:            int getNumberOfLines(int offset, int length)
077:                    throws BadLocationException;
078:
079:            /**
080:             * Returns the position of the first character of the specified line.
081:             *
082:             * @param line the line of interest
083:             * @return offset of the first character of the line
084:             * @exception BadLocationException if the line is unknown to this tracker
085:             */
086:            int getLineOffset(int line) throws BadLocationException;
087:
088:            /**
089:             * Returns length of the specified line including the line's delimiter.
090:             *
091:             * @param line the line of interest
092:             * @return the length of the line
093:             * @exception BadLocationException if line is unknown to this tracker
094:             */
095:            int getLineLength(int line) throws BadLocationException;
096:
097:            /**
098:             * Returns the line number the character at the given offset belongs to.
099:             *
100:             * @param offset the offset whose line number to be determined
101:             * @return the number of the line the offset is on
102:             * @exception BadLocationException if the offset is invalid in this tracker
103:             */
104:            int getLineNumberOfOffset(int offset) throws BadLocationException;
105:
106:            /**
107:             * Returns a line description of the line at the given offset.
108:             * The description contains the start offset and the length of the line
109:             * excluding the line's delimiter.
110:             *
111:             * @param offset the offset whose line should be described
112:             * @return a region describing the line
113:             * @exception BadLocationException if offset is invalid in this tracker
114:             */
115:            IRegion getLineInformationOfOffset(int offset)
116:                    throws BadLocationException;
117:
118:            /**
119:             * Returns a line description of the given line. The description
120:             * contains the start offset and the length of the line excluding the line's
121:             * delimiter.
122:             *
123:             * @param line the line that should be described
124:             * @return a region describing the line
125:             * @exception BadLocationException if line is unknown to this tracker
126:             */
127:            IRegion getLineInformation(int line) throws BadLocationException;
128:
129:            /**
130:             * Informs the line tracker about the specified change in the tracked text.
131:             *
132:             * @param offset the offset of the replaced text
133:             * @param length the length of the replaced text
134:             * @param text the substitution text
135:             * @exception BadLocationException if specified range is unknown to this tracker
136:             */
137:            void replace(int offset, int length, String text)
138:                    throws BadLocationException;
139:
140:            /**
141:             * Sets the tracked text to the specified text.
142:             *
143:             * @param text the new tracked text
144:             */
145:            void set(String text);
146:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.