@Override
  public void valueChanged(ListSelectionEvent e) {
    boolean hasFocus = otrosApplication.getApplicationJFrame().isFocused();
    final boolean enabled = otrosApplication.getConfiguration().getBoolean(ConfKeys.JUMP_TO_CODE_AUTO_JUMP_ENABLED, false);
    if (hasFocus && enabled && !e.getValueIsAdjusting()) {
      try {
        final LogData logData = dataTableModel.getLogData(table.convertRowIndexToModel(e.getFirstIndex()));
        Optional<Integer> line = Optional.empty();
        if (StringUtils.isNotBlank(logData.getLine()) && StringUtils.isAlphanumeric(logData.getLine())) {
          line = Optional.of(Integer.valueOf(logData.getLine()));
        }
        final LocationInfo li = new LocationInfo(
          Optional.ofNullable(logData.getClazz()).orElseGet(logData::getLoggerName),
          logData.getMethod(), logData.getFile(),
          line,
          Optional.ofNullable(logData.getMessage()));
        final JumpToCodeService jumpToCodeService = otrosApplication.getServices().getJumpToCodeService();
        final boolean ideAvailable = jumpToCodeService.isIdeAvailable();
        if (ideAvailable) {
          scheduledJump.map(input -> {
            input.cancel(false);
            return Boolean.TRUE;
          });
          ListeningScheduledExecutorService scheduledExecutorService = otrosApplication.getServices().getTaskSchedulerService().getListeningScheduledExecutorService();
          delayMs = 300;
          ListenableScheduledFuture<?> jump = scheduledExecutorService.schedule(
            new JumpRunnable(li, jumpToCodeService), delayMs, TimeUnit.MILLISECONDS
          );

          scheduledJump = Optional.of(jump);
        }
      } catch (Exception e1) {
        LOGGER.warn("Can't perform jump to code: " + e1.getMessage(), e1);
        e1.printStackTrace();
      }

    }
  }
Constructor

@param otrosApplication OtrosApplication
@param dataTableModel   data model
@param table            table
@param delayMs          delay in ms to perform jump. If another selection was made before delay, previous jump will be cancelled
olv-core/src/main/java/pl/otros/logview/gui/util/JumpToCodeSelectionListener.java