本文整理匯總了Java中org.eclipse.jface.text.contentassist.IContentAssistProcessor.getErrorMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java IContentAssistProcessor.getErrorMessage方法的具體用法?Java IContentAssistProcessor.getErrorMessage怎麽用?Java IContentAssistProcessor.getErrorMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.text.contentassist.IContentAssistProcessor
的用法示例。
在下文中一共展示了IContentAssistProcessor.getErrorMessage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: computeContextInformation
import org.eclipse.jface.text.contentassist.IContentAssistProcessor; //導入方法依賴的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 viewer
* the viewer for which to compute the context information
* @param offset
* a document offset
* @return an array of context information objects
* @see IContentAssistProcessor#computeContextInformation(ITextViewer, int)
*/
IContextInformation[] computeContextInformation(ITextViewer viewer, int offset)
{
fLastErrorMessage = null;
IContextInformation[] result = null;
IContentAssistProcessor p = getProcessor(viewer, offset);
if (p != null)
{
result = p.computeContextInformation(viewer, offset);
fLastErrorMessage = p.getErrorMessage();
}
return result;
}
示例2: getErrorMessage
import org.eclipse.jface.text.contentassist.IContentAssistProcessor; //導入方法依賴的package包/類
public String getErrorMessage() {
for (IContentAssistProcessor delegate : delegates) {
String message = delegate.getErrorMessage();
if (message != null) {
return message;
}
}
return null;
}
示例3: computeCompletionProposals
import org.eclipse.jface.text.contentassist.IContentAssistProcessor; //導入方法依賴的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;
}