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

Fix #204. Go to step definition from a feature file with CTRL+click #290

Merged
merged 1 commit into from
Nov 29, 2018

Conversation

qvdk
Copy link
Member

@qvdk qvdk commented Nov 19, 2018

Hello,

This PR allows to use CTRL+click on a step to jump into its definition, as F3. (#204)

peek 2018-11-19 23-26

Known limitation
As #285, only built-in cucumber expressions (with built-in parameter types, or with regular expressions) are supported. The plugin lacks ParameterType detection for now.

An other example with lambdas

peek 2018-11-20 00-20

@qvdk qvdk changed the title Fix #204. Go to step definition from a feature file with CTRL+<click step> Fix #204. Go to step definition from a feature file with <kbd>CTRL</kbd>+<kbd>click</kbd> Nov 19, 2018
@qvdk qvdk changed the title Fix #204. Go to step definition from a feature file with <kbd>CTRL</kbd>+<kbd>click</kbd> Fix #204. Go to step definition from a feature file with CTRL+click Nov 19, 2018
@laeubi
Copy link
Contributor

laeubi commented Nov 20, 2018

This is really good! 👍 Just wondering, why should it not work with RegularExpresions? AFAIK the CucumberExpresionParser used also support the old style regular Expresions?

@qvdk
Copy link
Member Author

qvdk commented Nov 20, 2018

@laeubi I misspoke. This works with regular expressions and cucumber expressions.

However for this last, only cucumber expressions with built-in parameter types works, for example Add {int} item to chart.
But I choose {color} will not.

Because of a limitation in the step parser during the step definitions detection. This one use the ExpressionFactory with the default ParameterTypeRegistry of the file local.

Snippet from cucumber.eclipse.steps.integration.Step.setText(String)

this.expression = new ExpressionFactory(new ParameterTypeRegistry(locale)).createExpression(text);

In order to support custom parameter type, the plugin should retrieve all ParameterType available in the classpath, then register them to the ParameterTypeRegistry.

Thus, #285 and #290 will support the cucumber expressions with custom parameter type.

@qvdk qvdk mentioned this pull request Nov 21, 2018
@qvdk
Copy link
Member Author

qvdk commented Nov 22, 2018

Oooops, I am just seeing that I did not push my branch on my fork...

@qvdk qvdk force-pushed the feature/hyperlink branch from a4b4204 to e1bfdb8 Compare November 22, 2018 00:23
@qvdk qvdk mentioned this pull request Nov 22, 2018
@girijant girijant merged commit 2d10b0a into master Nov 29, 2018
@girijant girijant deleted the feature/hyperlink branch November 29, 2018 10:24
@girijant
Copy link
Member

@qvdk,
Please update our Wiki for this feature details with limitations.

Thanks,
-Girija

@girijant girijant self-requested a review November 29, 2018 10:31
@qvdk
Copy link
Member Author

qvdk commented Nov 29, 2018

Wiki updated @girijant

@qvdk
Copy link
Member Author

qvdk commented Nov 29, 2018

@girijant could you update the Eclipse MarketPlace description to remove the following parenthis please ?

Click through from Step to Step Definition. (Currently only works in English, and from pop up menu)

To have just

Click through from Step to Step Definition.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants