• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AnnotationModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.jface.text.source.AnnotationModel的典型用法代码示例。如果您正苦于以下问题:Java AnnotationModel类的具体用法?Java AnnotationModel怎么用?Java AnnotationModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AnnotationModel类属于org.eclipse.jface.text.source包,在下文中一共展示了AnnotationModel类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createConfiguration

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
private static SourceViewerConfiguration createConfiguration(Input<?> input, IDocument document,
    EditingContext editingContext, AppMemento appMemento) {
  ThreadSynchronize threadSynchronize = null;
  MplPresentationReconciler reconciler = new MplPresentationReconciler();
  ProposalComputer proposalComputer = new MplProposalComputer(document, editingContext);
  IAnnotationModel annotationModel = new AnnotationModel();
  AnnotationPresenter annotationPresenter = new MplAnnotationPresenter();
  HoverInformationProvider hoverInformationProvider = new MplHoverInformationProvider();
  CompletionProposalPresenter proposalPresenter = MplGraphicalCompletionProposal::new;
  SearchProvider searchProvider = null;
  NavigationProvider navigationProvider = null;
  EditorOpener editorOpener = null;
  BehaviorContributor behaviorContributor = null;
  IContextInformationValidator contextInformationValidator = null;
  DefaultSourceViewerConfiguration result = new DefaultSourceViewerConfiguration(
      threadSynchronize, input, reconciler, appMemento, proposalComputer, annotationModel,
      annotationPresenter, hoverInformationProvider, proposalPresenter, searchProvider,
      navigationProvider, editorOpener, behaviorContributor, contextInformationValidator);
  result.getFeatures().add(Feature.SHOW_LINE_NUMBERS);
  return result;
}
 
开发者ID:Adrodoc55,项目名称:MPL,代码行数:22,代码来源:MplEditor.java


示例2: setModel

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
protected void setModel(XtextDocument document, String prefix, String editablePart, String suffix) {
	if (this.insertLineBreaks) {
		String delimiter = document.getDefaultLineDelimiter();
		prefix = prefix + delimiter;
		suffix = delimiter + suffix;
	}
	String model = prefix + editablePart + suffix;
	document.set(model);
	XtextResource resource = createResource(model);
	document.setInput(resource);
	AnnotationModel annotationModel = new AnnotationModel();
	if (document instanceof ISynchronizable) {
		Object lock = ((ISynchronizable) document).getLockObject();
		if (lock == null) {
			lock = new Object();
			((ISynchronizable) document).setLockObject(lock);
		}
		((ISynchronizable) annotationModel).setLockObject(lock);
	}
	this.viewer.setDocument(document, annotationModel, prefix.length(), editablePart.length());
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:EmbeddedEditorModelAccess.java


示例3: connect

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
@Override
public void connect(Object element) throws CoreException {
	super.connect(element);
	if (getFileInfo(element) != null)
		return;

	CompilationUnitInfo info= fFakeCUMapForMissingInfo.get(element);
	if (info == null) {
		ICompilationUnit cu= createFakeCompiltationUnit(element, true);
		if (cu == null)
			return;
		info= new CompilationUnitInfo();
		info.fCopy= cu;
		info.fElement= element;
		info.fModel= new AnnotationModel();
		fFakeCUMapForMissingInfo.put(element, info);
	}
	info.fCount++;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:CompilationUnitDocumentProvider.java


示例4: createAnnotationModel

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
@Override
protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
	if (element instanceof IFileEditorInput) {
		IFileEditorInput input = (IFileEditorInput) element;
		return new XtextResourceMarkerAnnotationModel(input.getFile(), issueResolutionProvider, issueUtil);
	} else if (element instanceof IURIEditorInput) {
		return new AnnotationModel();
	}
	return super.createAnnotationModel(element);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:11,代码来源:XtextDocumentProvider.java


示例5: loadTransliteration

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
private void loadTransliteration(BTSLemmaEntry lemma) {
//		if (lemma == null)
//		{
//			if (embeddedEditor != null)
//			{
//				embeddedEditorModelAccess.updateModel("\r",
//						"", "\r");
////				embeddedEditor.getViewer().setDocument(null);
//			}
//			return;
//		}
		modelAnnotationMap = new HashMap<String, BTSModelAnnotation>();
		relatingObjectsAnnotationMap = new HashMap<EObject, List<BTSModelAnnotation>>();
		Document doc = new Document();
		AnnotationModel tempAnnotationModel = new AnnotationModel();
		lemmaAnnotationMap = new HashMap<String, List<Object>>();
		lemmaEditorController.transformToDocument(textContent, doc, tempAnnotationModel, relatingObjects, relatingObjectsMap, lemmaAnnotationMap);

		String textString = doc.get();
		// take care of empty input
		if (textString.length() == 0)
		{
			textString = "§§";
		}
		embeddedEditorModelAccess.updateModel("\r",
				textString, "\r");
		annotationModel = embeddedEditor.getViewer().getAnnotationModel();

		loadAnnotations2Editor(annotationModel, tempAnnotationModel);

		processLemmaAnnotions(lemmaAnnotationMap);
	}
 
开发者ID:cplutte,项目名称:bts,代码行数:33,代码来源:EgyLemmaEditorPart.java


示例6: createXtextSourceViewer

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
protected void createXtextSourceViewer() {
	sourceviewer = new XtextSourceViewerEx(styledText, preferenceStoreAccess.getPreferenceStore());
	sourceviewer.configure(configuration);
	sourceviewer.setDocument(document, new AnnotationModel());
	SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(sourceviewer, null,
			new DefaultMarkerAnnotationAccess(), getSharedColors());
	configureSourceViewerDecorationSupport(support);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:9,代码来源:StyledTextXtextAdapter.java


示例7: createAnnotationModel

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
public IAnnotationModel createAnnotationModel(IPath path)
{
	IResource file = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
	if (file instanceof IFile)
	{
		return new CommonAnnotationModel(file);
	}
	return new AnnotationModel();
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:10,代码来源:CommonAnnotationModelFactory.java


示例8: NSISConsole

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
public NSISConsole()
{
    super(EclipseNSISPlugin.getResourceString("console.name"), TYPE, EclipseNSISPlugin.getImageManager().getImageDescriptor(EclipseNSISPlugin.getResourceString("nsis.icon")), true); //$NON-NLS-1$ //$NON-NLS-2$
    getDocument().addDocumentListener(this);
    mOffset = getDocument().getLength();
    mPreferenceStore = EclipseNSISPlugin.getDefault().getPreferenceStore();
    mConsoleManager = ConsolePlugin.getDefault().getConsoleManager();
    mAutoShowLevel = NSISPreferences.getInstance().getAutoShowConsole();
    mPartitioner = new NSISConsolePartitioner(this);
    mPartitioner.connect(getDocument());
    mPreferenceStore.addPropertyChangeListener(this);
    mErrorImage = EclipseNSISPlugin.getImageManager().getImage(EclipseNSISPlugin.getResourceString("error.icon")); //$NON-NLS-1$
    mWarningImage = EclipseNSISPlugin.getImageManager().getImage(EclipseNSISPlugin.getResourceString("warning.icon")); //$NON-NLS-1$
    mAnnotationModel = new AnnotationModel();
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:16,代码来源:NSISConsole.java


示例9: createCompositeRuler

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
/**
 * Creates a new line number ruler column that is appropriately initialized.
 * 
 * @return the created line number column
 */
private CompositeRuler createCompositeRuler( )
{
	CompositeRuler ruler = new CompositeRuler( );

	ruler.setModel( new AnnotationModel( ) );
	return ruler;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:13,代码来源:ScriptEditor.java


示例10: SourceViewerConfig

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
public SourceViewerConfig(AnnotationModel annotationModel,
		Document document) {
	strategy = new CommentSpellingReconcileStrategy(annotationModel);
	strategy.setDocument(document);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:6,代码来源:CommitCommentArea.java


示例11: CommentSpellingReconcileStrategy

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
public CommentSpellingReconcileStrategy(AnnotationModel annotationModel) {
  this.fAnnotationModel = annotationModel;
  fSpellingContext = new SpellingContext();
  fSpellingContext.setContentType(Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT));
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:6,代码来源:CommitCommentArea.java


示例12: createAnnotationModel

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
protected AnnotationModel createAnnotationModel() {
	return new AnnotationModel();
}
 
开发者ID:cplutte,项目名称:bts,代码行数:4,代码来源:AbstractSourceView.java


示例13: createPartControl

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
public void createPartControl(Composite parent)
{
	int VERTICAL_RULER_WIDTH = 12;

	int styles = SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
	ISharedTextColors sharedColors = EditorsPlugin.getDefault().getSharedTextColors();
	IOverviewRuler overviewRuler = new OverviewRuler(null, VERTICAL_RULER_WIDTH, sharedColors);
	CompositeRuler ruler = new CompositeRuler(VERTICAL_RULER_WIDTH);

	_document = new Document();
	_document.set(_docString);

	_annotationModel = new AnnotationModel();
	_annotationModel.connect(_document);

	_sourceViewer = new SourceViewer(parent, ruler, overviewRuler, true, styles);
	_sourceViewer.configure(new SourceViewerConfiguration());

	_sds = new SourceViewerDecorationSupport(_sourceViewer, overviewRuler, null, sharedColors);

	AnnotationPreference ap = new AnnotationPreference();
	ap.setColorPreferenceKey(ANNO_KEY_COLOR);
	ap.setHighlightPreferenceKey(ANNO_KEY_HIGHLIGHT);
	ap.setVerticalRulerPreferenceKey(ANNO_KEY_VERTICAL);
	ap.setOverviewRulerPreferenceKey(ANNO_KEY_OVERVIEW);
	ap.setTextPreferenceKey(ANNO_KEY_TEXT);
	ap.setAnnotationType(ANNO_TYPE);
	_sds.setAnnotationPreference(ap);

	//		_sds.install(EditorsPlugin.getDefault().getPreferenceStore());

	_sourceViewer.setDocument(_document, _annotationModel);

	_sourceViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	ruler.addDecorator(0, new LineNumberRulerColumn());

	Annotation annotation = new Annotation(false);
	annotation.setType(ANNO_TYPE);
	Position position = new Position(0, 4);
	_annotationModel.addAnnotation(annotation, position);
	parent.layout();
}
 
开发者ID:cplutte,项目名称:bts,代码行数:44,代码来源:WrappedSourceViewer.java


示例14: createXtextSourceViewer

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
protected XtextSourceViewer createXtextSourceViewer() {
	final XtextSourceViewer result = new XtextSourceViewerEx(getStyledText(), getPreferenceStoreAccess().getPreferenceStore());
	result.configure(getXtextSourceViewerConfiguration());
	result.setDocument(getXtextDocument(), new AnnotationModel());
	return result;
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:7,代码来源:StyledTextXtextAdapter.java


示例15: createAnnotationModel

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
public IAnnotationModel createAnnotationModel(IPath path) {
	IResource file= ResourcesPlugin.getWorkspace().getRoot().findMember(path);
	if (file instanceof IFile)
		return new CompilationUnitAnnotationModel(file);
	return new AnnotationModel();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:CompilationUnitDocumentProvider.java


示例16: getAnnotationModel

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
public AnnotationModel getAnnotationModel()
{
    return mAnnotationModel;
}
 
开发者ID:henrikor2,项目名称:eclipsensis,代码行数:5,代码来源:NSISConsole.java


示例17: createAnnotationModel

import org.eclipse.jface.text.source.AnnotationModel; //导入依赖的package包/类
@Override
protected IAnnotationModel createAnnotationModel(Object element) throws CoreException
{
	return new AnnotationModel();
}
 
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:6,代码来源:ScriptDocumentProvider.java



注:本文中的org.eclipse.jface.text.source.AnnotationModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DemoService类代码示例发布时间:2022-05-21
下一篇:
Java EntityType类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap