本文整理汇总了Java中org.eclipse.jface.text.quickassist.IQuickAssistProcessor类的典型用法代码示例。如果您正苦于以下问题:Java IQuickAssistProcessor类的具体用法?Java IQuickAssistProcessor怎么用?Java IQuickAssistProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IQuickAssistProcessor类属于org.eclipse.jface.text.quickassist包,在下文中一共展示了IQuickAssistProcessor类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addProposals
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
private void addProposals(final SubMenuManager quickFixMenu) {
IAnnotationModel sourceModel = sourceViewer.getAnnotationModel();
Iterator annotationIterator = sourceModel.getAnnotationIterator();
while (annotationIterator.hasNext()) {
Annotation annotation = (Annotation) annotationIterator.next();
boolean isDeleted = annotation.isMarkedDeleted();
boolean isIncluded = includes(sourceModel.getPosition(annotation),
getTextWidget().getCaretOffset());
boolean isFixable = sourceViewer.getQuickAssistAssistant().canFix(
annotation);
if (!isDeleted && isIncluded && isFixable) {
IQuickAssistProcessor processor = sourceViewer
.getQuickAssistAssistant()
.getQuickAssistProcessor();
IQuickAssistInvocationContext context = sourceViewer
.getQuickAssistInvocationContext();
ICompletionProposal[] proposals = processor
.computeQuickAssistProposals(context);
for (ICompletionProposal proposal : proposals)
quickFixMenu.add(createQuickFixAction(proposal));
}
}
}
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:25,代码来源:SpellcheckableMessageArea.java
示例2: getQuickAssistAssistant
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
// create a content assistant:
PyCorrectionAssistant assistant = new PyCorrectionAssistant();
// next create a content assistant processor to populate the completions window
IQuickAssistProcessor processor = new PythonCorrectionProcessor(this.getEdit());
// Correction assist works on all
assistant.setQuickAssistProcessor(processor);
assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
//delay and auto activate set on PyContentAssistant constructor.
return assistant;
}
开发者ID:fabioz,项目名称:Pydev,代码行数:17,代码来源:PyEditConfiguration.java
示例3: createSourceViewerConfiguration
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
@Override
public SourceViewerConfiguration createSourceViewerConfiguration() {
PyContentAssistant contentAssist = new PyContentAssistant();
IContentAssistProcessor processor = createConsoleCompletionProcessor(contentAssist);
contentAssist.setContentAssistProcessor(processor, PydevScriptConsoleSourceViewerConfiguration.PARTITION_TYPE);
contentAssist.enableAutoActivation(true);
contentAssist.enableAutoInsert(false);
contentAssist.setAutoActivationDelay(PyCodeCompletionPreferencesPage.getAutocompleteDelay());
PyCorrectionAssistant quickAssist = new PyCorrectionAssistant();
// next create a content assistant processor to populate the completions window
IQuickAssistProcessor quickAssistProcessor = createConsoleQuickAssistProcessor(quickAssist);
// Correction assist works on all
quickAssist.setQuickAssistProcessor(quickAssistProcessor);
SourceViewerConfiguration cfg = new PydevScriptConsoleSourceViewerConfiguration(createHover(), contentAssist,
quickAssist);
return cfg;
}
开发者ID:fabioz,项目名称:Pydev,代码行数:22,代码来源:PydevConsole.java
示例4: BannedElement
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
/**
* @param length the length of the marker underline. Length == 0 results in a
* marker in the vertical ruler and no underline
*/
BannedElement(String message, String markerId, int iMarkerSeverity, int iMessageSeverity,
DocumentLocation start, int length, IQuickAssistProcessor processor) {
Preconditions.checkNotNull(message, "element name is null");
Preconditions.checkNotNull(markerId, "markerId is null");
Preconditions.checkNotNull(start, "start is null");
Preconditions.checkArgument(length >= 0, "length < 0");
this.message = message;
this.start = start;
this.length = length;
this.markerId = markerId;
this.iMarkerSeverity = iMarkerSeverity;
this.iMessageSeverity = iMessageSeverity;
this.processor = processor;
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:19,代码来源:BannedElement.java
示例5: createMessage
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
/**
* Creates a message from a given {@link BannedElement}.
*/
void createMessage(IReporter reporter, BannedElement element, int elementOffset) {
IMessage message = new LocalizedMessage(element.getIMessageSeverity(), element.getMessage());
message.setTargetObject(this);
message.setMarkerId(element.getMarkerId());
message.setLineNo(element.getStart().getLineNumber());
message.setOffset(elementOffset);
message.setLength(element.getLength());
message.setAttribute(IQuickAssistProcessor.class.getName(), element.getQuickAssistProcessor());
reporter.addMessage(this, message);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:14,代码来源:XmlSourceValidator.java
示例6: addMessage
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
@Override
protected void addMessage(IMessage message, WebResourcesFinderType type) {
IReporter reporter = getReporter();
IQuickAssistProcessor processor = getQuickAssistProcessor(type);
if (reporter instanceof IncrementalReporter && processor != null) {
AnnotationInfo info = new AnnotationInfo(message,
AnnotationInfo.NO_PROBLEM_ID, processor);
((IncrementalReporter) reporter).addAnnotationInfo(getValidator(),
info);
} else {
super.addMessage(message, type);
}
}
开发者ID:angelozerr,项目名称:eclipse-wtp-webresources,代码行数:16,代码来源:UIMessageFactory.java
示例7: getQuickAssistProcessor
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
private IQuickAssistProcessor getQuickAssistProcessor(
WebResourcesFinderType type) {
switch (type) {
case LINK_HREF:
case SCRIPT_SRC:
return new WebResourceQuickFixProcessor();
default:
return null;
}
}
开发者ID:angelozerr,项目名称:eclipse-wtp-webresources,代码行数:11,代码来源:UIMessageFactory.java
示例8: getQuickAssistProcessor
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
IQuickAssistProcessor getQuickAssistProcessor() {
return processor;
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:4,代码来源:BannedElement.java
示例9: createConsoleQuickAssistProcessor
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
@Override
protected IQuickAssistProcessor createConsoleQuickAssistProcessor(QuickAssistAssistant quickAssist) {
return new PydevConsoleQuickAssistProcessor((PyCorrectionAssistant) quickAssist);
}
开发者ID:fabioz,项目名称:Pydev,代码行数:5,代码来源:PydevConsole.java
示例10: createConsoleQuickAssistProcessor
import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; //导入依赖的package包/类
/**
* @return the assistant that should handle quick assist requests (quick fixes)
*/
protected abstract IQuickAssistProcessor createConsoleQuickAssistProcessor(QuickAssistAssistant quickAssist);
开发者ID:fabioz,项目名称:Pydev,代码行数:5,代码来源:ScriptConsole.java
注:本文中的org.eclipse.jface.text.quickassist.IQuickAssistProcessor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论