Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple definitions found issue #44

Open
atomsk81 opened this issue Nov 6, 2015 · 9 comments
Open

Multiple definitions found issue #44

atomsk81 opened this issue Nov 6, 2015 · 9 comments
Labels
Issue A defect or bug which renders one or more features unusable under certain circumstances Stale Probably not relevant anymore and to be closed

Comments

@atomsk81
Copy link

atomsk81 commented Nov 6, 2015

Hi there, thanks for the great plugin!

I have 2 maven projects, lets say A contains a set of step definitions and B contains another set of step definitions. project B has the feature files for which the glue option is configured to look project A and project B step defs. (not sure if all this is relevant). My issues is the following

When using step definitions of project A writing feature files on project B, after writting the step def and hovering with the mouse while clicking CTRL, the editor displays 2 different step defs (highlighting the step with yellow line and a warning of "Multiple definitions found for ") which are identical. However the first one is not accessible while the second one redirects me correctly to the step implementation which is located under project A. Project B steps used in the feature have no issue. This is no blocking issue in order to run my tests but it's annoying since I can't understand why the editor finds double step defs which are basically identical and throws this warning. I have tried everything , cleaning up my project , closing my project, re-installing eclipse but nothing , the issue remains.

@rlogiacco rlogiacco added the Issue A defect or bug which renders one or more features unusable under certain circumstances label Nov 6, 2015
@rlogiacco
Copy link
Owner

This is known issue and it related to the stepdef to step matching process, which is also causing slowness and unresponsiveness on big projects: the whole workspace is scanned for step to stepdef matching possibilities.

The plugin has no idea of which value you assigned as glue so any open project and it's dependencies are potential matchers.
You can work around the issue by closing the project containing the stepdefs you are not interested into.

Alternatively you can contribute a patch providing a project related configuration parameter to let the user specify a set of projects/packages to include in the scan process.

@atomsk81
Copy link
Author

atomsk81 commented Nov 6, 2015

i'm closing the project which contains the step defs but the editor is still reporting that it finds 2 identical step defs (on hover and CTRL) and underlines the sentences. None of those two are working since there is no implemenation to redirect to. My question is, why the editor insists on throwing this warning, in this case, when it should have actually said that it cannot find any definitions at all. is it some sort of glitch with eclipse? (using eclipse mars btw)

@rlogiacco
Copy link
Owner

The editor caches the last search and clears the cache upon Java build or Gherkin content update.
Can you type something into the feature file, delete it back and save?
That should activate the indexing routine

@ragavan8811
Copy link

ragavan8811 commented Feb 6, 2019

I am also getting the same issue, my editor identifies two steps and those steps are not similar. i could find the cause to resolve it
Eg:
Step1--> sending_BranchCode_returnValuation_processMulti_provider(arg1,arg2,arg3){}
Step2--> sending_BranchCode_returnValuation_returnOptions_processMulti_provider(arg1,arg2,arg3,arg4){}
any solution for the above?

@rlogiacco
Copy link
Owner

This can be one of the tests we might consider adding to the next generation: what do you think @drkstr101 ?

@drkstr101
Copy link
Contributor

drkstr101 commented May 28, 2020

Most definitely!

Currently all of the test cases are focusing on the lexer parser, but this would be a great place to start building out the ui testing infra. In theory, the issue itself should be resolvable through adjustments to the scoping provider, but having a test case in place first will help us narrow that down.

@drkstr101
Copy link
Contributor

Ref: issue144

@drkstr101
Copy link
Contributor

Flagging for review in next.

@github-actions
Copy link

This issue has not been updated for a while: marking it as stale.

@github-actions github-actions bot added the Stale Probably not relevant anymore and to be closed label Jul 30, 2020
@github-actions github-actions bot closed this as completed Aug 6, 2020
@rlogiacco rlogiacco reopened this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue A defect or bug which renders one or more features unusable under certain circumstances Stale Probably not relevant anymore and to be closed
Projects
None yet
Development

No branches or pull requests

4 participants