当前位置: 首页>>代码示例>>Java>>正文


Java IProblemRequestorExtension类代码示例

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


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

示例1: reconcile

import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension; //导入依赖的package包/类
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
	try {
		IProblemRequestorExtension e= getProblemRequestorExtension();
		if (e != null) {
			try {
				e.beginReportingSequence();
				super.reconcile(dirtyRegion, subRegion);
			} finally {
				e.endReportingSequence();
			}
		} else {
			super.reconcile(dirtyRegion, subRegion);
		}
	} finally {
		reconciled();
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:JavaCompositeReconcilingStrategy.java

示例2: initialReconcile

import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension; //导入依赖的package包/类
@Override
public void initialReconcile() {
	try {
		IProblemRequestorExtension e= getProblemRequestorExtension();
		if (e != null) {
			try {
				e.beginReportingSequence();
				super.initialReconcile();
			} finally {
				e.endReportingSequence();
			}
		} else {
			super.initialReconcile();
		}
	} finally {
		reconciled();
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:JavaCompositeReconcilingStrategy.java

示例3: enableHandlingTemporaryProblems

import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension; //导入依赖的package包/类
/**
 * Switches the state of problem acceptance according to the value in the preference store.
 */
protected void enableHandlingTemporaryProblems() {
	boolean enable= isHandlingTemporaryProblems();
	for (Iterator<FileInfo> iter= getFileInfosIterator(); iter.hasNext();) {
		FileInfo info= iter.next();
		if (info.fModel instanceof IProblemRequestorExtension) {
			IProblemRequestorExtension  extension= (IProblemRequestorExtension) info.fModel;
			extension.setIsHandlingTemporaryProblems(enable);
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:14,代码来源:CompilationUnitDocumentProvider.java

示例4: getProblemRequestorExtension

import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension; //导入依赖的package包/类
/**
 * Returns the problem requestor for the editor's input element.
 *
 * @return the problem requestor for the editor's input element
 */
private IProblemRequestorExtension getProblemRequestorExtension() {
	IDocumentProvider p= fEditor.getDocumentProvider();
	if (p == null) {
		// work around for https://bugs.eclipse.org/bugs/show_bug.cgi?id=51522
		p= JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
	}
	IAnnotationModel m= p.getAnnotationModel(fEditor.getEditorInput());
	if (m instanceof IProblemRequestorExtension)
		return (IProblemRequestorExtension) m;
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:JavaCompositeReconcilingStrategy.java

示例5: enableHandlingTemporaryProblems

import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension; //导入依赖的package包/类
/**
 * Switches the state of problem acceptance according to the value in the preference store.
 */
protected void enableHandlingTemporaryProblems() {
    boolean enable = isHandlingTemporaryProblems();
    for (Iterator<?> iter = getFileInfosIterator(); iter.hasNext();) {
        FileInfo info = (FileInfo) iter.next();
        if (info.fModel instanceof IProblemRequestorExtension) {
            IProblemRequestorExtension extension = (IProblemRequestorExtension) info.fModel;
            extension.setIsHandlingTemporaryProblems(enable);
        }
    }
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:14,代码来源:ApexDocumentProvider.java

示例6: createFileInfo

import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension; //导入依赖的package包/类
@Override
protected FileInfo createFileInfo(Object element) throws CoreException {
    FileInfo info = super.createFileInfo(element);

    IAnnotationModel requestor = info.fModel;
    if (requestor instanceof IProblemRequestorExtension) {
        IProblemRequestorExtension extension = (IProblemRequestorExtension) requestor;
        extension.setIsActive(false);
        extension.setIsHandlingTemporaryProblems(isHandlingTemporaryProblems());
    }

    return info;
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:14,代码来源:ApexDocumentProvider.java

示例7: createFileInfo

import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension; //导入依赖的package包/类
@Override
protected FileInfo createFileInfo(Object element) throws CoreException {
	ICompilationUnit original= null;
	if (element instanceof IFileEditorInput) {
		IFileEditorInput input= (IFileEditorInput) element;
		original= createCompilationUnit(input.getFile());
		if (original == null)
			return null;
	}

	FileInfo info= super.createFileInfo(element);
	if (!(info instanceof CompilationUnitInfo))
		return null;

	if (original == null)
		original= createFakeCompiltationUnit(element, false);
	if (original == null)
		return null;

	CompilationUnitInfo cuInfo= (CompilationUnitInfo) info;
	setUpSynchronization(cuInfo);

	IProblemRequestor requestor= cuInfo.fModel instanceof IProblemRequestor ? (IProblemRequestor) cuInfo.fModel : null;
	if (requestor instanceof IProblemRequestorExtension) {
		IProblemRequestorExtension extension= (IProblemRequestorExtension) requestor;
		extension.setIsActive(false);
		extension.setIsHandlingTemporaryProblems(isHandlingTemporaryProblems());
	}

	IResource resource= original.getResource();
	if (JavaModelUtil.isPrimary(original) && (resource == null || resource.exists()))
		original.becomeWorkingCopy(requestor, getProgressMonitor());
	cuInfo.fCopy= original;

	if (cuInfo.fModel instanceof CompilationUnitAnnotationModel)   {
		CompilationUnitAnnotationModel model= (CompilationUnitAnnotationModel) cuInfo.fModel;
		model.setCompilationUnit(cuInfo.fCopy);
	}

	if (cuInfo.fModel != null)
		cuInfo.fModel.addAnnotationModelListener(fGlobalAnnotationModelListener);

	return cuInfo;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:45,代码来源:CompilationUnitDocumentProvider.java


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