Package jadx.gui.utils

Examples of jadx.gui.utils.Position


    Object obj = tree.getLastSelectedPathComponent();
    if (obj instanceof JNode) {
      JNode node = (JNode) obj;
      JClass cls = node.getRootClass();
      if (cls != null) {
        tabbedPane.showCode(new Position(cls, node.getLine()));
      }
    }
  }
View Full Code Here


    int selectedId = resultsList.getSelectedIndex();
    if (selectedId == -1) {
      return;
    }
    JNode node = (JNode) resultsModel.get(selectedId);
    tabbedPane.showCode(new Position(node.getRootClass(), node.getLine()));

    dispose();
  }
View Full Code Here

        char ch = token.getTextArray()[token.getTextOffset()];
        if (ch == '.' || ch == ',' || ch == ';') {
          return false;
        }
      }
      Position pos = getPosition(cls, this, token.getOffset());
      if (pos != null) {
        return true;
      }
    }
    return false;
View Full Code Here

    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);
    }
    return null;
View Full Code Here

    }
    return null;
  }

  Position getCurrentPosition() {
    return new Position(cls, getCaretLineNumber() + 1);
  }
View Full Code Here

        Token token = textArea.modelToToken(offset);
        if (token == null) {
          return null;
        }
        final int sourceOffset = token.getOffset();
        final Position defPos = getPosition(jCls, textArea, sourceOffset);
        if (defPos == null) {
          return null;
        }
        return new LinkGeneratorResult() {
          @Override
          public HyperlinkEvent execute() {
            return new HyperlinkEvent(defPos, HyperlinkEvent.EventType.ACTIVATED, null,
                defPos.getCls().getFullName());
          }

          @Override
          public int getSourceOffset() {
            return sourceOffset;
View Full Code Here

    @Override
    public void hyperlinkUpdate(HyperlinkEvent e) {
      Object obj = e.getSource();
      if (obj instanceof Position) {
        Position pos = (Position) obj;
        LOG.debug("Code jump to: {}", pos);
        TabbedPane tabbedPane = codePanel.getTabbedPane();
        tabbedPane.getJumpManager().addPosition(getCurrentPosition());
        tabbedPane.getJumpManager().addPosition(pos);
        tabbedPane.showCode(pos);
View Full Code Here

      }
    });
  }

  public void navBack() {
    Position pos = jumps.getPrev();
    if (pos != null) {
      showCode(pos);
    }
  }
View Full Code Here

      showCode(pos);
    }
  }

  public void navForward() {
    Position pos = jumps.getNext();
    if (pos != null) {
      showCode(pos);
    }
  }
View Full Code Here

TOP

Related Classes of jadx.gui.utils.Position

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.