Source Code Cross Referenced for IDocumentInformationMapping.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 <code>IDocumentInformationMapping</code>  represents a mapping between the coordinates of two
014:         * <code>IDocument</code> objects: the original and the image. The document information mapping
015:         * can translate document information such as line numbers or character ranges given for the original into
016:         * the corresponding information of the image and vice versa.
017:         *
018:         * In order to provided backward compatibility for clients of <code>IDocumentInformationMapping</code>, extension
019:         * interfaces are used to provide a means of evolution. The following extension interfaces
020:         * exist:
021:         * <ul>
022:         * <li> {@link org.eclipse.jface.text.IDocumentInformationMappingExtension} since version 3.0 extending the
023:         *      degree of detail of the mapping information.</li>
024:         * <li> {@link org.eclipse.jface.text.IDocumentInformationMappingExtension2} since version 3.1, adding lenient
025:         *      image region computation.</li>
026:         * </ul>
027:         *
028:         * @since 2.1
029:         */
030:        public interface IDocumentInformationMapping {
031:
032:            /**
033:             * Returns the minimal region of the original document that completely comprises all of the image document
034:             * or <code>null</code> if there is no such region.
035:             *
036:             * @return the minimal region of the original document comprising the image document or <code>null</code>
037:             */
038:            IRegion getCoverage();
039:
040:            /**
041:             * Returns the offset in the original document that corresponds to the given offset in the image document
042:             * or <code>-1</code> if there is no such offset
043:             *
044:             * @param imageOffset the offset in the image document
045:             * @return the corresponding offset in the original document or <code>-1</code>
046:             * @throws BadLocationException if <code>imageOffset</code> is not a valid offset in the image document
047:             */
048:            int toOriginOffset(int imageOffset) throws BadLocationException;
049:
050:            /**
051:             * Returns the minimal region of the original document that completely comprises the given region of the
052:             * image document or <code>null</code> if there is no such region.
053:             *
054:             * @param imageRegion the region of the image document
055:             * @return the minimal region of the original document comprising the given region of the image document or <code>null</code>
056:             * @throws BadLocationException if <code>imageRegion</code> is not a valid region of the image document
057:             */
058:            IRegion toOriginRegion(IRegion imageRegion)
059:                    throws BadLocationException;
060:
061:            /**
062:             * Returns the range of lines of the original document that corresponds to the given line of the image document or
063:             * <code>null</code> if there are no such lines.
064:             *
065:             * @param imageLine the line of the image document
066:             * @return the corresponding lines of the original document or <code>null</code>
067:             * @throws BadLocationException if <code>imageLine</code> is not a valid line number in the image document
068:             */
069:            IRegion toOriginLines(int imageLine) throws BadLocationException;
070:
071:            /**
072:             * Returns the line of the original document that corresponds to the given line of the image document or
073:             * <code>-1</code> if there is no such line.
074:             *
075:             * @param imageLine the line of the image document
076:             * @return the corresponding line of the original document or <code>-1</code>
077:             * @throws BadLocationException if <code>imageLine</code> is not a valid line number in the image document
078:             */
079:            int toOriginLine(int imageLine) throws BadLocationException;
080:
081:            /**
082:             * Returns the offset in the image document that corresponds to the given offset in the original document
083:             * or <code>-1</code> if there is no such offset
084:             *
085:             * @param originOffset the offset in the original document
086:             * @return the corresponding offset in the image document or <code>-1</code>
087:             * @throws BadLocationException if <code>originOffset</code> is not a valid offset in the original document
088:             */
089:            int toImageOffset(int originOffset) throws BadLocationException;
090:
091:            /**
092:             * Returns the minimal region of the image document that completely comprises the given region of the
093:             * original document or <code>null</code> if there is no such region.
094:             *
095:             * @param originRegion the region of the original document
096:             * @return the minimal region of the image document comprising the given region of the original document or <code>null</code>
097:             * @throws BadLocationException if <code>originRegion</code> is not a valid region of the original document
098:             */
099:            IRegion toImageRegion(IRegion originRegion)
100:                    throws BadLocationException;
101:
102:            /**
103:             * Returns the line of the image document that corresponds to the given line of the original document or
104:             * <code>-1</code> if there is no such line.
105:             *
106:             * @param originLine the line of the original document
107:             * @return the corresponding line of the image document or <code>-1</code>
108:             * @throws BadLocationException if <code>originLine</code> is not a valid line number in the original document
109:             */
110:            int toImageLine(int originLine) throws BadLocationException;
111:
112:            /**
113:             * Returns the line of the image document whose corresponding line in the original document
114:             * is closest to the given line in the original document.
115:             *
116:             * @param originLine the line in the original document
117:             * @return the line in the image document that corresponds best to the given line in the original document
118:             * @throws BadLocationException if <code>originLine</code>is not a valid line in the original document
119:             */
120:            int toClosestImageLine(int originLine) throws BadLocationException;
121:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.