本文整理了Java中org.eclipse.jdt.internal.compiler.util.Util.getLineNumber()
方法的一些代码示例,展示了Util.getLineNumber()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getLineNumber()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.util.Util
类名称:Util
方法名:getLineNumber
暂无
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Search the line number corresponding to a specific position
* @param position int
* @return int
*/
@Override
public final int getLineNumber(int position) {
return Util.getLineNumber(position, this.lineEnds, 0, this.linePtr);
}
@Override
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* Search the line number corresponding to a specific position
* @param position int
* @return int
*/
public final int getLineNumber(int position) {
return Util.getLineNumber(position, this.lineEnds, 0, this.linePtr);
}
public final void setSource(char[] sourceString){
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
/**
* Search the line number corresponding to a specific position
* @param position int
* @return int
*/
public final int getLineNumber(int position) {
return Util.getLineNumber(position, this.lineEnds, 0, this.linePtr);
}
public final void setSource(char[] sourceString){
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public final int getLineNumber(int position, int[] lineRange) {
int[] lineEnds = this.scanner.lineEnds;
int length = lineEnds.length;
return Util.getLineNumber(position, lineEnds, (lineRange[0] > length ? length : lineRange[0]) -1, (lineRange[1] > length ? length : lineRange[1]) - 1);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Search the line number corresponding to a specific position
* @param position int
* @return int
*/
public final int getLineNumber(int position) {
return Util.getLineNumber(position, this.lineEnds, 0, this.linePtr);
}
public final void setSource(char[] sourceString){
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* Search the line number corresponding to a specific position
* @param position int
* @return int
*/
public final int getLineNumber(int position) {
return Util.getLineNumber(position, this.lineEnds, 0, this.linePtr);
}
public final void setSource(char[] sourceString){
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Search the line number corresponding to a specific position
* @param position int
* @return int
*/
public final int getLineNumber(int position) {
return Util.getLineNumber(position, this.lineEnds, 0, this.linePtr);
}
public final void setSource(char[] sourceString){
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* Search the line number corresponding to a specific position
* @param position int
* @return int
*/
public final int getLineNumber(int position) {
return Util.getLineNumber(position, this.lineEnds, 0, this.linePtr);
}
public final void setSource(char[] sourceString){
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public void updateContext(ASTNode astNode, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(astNode.sourceStart());
this.problem.setSourceEnd(astNode.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(astNode.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public void updateContext(ASTNode astNode, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(astNode.sourceStart());
this.problem.setSourceEnd(astNode.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(astNode.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public void updateContext(InvocationSite invocationSite, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(invocationSite.sourceStart());
this.problem.setSourceEnd(invocationSite.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(invocationSite.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public void updateContext(InvocationSite invocationSite, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(invocationSite.sourceStart());
this.problem.setSourceEnd(invocationSite.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(invocationSite.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public void updateContext(ASTNode astNode, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(astNode.sourceStart());
this.problem.setSourceEnd(astNode.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(astNode.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void updateContext(InvocationSite invocationSite, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(invocationSite.sourceStart());
this.problem.setSourceEnd(invocationSite.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(invocationSite.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void updateContext(ASTNode astNode, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(astNode.sourceStart());
this.problem.setSourceEnd(astNode.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(astNode.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public void updateContext(ASTNode astNode, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(astNode.sourceStart());
this.problem.setSourceEnd(astNode.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(astNode.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public void updateContext(InvocationSite invocationSite, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(invocationSite.sourceStart());
this.problem.setSourceEnd(invocationSite.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(invocationSite.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public void updateContext(InvocationSite invocationSite, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(invocationSite.sourceStart());
this.problem.setSourceEnd(invocationSite.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(invocationSite.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public void updateContext(InvocationSite invocationSite, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(invocationSite.sourceStart());
this.problem.setSourceEnd(invocationSite.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(invocationSite.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public void updateContext(ASTNode astNode, CompilationResult unitResult) {
if (this.problem == null) return;
if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
this.problem.setSourceStart(astNode.sourceStart());
this.problem.setSourceEnd(astNode.sourceEnd());
int[] lineEnds = unitResult.getLineSeparatorPositions();
this.problem.setSourceLineNumber(Util.getLineNumber(astNode.sourceStart(), lineEnds, 0, lineEnds.length-1));
this.compilationResult = unitResult;
}
内容来源于网络,如有侵权,请联系作者删除!