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


Java TextInvocationContext.getLength方法代码示例

本文整理汇总了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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:DwprofileQuickAssistProcessor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:HyexpressionQuickAssistProcessor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:HyvalidityformulaQuickAssistProcessor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:HydatavalueQuickAssistProcessor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:HymappingQuickAssistProcessor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:HyconstraintsQuickAssistProcessor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:17,代码来源:HymanifestQuickAssistProcessor.java


注:本文中的org.eclipse.jface.text.source.TextInvocationContext.getLength方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。