本文整理汇总了Java中org.eclipse.jface.text.source.TextInvocationContext.getLength方法的典型用法代码示例。如果您正苦于以下问题:Java TextInvocationContext.getLength方法的具体用法?Java TextInvocationContext.getLength怎么用?Java TextInvocationContext.getLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.text.source.TextInvocationContext
的用法示例。
在下文中一共展示了TextInvocationContext.getLength方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeQuickAssistProposals
import org.eclipse.jface.text.source.TextInvocationContext; //导入方法依赖的package包/类
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
ISourceViewer sourceViewer = invocationContext.getSourceViewer();
int offset = -1;
int length = 0;
if (invocationContext instanceof TextInvocationContext) {
TextInvocationContext textContext = (TextInvocationContext) invocationContext;
offset = textContext.getOffset();
length = textContext.getLength();
}
List<de.darwinspl.preferences.resource.dwprofile.IDwprofileQuickFix> quickFixes = getQuickFixes(sourceViewer, offset, length);
ICompletionProposal[] proposals = new ICompletionProposal[quickFixes.size()];
for (int i = 0; i < proposals.length; i++) {
proposals[i] = createCompletionProposal(sourceViewer, quickFixes.get(i));
}
return proposals;
}
示例2: computeQuickAssistProposals
import org.eclipse.jface.text.source.TextInvocationContext; //导入方法依赖的package包/类
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
ISourceViewer sourceViewer = invocationContext.getSourceViewer();
int offset = -1;
int length = 0;
if (invocationContext instanceof TextInvocationContext) {
TextInvocationContext textContext = (TextInvocationContext) invocationContext;
offset = textContext.getOffset();
length = textContext.getLength();
}
List<eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionQuickFix> quickFixes = getQuickFixes(sourceViewer, offset, length);
ICompletionProposal[] proposals = new ICompletionProposal[quickFixes.size()];
for (int i = 0; i < proposals.length; i++) {
proposals[i] = createCompletionProposal(sourceViewer, quickFixes.get(i));
}
return proposals;
}
示例3: computeQuickAssistProposals
import org.eclipse.jface.text.source.TextInvocationContext; //导入方法依赖的package包/类
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
ISourceViewer sourceViewer = invocationContext.getSourceViewer();
int offset = -1;
int length = 0;
if (invocationContext instanceof TextInvocationContext) {
TextInvocationContext textContext = (TextInvocationContext) invocationContext;
offset = textContext.getOffset();
length = textContext.getLength();
}
List<eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaQuickFix> quickFixes = getQuickFixes(sourceViewer, offset, length);
ICompletionProposal[] proposals = new ICompletionProposal[quickFixes.size()];
for (int i = 0; i < proposals.length; i++) {
proposals[i] = createCompletionProposal(sourceViewer, quickFixes.get(i));
}
return proposals;
}
示例4: computeQuickAssistProposals
import org.eclipse.jface.text.source.TextInvocationContext; //导入方法依赖的package包/类
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
ISourceViewer sourceViewer = invocationContext.getSourceViewer();
int offset = -1;
int length = 0;
if (invocationContext instanceof TextInvocationContext) {
TextInvocationContext textContext = (TextInvocationContext) invocationContext;
offset = textContext.getOffset();
length = textContext.getLength();
}
List<eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueQuickFix> quickFixes = getQuickFixes(sourceViewer, offset, length);
ICompletionProposal[] proposals = new ICompletionProposal[quickFixes.size()];
for (int i = 0; i < proposals.length; i++) {
proposals[i] = createCompletionProposal(sourceViewer, quickFixes.get(i));
}
return proposals;
}
示例5: computeQuickAssistProposals
import org.eclipse.jface.text.source.TextInvocationContext; //导入方法依赖的package包/类
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
ISourceViewer sourceViewer = invocationContext.getSourceViewer();
int offset = -1;
int length = 0;
if (invocationContext instanceof TextInvocationContext) {
TextInvocationContext textContext = (TextInvocationContext) invocationContext;
offset = textContext.getOffset();
length = textContext.getLength();
}
List<eu.hyvar.feature.mapping.resource.hymapping.IHymappingQuickFix> quickFixes = getQuickFixes(sourceViewer, offset, length);
ICompletionProposal[] proposals = new ICompletionProposal[quickFixes.size()];
for (int i = 0; i < proposals.length; i++) {
proposals[i] = createCompletionProposal(sourceViewer, quickFixes.get(i));
}
return proposals;
}
示例6: computeQuickAssistProposals
import org.eclipse.jface.text.source.TextInvocationContext; //导入方法依赖的package包/类
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
ISourceViewer sourceViewer = invocationContext.getSourceViewer();
int offset = -1;
int length = 0;
if (invocationContext instanceof TextInvocationContext) {
TextInvocationContext textContext = (TextInvocationContext) invocationContext;
offset = textContext.getOffset();
length = textContext.getLength();
}
List<eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsQuickFix> quickFixes = getQuickFixes(sourceViewer, offset, length);
ICompletionProposal[] proposals = new ICompletionProposal[quickFixes.size()];
for (int i = 0; i < proposals.length; i++) {
proposals[i] = createCompletionProposal(sourceViewer, quickFixes.get(i));
}
return proposals;
}
示例7: computeQuickAssistProposals
import org.eclipse.jface.text.source.TextInvocationContext; //导入方法依赖的package包/类
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
ISourceViewer sourceViewer = invocationContext.getSourceViewer();
int offset = -1;
int length = 0;
if (invocationContext instanceof TextInvocationContext) {
TextInvocationContext textContext = (TextInvocationContext) invocationContext;
offset = textContext.getOffset();
length = textContext.getLength();
}
List<eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestQuickFix> quickFixes = getQuickFixes(sourceViewer, offset, length);
ICompletionProposal[] proposals = new ICompletionProposal[quickFixes.size()];
for (int i = 0; i < proposals.length; i++) {
proposals[i] = createCompletionProposal(sourceViewer, quickFixes.get(i));
}
return proposals;
}