未验证 提交 2ebb9204 编写于 作者: P Phodal HUANG

fix: fix char position issue

上级 a7ccd7f3
......@@ -59,9 +59,9 @@ func (s *JavaCallListener) EnterInterfaceDeclaration(ctx *InterfaceDeclarationCo
func (s *JavaCallListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMethodDeclarationContext) {
startLine := ctx.GetStart().GetLine()
startLinePosition := ctx.GetStart().GetTokenSource().GetCharPositionInLine()
startLinePosition := ctx.GetStart().GetColumn()
stopLine := ctx.GetStop().GetLine()
stopLinePosition := ctx.GetStop().GetTokenSource().GetCharPositionInLine()
stopLinePosition := ctx.GetStop().GetColumn()
name := ctx.IDENTIFIER().GetText()
//XXX: find the start position of {, not public
method := &JMethod{name, startLine, startLinePosition, stopLine, stopLinePosition}
......@@ -87,9 +87,9 @@ func (s *JavaCallListener) EnterLocalVariableDeclaration(ctx *LocalVariableDecla
func (s *JavaCallListener) EnterMethodDeclaration(ctx *MethodDeclarationContext) {
startLine := ctx.GetStart().GetLine()
startLinePosition := ctx.GetStart().GetTokenSource().GetCharPositionInLine()
startLinePosition := ctx.GetStart().GetColumn()
stopLine := ctx.GetStop().GetLine()
stopLinePosition := ctx.GetStop().GetTokenSource().GetCharPositionInLine()
stopLinePosition := ctx.GetStop().GetColumn()
name := ctx.IDENTIFIER().GetText()
//XXX: find the start position of {, not public
method := &JMethod{name, startLine, startLinePosition, stopLine, stopLinePosition}
......@@ -101,9 +101,9 @@ func (s *JavaCallListener) EnterMethodCall(ctx *MethodCallContext) {
callee := ctx.GetChild(0).(antlr.ParseTree).GetText()
startLine := ctx.GetStart().GetLine()
startLinePosition := ctx.GetStart().GetTokenSource().GetCharPositionInLine()
startLinePosition := ctx.GetStart().GetColumn()
stopLine := ctx.GetStop().GetLine()
stopLinePosition := ctx.GetStop().GetTokenSource().GetCharPositionInLine()
stopLinePosition := ctx.GetStop().GetColumn()
fullType := warpTargetFullType(targetType);
if fullType != "" {
......
......@@ -22,9 +22,9 @@ func (s *JavaIdentifierListener) EnterClassDeclaration(ctx *ClassDeclarationCont
func (s *JavaIdentifierListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMethodDeclarationContext) {
startLine := ctx.GetStart().GetLine()
startLinePosition := ctx.GetStart().GetTokenSource().GetCharPositionInLine()
startLinePosition := ctx.GetStart().GetColumn()
stopLine := ctx.GetStop().GetLine()
stopLinePosition := ctx.GetStop().GetTokenSource().GetCharPositionInLine()
stopLinePosition := ctx.GetStop().GetColumn()
name := ctx.IDENTIFIER().GetText()
//XXX: find the start position of {, not public
method := &JMethod{name, startLine, startLinePosition, stopLine, stopLinePosition}
......@@ -33,9 +33,9 @@ func (s *JavaIdentifierListener) EnterInterfaceMethodDeclaration(ctx *InterfaceM
func (s *JavaIdentifierListener) EnterMethodDeclaration(ctx *MethodDeclarationContext) {
startLine := ctx.GetStart().GetLine()
startLinePosition := ctx.GetStart().GetTokenSource().GetCharPositionInLine()
startLinePosition := ctx.GetStart().GetColumn()
stopLine := ctx.GetStop().GetLine()
stopLinePosition := ctx.GetStop().GetTokenSource().GetCharPositionInLine()
stopLinePosition := ctx.GetStop().GetColumn()
name := ctx.IDENTIFIER().GetText()
//XXX: find the start position of {, not public
method := &JMethod{name, startLine, startLinePosition, stopLine, stopLinePosition}
......
......@@ -63,9 +63,9 @@ func (s *JavaRefactorListener) EnterCatchType(ctx *CatchTypeContext) {
func (s *JavaRefactorListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMethodDeclarationContext) {
//fmt.Println(ctx.TypeTypeOrVoid())
startLine := ctx.GetStart().GetLine()
startLinePosition := ctx.GetStart().GetTokenSource().GetCharPositionInLine()
startLinePosition := ctx.GetStart().GetColumn()
stopLine := ctx.GetStop().GetLine()
stopLinePosition := ctx.GetStop().GetTokenSource().GetCharPositionInLine()
stopLinePosition := ctx.GetStop().GetColumn()
name := ctx.IDENTIFIER().GetText()
//XXX: find the start position of {, not public
method := &JFullMethod{name, startLine, startLinePosition, stopLine, stopLinePosition}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册