Skip to content

JumpToCode

Sven Nissel edited this page Apr 6, 2022 · 11 revisions

What is jump to code

Jump to code is integration of OtrosLogViewer with Java IDE (currently we are supporting only IntelliJ IDEA). If log event contains stack trace user can move mouse on selected stack element and click on it. IDE will open java class at selected line (if class is accessible). If user hover mouse on stack trace element, tooltip with code fragment will show up.

This is how tooltip with code fragment looks like: screen-IdeIntegration-tooltip.png

On screenshot below is shown how IDEA Intellij performs jump to code (yellow line): screen-IdeIntegration-jump.png

#What is required to have in logs

Integration with Intellij IDEA is more advance. It requires information only about logging class or logger and log message. Based on this it will try to locate part of code responsible for logging.

Integration with Eclipse requires that log line will contain information about location in code (file and line). Logger can be configured to add this information but it is costly operation (requires throwing and catching exception for every log event).

How to install integration with IntelliJ IDEA

  1. In Intellij IDEA you have to install OtrosJumpToCode plugin from Jetbrains repository: http://plugins.jetbrains.com/plugin/7406?pr=
  2. Open logs from your application
  3. In Intellij IDEA open sources of your application
  4. When log event with stack trace is displayed, click on stack trace element

How to install integration with Eclipse

OtrosLogViewer Eclipse plugin can be installed using this update site: https://raw.githubusercontent.com/k0ner/olv-eclipse-integration/master/eu.tendera.olv.updatesite/site.xml.

  1. In Eclipse menu "Help" select "Install New Software".
  2. On "Install" dialog click "Add" button.
  3. In Name enter OLV, in Location enter https://raw.githubusercontent.com/k0ner/olv-eclipse-integration/master/eu.tendera.olv.updatesite/site.xml
  4. When list of available software is downloaded, select plugin and click Next/Finish.
Clone this wiki locally