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


Java Annotation.isMarkedDeleted方法代碼示例

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


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

示例1: addProposals

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private void addProposals(final SubMenuManager quickFixMenu) {
	IAnnotationModel sourceModel = sourceViewer.getAnnotationModel();
	Iterator annotationIterator = sourceModel.getAnnotationIterator();
	while (annotationIterator.hasNext()) {
		Annotation annotation = (Annotation) annotationIterator.next();
		boolean isDeleted = annotation.isMarkedDeleted();
		boolean isIncluded = includes(sourceModel.getPosition(annotation),
				getTextWidget().getCaretOffset());
		boolean isFixable = sourceViewer.getQuickAssistAssistant().canFix(
				annotation);
		if (!isDeleted && isIncluded && isFixable) {
			IQuickAssistProcessor processor = sourceViewer
			.getQuickAssistAssistant()
			.getQuickAssistProcessor();
			IQuickAssistInvocationContext context = sourceViewer
			.getQuickAssistInvocationContext();
			ICompletionProposal[] proposals = processor
			.computeQuickAssistProposals(context);

			for (ICompletionProposal proposal : proposals)
				quickFixMenu.add(createQuickFixAction(proposal));
		}
	}
}
 
開發者ID:cchabanois,項目名稱:mesfavoris,代碼行數:25,代碼來源:SpellcheckableMessageArea.java

示例2: skip

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private void skip() {
	while (fIterator.hasNext()) {
		Annotation next = fIterator.next();
		if (next instanceof IAnnotation) {
			if (fSkipIrrelevants) {
				if (!next.isMarkedDeleted()) {
					fNext = next;
					return;
				}
			} else {
				fNext = next;
				return;
			}
		} else if (fReturnAllAnnotations) {
			fNext = next;
			return;
		}
	}
	fNext = null;
}
 
開發者ID:grosenberg,項目名稱:fluentmark,代碼行數:21,代碼來源:AnnotationIterator.java

示例3: skip

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private void skip() {
	while (fIterator.hasNext()) {
		Annotation next = (Annotation) fIterator.next();
		if (isTypeScriptAnnotation(next) || next instanceof IQuickFixableAnnotation) {
			if (fSkipIrrelevants) {
				if (!next.isMarkedDeleted()) {
					fNext = next;
					return;
				}
			} else {
				fNext = next;
				return;
			}
		} else if (fReturnAllAnnotations) {
			fNext = next;
			return;
		}
	}
	fNext = null;
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:21,代碼來源:TypeScriptAnnotationIterator.java

示例4: canFix

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
public boolean canFix(Annotation annotation) {
	if (annotation.isMarkedDeleted())
		return false;

	// non-persisted annotation
	if (annotation instanceof XtextAnnotation) {
		XtextAnnotation a = (XtextAnnotation) annotation;
		return getResolutionProvider().hasResolutionFor(a.getIssueCode());
	}

	// persisted markerAnnotation
	if (annotation instanceof MarkerAnnotation) {
		MarkerAnnotation markerAnnotation = (MarkerAnnotation) annotation;
		if (!markerAnnotation.isQuickFixableStateSet())
			markerAnnotation.setQuickFixable(getResolutionProvider().hasResolutionFor(
					issueUtil.getCode(markerAnnotation)));
		return markerAnnotation.isQuickFixable();
	}

	if (annotation instanceof SpellingAnnotation) {
		return true;
	}

	return false;
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:26,代碼來源:XtextQuickAssistProcessor.java

示例5: getQuickFixes

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Collection<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix> getQuickFixes(Annotation annotation) {
	
	Collection<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix> foundQuickFixes = new ArrayList<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix>();
	if (annotation.isMarkedDeleted()) {
		return foundQuickFixes;
	}
	
	if (annotation instanceof de.darwinspl.preferences.resource.dwprofile.ui.DwprofileMarkerAnnotation) {
		de.darwinspl.preferences.resource.dwprofile.ui.DwprofileMarkerAnnotation markerAnnotation = (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileMarkerAnnotation) annotation;
		IMarker marker = markerAnnotation.getMarker();
		foundQuickFixes.addAll(new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileMarkerResolutionGenerator().getQuickFixes(resourceProvider.getResource(), marker));
	}
	return foundQuickFixes;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:15,代碼來源:DwprofileQuickAssistProcessor.java

示例6: getQuickFixes

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Collection<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix> getQuickFixes(Annotation annotation) {
	
	Collection<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix> foundQuickFixes = new ArrayList<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix>();
	if (annotation.isMarkedDeleted()) {
		return foundQuickFixes;
	}
	
	if (annotation instanceof eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionMarkerAnnotation) {
		eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionMarkerAnnotation markerAnnotation = (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionMarkerAnnotation) annotation;
		IMarker marker = markerAnnotation.getMarker();
		foundQuickFixes.addAll(new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionMarkerResolutionGenerator().getQuickFixes(resourceProvider.getResource(), marker));
	}
	return foundQuickFixes;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:15,代碼來源:HyexpressionQuickAssistProcessor.java

示例7: getQuickFixes

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Collection<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix> getQuickFixes(Annotation annotation) {
	
	Collection<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix> foundQuickFixes = new ArrayList<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix>();
	if (annotation.isMarkedDeleted()) {
		return foundQuickFixes;
	}
	
	if (annotation instanceof eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaMarkerAnnotation) {
		eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaMarkerAnnotation markerAnnotation = (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaMarkerAnnotation) annotation;
		IMarker marker = markerAnnotation.getMarker();
		foundQuickFixes.addAll(new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaMarkerResolutionGenerator().getQuickFixes(resourceProvider.getResource(), marker));
	}
	return foundQuickFixes;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:15,代碼來源:HyvalidityformulaQuickAssistProcessor.java

示例8: getQuickFixes

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Collection<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix> getQuickFixes(Annotation annotation) {
	
	Collection<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix> foundQuickFixes = new ArrayList<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix>();
	if (annotation.isMarkedDeleted()) {
		return foundQuickFixes;
	}
	
	if (annotation instanceof eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueMarkerAnnotation) {
		eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueMarkerAnnotation markerAnnotation = (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueMarkerAnnotation) annotation;
		IMarker marker = markerAnnotation.getMarker();
		foundQuickFixes.addAll(new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueMarkerResolutionGenerator().getQuickFixes(resourceProvider.getResource(), marker));
	}
	return foundQuickFixes;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:15,代碼來源:HydatavalueQuickAssistProcessor.java

示例9: getQuickFixes

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Collection<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix> getQuickFixes(Annotation annotation) {
	
	Collection<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix> foundQuickFixes = new ArrayList<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix>();
	if (annotation.isMarkedDeleted()) {
		return foundQuickFixes;
	}
	
	if (annotation instanceof eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingMarkerAnnotation) {
		eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingMarkerAnnotation markerAnnotation = (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingMarkerAnnotation) annotation;
		IMarker marker = markerAnnotation.getMarker();
		foundQuickFixes.addAll(new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingMarkerResolutionGenerator().getQuickFixes(resourceProvider.getResource(), marker));
	}
	return foundQuickFixes;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:15,代碼來源:HymappingQuickAssistProcessor.java

示例10: getQuickFixes

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Collection<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix> getQuickFixes(Annotation annotation) {
	
	Collection<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix> foundQuickFixes = new ArrayList<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix>();
	if (annotation.isMarkedDeleted()) {
		return foundQuickFixes;
	}
	
	if (annotation instanceof eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsMarkerAnnotation) {
		eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsMarkerAnnotation markerAnnotation = (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsMarkerAnnotation) annotation;
		IMarker marker = markerAnnotation.getMarker();
		foundQuickFixes.addAll(new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsMarkerResolutionGenerator().getQuickFixes(resourceProvider.getResource(), marker));
	}
	return foundQuickFixes;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:15,代碼來源:HyconstraintsQuickAssistProcessor.java

示例11: getQuickFixes

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Collection<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix> getQuickFixes(Annotation annotation) {
	
	Collection<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix> foundQuickFixes = new ArrayList<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix>();
	if (annotation.isMarkedDeleted()) {
		return foundQuickFixes;
	}
	
	if (annotation instanceof eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestMarkerAnnotation) {
		eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestMarkerAnnotation markerAnnotation = (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestMarkerAnnotation) annotation;
		IMarker marker = markerAnnotation.getMarker();
		foundQuickFixes.addAll(new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestMarkerResolutionGenerator().getQuickFixes(resourceProvider.getResource(), marker));
	}
	return foundQuickFixes;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:15,代碼來源:HymanifestQuickAssistProcessor.java

示例12: createAnnotationAccess

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
@Override
protected IAnnotationAccess createAnnotationAccess() {
	return new DefaultMarkerAnnotationAccess() {
		@Override
		public int getLayer(Annotation annotation) {
			if (annotation.isMarkedDeleted()) {
				return IAnnotationAccessExtension.DEFAULT_LAYER;
			}
			return super.getLayer(annotation);
		}
	};
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:13,代碼來源:XtextEditor.java

示例13: getImages

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
private Map<String, Image> getImages(Annotation annotation) {
	if(annotation.isMarkedDeleted())
		return XtextPluginImages.getAnnotationImagesDeleted();
	else {
		if (annotation instanceof MarkerAnnotation) {
			MarkerAnnotation ma = (MarkerAnnotation) annotation;
			if(ma.isQuickFixableStateSet() && ma.isQuickFixable())
				return XtextPluginImages.getAnnotationImagesFixable();
		}
		return XtextPluginImages.getAnnotationImagesNonfixable();
	}
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:13,代碼來源:XtextMarkerAnnotationImageProvider.java

示例14: getSeverity

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
protected Severity getSeverity(XtextEditor xtextEditor) {
	if (xtextEditor == null || xtextEditor.getInternalSourceViewer() == null)
		return null;
	IAnnotationModel model = xtextEditor.getInternalSourceViewer().getAnnotationModel();
	if (model != null) {
		Iterator<Annotation> iterator = model.getAnnotationIterator();
		boolean hasWarnings = false;
		boolean hasInfos = false;
		while (iterator.hasNext()) {
			Annotation annotation = iterator.next();
			if (!annotation.isMarkedDeleted()) {
				Issue issue = issueUtil.getIssueFromAnnotation(annotation);
				if (issue != null) {
					if (issue.getSeverity() == Severity.ERROR) {
						return Severity.ERROR;
					} else if (issue.getSeverity() == Severity.WARNING) {
						hasWarnings = true;
					} else if (issue.getSeverity() == Severity.INFO) {
						hasInfos = true;
					}
				}
			}
		}
		if (hasWarnings)
			return Severity.WARNING;
		if (hasInfos)
			return Severity.INFO;
	}
	return null;
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:32,代碼來源:XtextEditorErrorTickUpdater.java

示例15: isHandled

import org.eclipse.jface.text.source.Annotation; //導入方法依賴的package包/類
/**
 * @since 2.1
 */
protected boolean isHandled(Annotation annotation) {
	return null != annotation
			&& !annotation.isMarkedDeleted()
			&& (markerAnnotationAccess.isSubtype(annotation.getType(), "org.eclipse.ui.workbench.texteditor.error") 
					|| markerAnnotationAccess.isSubtype(annotation.getType(), "org.eclipse.ui.workbench.texteditor.warning")
					|| markerAnnotationAccess.isSubtype(annotation.getType(), "org.eclipse.ui.workbench.texteditor.info")
					|| markerAnnotationAccess.isSubtype(annotation.getType(), "org.eclipse.ui.workbench.texteditor.bookmark")
					|| markerAnnotationAccess.isSubtype(annotation.getType(), "org.eclipse.ui.workbench.texteditor.spelling"));
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:13,代碼來源:AbstractProblemHover.java


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