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


Java IProblemRequestorExtension.setIsActive方法代码示例

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


在下文中一共展示了IProblemRequestorExtension.setIsActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: 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.setIsActive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。