org.eclipse.jdt.internal.formatter.comment

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 » jdt » org.eclipse.jdt.internal.formatter.comment 
org.eclipse.jdt.internal.formatter.comment
Package-level Javadoc Provides facilities to format comments in Java source code.

Package Specification

This package provides interfaces and implementations for three kinds of comment types used in Java source code:
  • Javadoc comments
  • Multi-line comments
  • Single-line comments

Comment Formatting

Comment regions form the principle access point to the formatting of comments. To create a comment region for a specified comment type, the factory method CommentObjectFactory#createRegion(IDocument, TypedPosition, String, Map, StyledText) should be used.

The formatting process is then launch by calling CommentRegion#format(String), where the argument denotes the desired indentation. This method returns a textedit representing the changes that where made during the formatting process. The document for which the comment region was created is therefore guaranteed to remain unchanged.

Internally, the comment region is first cast into comment lines to form the basis of the following scan step: Each comment line is scanned for valid prefixes and tokenized afterwards. This tokenize step yields a stream of tokens called comment ranges that are then marked with attributes representing information about the kind of token associated with that comment range.

Once the comment ranges have enough attributed information, the comment region wraps the comment ranges at the line margin boundary. This is coordinated by a set of rules that can be contributed to a certain type of comment region. At this point of time, the comment range stream already represents the formatted comment region. The last step therefore is to record the edits and to construct the resulting text edit, which describes all the changes that were made to the comment region.
Note that the changes are not directly applied to the document. Clients are responsible for applying the textedit and updating and preserving the document structure.

All the objects used during comment formatting should not directly be instantiated, but rather retrieved from the factory CommentObjectFactory. This factory ensures that the right kind of regions and lines are returned for a specific comment type.

Java Source File NameTypeComment
CommentFormatterUtil.javaClass Comment formatting utils.
CommentLine.javaClass General comment line in a comment region.
CommentRange.javaClass Range in a comment region in comment region coordinates.
CommentRegion.javaClass Comment region in a source code document.
HTMLEntity2JavaReader.javaClass SubstitutionTextReader that will substitute plain text values for html entities encountered in the original text.
IBorderAttributes.javaInterface Comment region border attributes.
ICommentAttributes.javaInterface General comment range attributes.
IHtmlTagDelimiters.javaInterface Html tag constants.
IJavaDocTagConstants.javaInterface Javadoc tag constants.
Java2HTMLEntityReader.javaClass SubstitutionTextReader that will substitute html entities for html symbols encountered in the original text.
JavaDocLine.javaClass Javadoc comment line in a comment region.
JavaDocRegion.javaClass Javadoc region in a source code document.
MultiCommentLine.javaClass Multi-line comment line in a comment region.
MultiCommentRegion.javaClass Multi-comment region in a source code document.
SingleCommentLine.javaClass Single-line comment line in a comment region.
SubstitutionTextReader.javaClass Reads the text contents from a reader and computes for each character a potential substitution.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.