當前位置: 首頁>>代碼示例>>Java>>正文


Java RecordedParsingInformation類代碼示例

本文整理匯總了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();
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:35,代碼來源:Scribe.java


注:本文中的org.eclipse.jdt.internal.core.util.RecordedParsingInformation類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。