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


Java Annotation.setText方法代碼示例

本文整理匯總了Java中org.eclipse.jface.text.source.Annotation.setText方法的典型用法代碼示例。如果您正苦於以下問題:Java Annotation.setText方法的具體用法?Java Annotation.setText怎麽用?Java Annotation.setText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.text.source.Annotation的用法示例。


在下文中一共展示了Annotation.setText方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addAnnotation

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
protected void addAnnotation(IDocument document, de.darwinspl.preferences.resource.dwprofile.ui.DwprofilePositionCategory type, String text, int offset, int length) {
	// for declarations and occurrences we do not need to add the position to the
	// document
	Position position = positionHelper.createPosition(offset, length);
	// instead, an annotation is created
	Annotation annotation = new Annotation(false);
	if (type == de.darwinspl.preferences.resource.dwprofile.ui.DwprofilePositionCategory.DEFINITION) {
		annotation.setText("Declaration of " + text);
		annotation.setType(DECLARATION_ANNOTATION_ID);
	} else {
		annotation.setText("Occurrence of " + text);
		annotation.setType(OCCURRENCE_ANNOTATION_ID);
	}
	getSourceViewer().getAnnotationModel().addAnnotation(annotation, position);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:DwprofileOccurrence.java

示例2: addAnnotation

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
protected void addAnnotation(IDocument document, eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionPositionCategory type, String text, int offset, int length) {
	// for declarations and occurrences we do not need to add the position to the
	// document
	Position position = positionHelper.createPosition(offset, length);
	// instead, an annotation is created
	Annotation annotation = new Annotation(false);
	if (type == eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionPositionCategory.DEFINITION) {
		annotation.setText("Declaration of " + text);
		annotation.setType(DECLARATION_ANNOTATION_ID);
	} else {
		annotation.setText("Occurrence of " + text);
		annotation.setType(OCCURRENCE_ANNOTATION_ID);
	}
	getSourceViewer().getAnnotationModel().addAnnotation(annotation, position);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HyexpressionOccurrence.java

示例3: addAnnotation

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
protected void addAnnotation(IDocument document, eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaPositionCategory type, String text, int offset, int length) {
	// for declarations and occurrences we do not need to add the position to the
	// document
	Position position = positionHelper.createPosition(offset, length);
	// instead, an annotation is created
	Annotation annotation = new Annotation(false);
	if (type == eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaPositionCategory.DEFINITION) {
		annotation.setText("Declaration of " + text);
		annotation.setType(DECLARATION_ANNOTATION_ID);
	} else {
		annotation.setText("Occurrence of " + text);
		annotation.setType(OCCURRENCE_ANNOTATION_ID);
	}
	getSourceViewer().getAnnotationModel().addAnnotation(annotation, position);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HyvalidityformulaOccurrence.java

示例4: addAnnotation

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
protected void addAnnotation(IDocument document, eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavaluePositionCategory type, String text, int offset, int length) {
	// for declarations and occurrences we do not need to add the position to the
	// document
	Position position = positionHelper.createPosition(offset, length);
	// instead, an annotation is created
	Annotation annotation = new Annotation(false);
	if (type == eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavaluePositionCategory.DEFINITION) {
		annotation.setText("Declaration of " + text);
		annotation.setType(DECLARATION_ANNOTATION_ID);
	} else {
		annotation.setText("Occurrence of " + text);
		annotation.setType(OCCURRENCE_ANNOTATION_ID);
	}
	getSourceViewer().getAnnotationModel().addAnnotation(annotation, position);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HydatavalueOccurrence.java

示例5: addAnnotation

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
protected void addAnnotation(IDocument document, eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingPositionCategory type, String text, int offset, int length) {
	// for declarations and occurrences we do not need to add the position to the
	// document
	Position position = positionHelper.createPosition(offset, length);
	// instead, an annotation is created
	Annotation annotation = new Annotation(false);
	if (type == eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingPositionCategory.DEFINITION) {
		annotation.setText("Declaration of " + text);
		annotation.setType(DECLARATION_ANNOTATION_ID);
	} else {
		annotation.setText("Occurrence of " + text);
		annotation.setType(OCCURRENCE_ANNOTATION_ID);
	}
	getSourceViewer().getAnnotationModel().addAnnotation(annotation, position);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HymappingOccurrence.java

示例6: addAnnotation

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
protected void addAnnotation(IDocument document, eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsPositionCategory type, String text, int offset, int length) {
	// for declarations and occurrences we do not need to add the position to the
	// document
	Position position = positionHelper.createPosition(offset, length);
	// instead, an annotation is created
	Annotation annotation = new Annotation(false);
	if (type == eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsPositionCategory.DEFINITION) {
		annotation.setText("Declaration of " + text);
		annotation.setType(DECLARATION_ANNOTATION_ID);
	} else {
		annotation.setText("Occurrence of " + text);
		annotation.setType(OCCURRENCE_ANNOTATION_ID);
	}
	getSourceViewer().getAnnotationModel().addAnnotation(annotation, position);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HyconstraintsOccurrence.java

示例7: addAnnotation

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
protected void addAnnotation(IDocument document, eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestPositionCategory type, String text, int offset, int length) {
	// for declarations and occurrences we do not need to add the position to the
	// document
	Position position = positionHelper.createPosition(offset, length);
	// instead, an annotation is created
	Annotation annotation = new Annotation(false);
	if (type == eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestPositionCategory.DEFINITION) {
		annotation.setText("Declaration of " + text);
		annotation.setType(DECLARATION_ANNOTATION_ID);
	} else {
		annotation.setText("Occurrence of " + text);
		annotation.setType(OCCURRENCE_ANNOTATION_ID);
	}
	getSourceViewer().getAnnotationModel().addAnnotation(annotation, position);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HymanifestOccurrence.java


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