本文整理匯總了Java中org.eclipse.jdt.internal.core.util.RecordedParsingInformation類的典型用法代碼示例。如果您正苦於以下問題:Java RecordedParsingInformation類的具體用法?Java RecordedParsingInformation怎麽用?Java RecordedParsingInformation使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RecordedParsingInformation類屬於org.eclipse.jdt.internal.core.util包,在下文中一共展示了RecordedParsingInformation類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: Scribe
import org.eclipse.jdt.internal.core.util.RecordedParsingInformation; //導入依賴的package包/類
Scribe(CodeFormatterVisitor formatter, long sourceLevel, IRegion[] regions, CodeSnippetParsingUtil codeSnippetParsingUtil, boolean includeComments) {
initializeScanner(sourceLevel, formatter.preferences);
this.formatter = formatter;
this.pageWidth = formatter.preferences.page_width;
this.tabLength = formatter.preferences.tab_size;
this.indentationLevel= 0; // initialize properly
this.numberOfIndentations = 0;
this.useTabsOnlyForLeadingIndents = formatter.preferences.use_tabs_only_for_leading_indentations;
this.indentEmptyLines = formatter.preferences.indent_empty_lines;
this.tabChar = formatter.preferences.tab_char;
if (this.tabChar == DefaultCodeFormatterOptions.MIXED) {
this.indentationSize = formatter.preferences.indentation_size;
} else {
this.indentationSize = this.tabLength;
}
this.lineSeparator = formatter.preferences.line_separator;
this.lineSeparatorAndSpace = this.lineSeparator+' ';
this.firstLS = this.lineSeparator.charAt(0);
this.lsLength = this.lineSeparator.length();
this.indentationLevel = formatter.preferences.initial_indentation_level * this.indentationSize;
this.regions= regions;
if (codeSnippetParsingUtil != null) {
final RecordedParsingInformation information = codeSnippetParsingUtil.recordedParsingInformation;
if (information != null) {
this.lineEnds = information.lineEnds;
this.commentPositions = information.commentPositions;
}
}
if (formatter.preferences.comment_format_line_comment) this.formatComments |= CodeFormatter.K_SINGLE_LINE_COMMENT;
if (formatter.preferences.comment_format_block_comment) this.formatComments |= CodeFormatter.K_MULTI_LINE_COMMENT;
if (formatter.preferences.comment_format_javadoc_comment) this.formatComments |= CodeFormatter.K_JAVA_DOC;
if (includeComments) this.formatComments |= CodeFormatter.F_INCLUDE_COMMENTS;
reset();
}