本文整理匯總了Java中org.eclipse.jface.text.Position.overlapsWith方法的典型用法代碼示例。如果您正苦於以下問題:Java Position.overlapsWith方法的具體用法?Java Position.overlapsWith怎麽用?Java Position.overlapsWith使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.text.Position
的用法示例。
在下文中一共展示了Position.overlapsWith方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getQuickFixes
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
private List<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix> getQuickFixes(ISourceViewer sourceViewer, int offset, int length) {
List<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix> foundFixes = new ArrayList<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix>();
IAnnotationModel model = annotationModelProvider.getAnnotationModel();
if (model == null) {
return foundFixes;
}
Iterator<?> iter = model.getAnnotationIterator();
while (iter.hasNext()) {
Annotation annotation = (Annotation) iter.next();
Position position = model.getPosition(annotation);
if (offset >= 0) {
if (!position.overlapsWith(offset, length)) {
continue;
}
}
Collection<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix> quickFixes = getQuickFixes(annotation);
if (quickFixes != null) {
foundFixes.addAll(quickFixes);
}
}
return foundFixes;
}
示例2: getQuickFixes
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
private List<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix> getQuickFixes(ISourceViewer sourceViewer, int offset, int length) {
List<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix> foundFixes = new ArrayList<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix>();
IAnnotationModel model = annotationModelProvider.getAnnotationModel();
if (model == null) {
return foundFixes;
}
Iterator<?> iter = model.getAnnotationIterator();
while (iter.hasNext()) {
Annotation annotation = (Annotation) iter.next();
Position position = model.getPosition(annotation);
if (offset >= 0) {
if (!position.overlapsWith(offset, length)) {
continue;
}
}
Collection<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix> quickFixes = getQuickFixes(annotation);
if (quickFixes != null) {
foundFixes.addAll(quickFixes);
}
}
return foundFixes;
}
示例3: getQuickFixes
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
private List<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix> getQuickFixes(ISourceViewer sourceViewer, int offset, int length) {
List<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix> foundFixes = new ArrayList<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix>();
IAnnotationModel model = annotationModelProvider.getAnnotationModel();
if (model == null) {
return foundFixes;
}
Iterator<?> iter = model.getAnnotationIterator();
while (iter.hasNext()) {
Annotation annotation = (Annotation) iter.next();
Position position = model.getPosition(annotation);
if (offset >= 0) {
if (!position.overlapsWith(offset, length)) {
continue;
}
}
Collection<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix> quickFixes = getQuickFixes(annotation);
if (quickFixes != null) {
foundFixes.addAll(quickFixes);
}
}
return foundFixes;
}
示例4: getQuickFixes
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
private List<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix> getQuickFixes(ISourceViewer sourceViewer, int offset, int length) {
List<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix> foundFixes = new ArrayList<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix>();
IAnnotationModel model = annotationModelProvider.getAnnotationModel();
if (model == null) {
return foundFixes;
}
Iterator<?> iter = model.getAnnotationIterator();
while (iter.hasNext()) {
Annotation annotation = (Annotation) iter.next();
Position position = model.getPosition(annotation);
if (offset >= 0) {
if (!position.overlapsWith(offset, length)) {
continue;
}
}
Collection<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix> quickFixes = getQuickFixes(annotation);
if (quickFixes != null) {
foundFixes.addAll(quickFixes);
}
}
return foundFixes;
}
示例5: getQuickFixes
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
private List<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix> getQuickFixes(ISourceViewer sourceViewer, int offset, int length) {
List<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix> foundFixes = new ArrayList<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix>();
IAnnotationModel model = annotationModelProvider.getAnnotationModel();
if (model == null) {
return foundFixes;
}
Iterator<?> iter = model.getAnnotationIterator();
while (iter.hasNext()) {
Annotation annotation = (Annotation) iter.next();
Position position = model.getPosition(annotation);
if (offset >= 0) {
if (!position.overlapsWith(offset, length)) {
continue;
}
}
Collection<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix> quickFixes = getQuickFixes(annotation);
if (quickFixes != null) {
foundFixes.addAll(quickFixes);
}
}
return foundFixes;
}
示例6: getQuickFixes
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
private List<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix> getQuickFixes(ISourceViewer sourceViewer, int offset, int length) {
List<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix> foundFixes = new ArrayList<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix>();
IAnnotationModel model = annotationModelProvider.getAnnotationModel();
if (model == null) {
return foundFixes;
}
Iterator<?> iter = model.getAnnotationIterator();
while (iter.hasNext()) {
Annotation annotation = (Annotation) iter.next();
Position position = model.getPosition(annotation);
if (offset >= 0) {
if (!position.overlapsWith(offset, length)) {
continue;
}
}
Collection<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix> quickFixes = getQuickFixes(annotation);
if (quickFixes != null) {
foundFixes.addAll(quickFixes);
}
}
return foundFixes;
}
示例7: getQuickFixes
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
private List<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix> getQuickFixes(ISourceViewer sourceViewer, int offset, int length) {
List<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix> foundFixes = new ArrayList<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix>();
IAnnotationModel model = annotationModelProvider.getAnnotationModel();
if (model == null) {
return foundFixes;
}
Iterator<?> iter = model.getAnnotationIterator();
while (iter.hasNext()) {
Annotation annotation = (Annotation) iter.next();
Position position = model.getPosition(annotation);
if (offset >= 0) {
if (!position.overlapsWith(offset, length)) {
continue;
}
}
Collection<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix> quickFixes = getQuickFixes(annotation);
if (quickFixes != null) {
foundFixes.addAll(quickFixes);
}
}
return foundFixes;
}
示例8: getAnnotation
import org.eclipse.jface.text.Position; //導入方法依賴的package包/類
/**
* Returns the annotation overlapping with the given range or <code>null</code>.
*
* @param offset the region offset
* @param length the region length
* @return the found annotation or <code>null</code>
*/
private Annotation getAnnotation(int offset, int length) {
IAnnotationModel model = getDocumentProvider().getAnnotationModel(getEditorInput());
if (model == null) {
return null;
}
Iterator<Annotation> e = new AnnotationIterator(model, true, false);
while (e.hasNext()) {
Annotation a = e.next();
Position p = model.getPosition(a);
if (p != null && p.overlapsWith(offset, length)) {
return a;
}
}
return null;
}