• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ISubjectControlContentAssistProcessor类的典型用法和代码示例

java 1次浏览

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

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

示例1: computeContextInformation

点赞 3

import org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor; //导入依赖的package包/类
/**
 * Returns an array of context information objects computed based on the specified document position. The position
 * is used to determine the appropriate code assist processor to invoke.
 * 
 * @param contentAssistSubjectControl
 *            the code assist subject control
 * @param offset
 *            a document offset
 * @return an array of context information objects
 * @see IContentAssistProcessor#computeContextInformation(ITextViewer, int)
 * @since 3.0
 */
IContextInformation[] computeContextInformation(IContentAssistSubjectControl contentAssistSubjectControl, int offset)
{
	fLastErrorMessage = null;

	IContextInformation[] result = null;

	IContentAssistProcessor p = getProcessor(contentAssistSubjectControl, offset);
	if (p instanceof ISubjectControlContentAssistProcessor)
	{
		result = ((ISubjectControlContentAssistProcessor) p).computeContextInformation(contentAssistSubjectControl,
				offset);
		fLastErrorMessage = p.getErrorMessage();
	}

	return result;
}
 

开发者ID:apicloudcom,
项目名称:APICloud-Studio,
代码行数:29,
代码来源:ContentAssistant.java

示例2: computeCompletionProposals

点赞 2

import org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor; //导入依赖的package包/类
/**
 * Returns an array of completion proposals computed based on the specified document position. The position is used
 * to determine the appropriate code assist processor to invoke.
 * 
 * @param contentAssistSubjectControl
 *            the code assist subject control
 * @param offset
 *            a document offset
 * @return an array of completion proposals
 * @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int)
 * @since 3.0
 */
ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubjectControl,
		int offset, char activationChar)
{
	fLastErrorMessage = null;
	fUserAgentColumnCount = 0;

	ICompletionProposal[] result = null;
	IContentAssistProcessor processor = getProcessor(contentAssistSubjectControl, offset);

	if (processor != null)
	{
		if (processor instanceof ISubjectControlContentAssistProcessor)
		{
			result = ((ISubjectControlContentAssistProcessor) processor).computeCompletionProposals(
					contentAssistSubjectControl, offset);
			fLastErrorMessage = processor.getErrorMessage();
		}
		if (processor instanceof ICommonContentAssistProcessor)
		{
			String[] ids = ((ICommonContentAssistProcessor) processor).getActiveUserAgentIds();

			fUserAgentColumnCount = (ids != null) ? ids.length : 0;
		}
	}

	return result;
}
 

开发者ID:apicloudcom,
项目名称:APICloud-Studio,
代码行数:40,
代码来源:ContentAssistant.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)