Package jadx.api

Examples of jadx.api.CodePosition


  }

  CodeWriter add(CodeWriter code) {
    line--;
    for (Map.Entry<CodePosition, Object> entry : code.annotations.entrySet()) {
      CodePosition pos = entry.getKey();
      attachAnnotation(entry.getValue(), new CodePosition(line + pos.getLine(), pos.getOffset()));
    }
    for (Map.Entry<Integer, Integer> entry : code.lineMap.entrySet()) {
      attachSourceLine(line + entry.getKey(), entry.getValue());
    }
    line += code.line;
View Full Code Here


      return node;
    }
  }

  public Object attachDefinition(LineAttrNode obj) {
    return attachAnnotation(new DefinitionWrapper(obj), new CodePosition(line, offset));
  }
View Full Code Here

  public Object attachDefinition(LineAttrNode obj) {
    return attachAnnotation(new DefinitionWrapper(obj), new CodePosition(line, offset));
  }

  public Object attachAnnotation(Object obj) {
    return attachAnnotation(obj, new CodePosition(line, offset + 1));
  }
View Full Code Here

  static Position getPosition(JClass jCls, RSyntaxTextArea textArea, int offset) {
    try {
      int line = textArea.getLineOfOffset(offset);
      int lineOffset = offset - textArea.getLineStartOffset(line);
      CodePosition pos = jCls.getCls().getDefinitionPosition(line + 1, lineOffset + 1);
      if (pos != null && pos.isSet()) {
        return new Position(pos);
      }
    } catch (BadLocationException e) {
      LOG.error("Can't get line by offset", e);
    }
View Full Code Here

TOP

Related Classes of jadx.api.CodePosition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.