Arnauld/jbehave-eclipse-plugin

Step Navigation Does Not Resolve Steps in Dependent Libraries

jennapederson opened this issue · 4 comments

Steps to reproduce:

  1. Open Eclipse project (Main Project) which has a dependent library which contains Java step definitions (we have a maven dependency set up for a library of common steps).
  2. Create a story file in the Main Project which refers to a step which is defined in the dependent library.
  3. Verify that the step does not have a compilation marker next to it
  4. Nice to have: verify that the step can be navigated through to the downloaded source/class file (With M2Eclipse plugin, downloading sources will provide a source file to view)

Thanks for your feedback, i'll definitively look at this as soon as possible.

FYI the corresponding code is within JavaAnalyzer.java where, for the moment, i'm only scanning IPackageFragmentRoot.K_SOURCE i.e. source folder

Currently in master branch

Complete refactoring of the Java Scanner:

  • All the classpath is now scanned: source folders and libraries
  • Classes and packages scanned can be filtered to reduce overhead: a new preference page has been added to configure the filters. Filters can be setup globally through preferences, or by project through the project properties.
  • Step cache is now fully operational and not anymore recalculated each time: rebuild is triggered on JDT change, and the cache sub-hierarchy is only recalculated if required.

4 Nice to have: verify that the step can be navigated through to the downloaded source/class file (With M2Eclipse plugin, downloading sources will provide a source file to view)

This should be automatically provided by the JDT and m2eclipse plugin for free

FYI: JavaAnalyzer has been replaced by JavaScanner + methodcache package

JBehaveProject has been greatly simplied, and cache is marked dirty only JDT change. Rebuild is triggered if dirty and cache is queried.
Notice that MethodPerPackageFragmentRootCache maintains its own information, and when rebuild is triggered, it only traverse modified elements.