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

control-click into Step Definitions from feature files #204

Closed
justinradcliffe opened this issue Jul 21, 2017 · 45 comments
Closed

control-click into Step Definitions from feature files #204

justinradcliffe opened this issue Jul 21, 2017 · 45 comments
Assignees

Comments

@justinradcliffe
Copy link

Please add feature to control-click to open the step definition declaration from the feature file. F3 seems to work but it would be a nice to have.

@ilanpillemer
Copy link
Member

Send a pull request for it and you will get it.

@girijant girijant added the ⚡ enhancement Request for new functionality label Nov 24, 2017
@jbrower2
Copy link

@jbrower2
Copy link

This is a great feature that a lot of people would like. It does the same thing as the F3 "find step" key mapping.

@zdenek-jonas
Copy link

https://www.ibm.com/developerworks/opensource/tutorials/os-ecl-commplgin2/os-ecl-commplgin2-pdf.pdf
This is tutorial, what can help. We have to implement the Hyperlink.

@girijant girijant self-assigned this Jun 25, 2018
@girijant
Copy link
Member

@JustRad, @jbrower2, @johny2000uwb ,
Thanks for the new feature request. I will look into this feature very shrotly.

Thanks,
-Girija

@pratushm
Copy link

Try installing "Natural" from eclipse marketplace.

  1. Just search for keyword "Cucumber" in the marketplace, there would be a plugin named "Natural", install it and restart the eclipse.
  2. Now from project tree open your feature file with "Cucumber Editor".
  3. Control + Click and you are good to go.

@girijant
Copy link
Member

girijant commented Aug 1, 2018

Not recommending to install other plugins for cucumber. Our plugin may not behave properly. You may loose our plugin features.

Thanks,
~Girija

@Anand093
Copy link

Hi @ilanpillemer,

How can i get control-click or command-click to open the step definition declaration from the feature file?
Any help?

Thanks,
Anand

@girijant
Copy link
Member

girijant commented Aug 29, 2018

@Anand093,
Already considered as a New feature request and looking into it.
You may jump to the step-definition-declaration by pressing F3 key after putting cursor on the step of feature file.

Thanks,
~Girija

@girijant girijant added New Feature and removed ⚡ enhancement Request for new functionality labels Sep 3, 2018
qvdk added a commit to qvdk/cucumber-eclipse that referenced this issue Nov 19, 2018
girijant added a commit that referenced this issue Nov 29, 2018
Fix #204. Go to step definition from a feature file with CTRL+click
@Savitapanwar
Copy link

Hi girijant

I have intalled plugin suggested by you here -

#232

but F3 dosent seem to be working.

Is there something i am missing?

@chandra-mummidi
Copy link

Neither F3 nor ctrl+click working for me. It used to work few weeks back, but stopped working without making any updates. I installed this plugin again through offline mode, but not luck.

@girijant
Copy link
Member

girijant commented Oct 6, 2019

@Savitapanwar and @chandra-mummidi,
ctrl+click into Step Definition file has been fixed into the latest version of Cucumber-Eclipse plugin.

@sseenivasan89
Copy link

ctrl+click is not working with Cucumber-Eclipse plugin

@qvdk
Copy link
Member

qvdk commented Nov 8, 2019

@sseenivasan89 could you describe your configuration and how to reproduce please ?
CTRL+click and F3 can be used to jump from step to its definition.

@chandra-mummidi
Copy link

Thank you. ctrl+click is working if I install only Cucumber-Eclipse plugin. But, if I install Natural plugin along with it, then ctrl+click doesn't work. So, the problem is with Natural plugin.

@ghost
Copy link

ghost commented May 9, 2020

I have installed Natural 0.7.6 plug-in from eclipse marketplace and I have Windows 10. Eclipse version: Eclipse IDE for Java Developers Version: 2020-03 (4.15.0) Build id: 20200313-1211
maven dependencies:

io.cucumber
cucumber-java
5.7.0



io.cucumber
cucumber-core
5.7.0



io.cucumber
cucumber-junit
5.7.0
test


io.cucumber
gherkin
5.1.0

CTRL+CLICK does not work for me for .feature file to land into stepDefs methods. The suggestion mentioned by @chandra-mummidi does not work for me either as once Natural plug-in removed, it complains about error : No editor descriptor for id org.agileware.natural.cucumber.Cucumber
I tried a new .feature file and a new stepDefinitions file does not work either. I wrote up this issue to stackoverflow, udemy and few other recognized web helps. Badly need a Cucumber Guru, to come out of this installation issue. I appreciate your help guys. I have high hope for this kind of techie blogs.

@chandra-mummidi
Copy link

I have installed Natural 0.7.6 plug-in from eclipse marketplace and I have Windows 10. Eclipse version: Eclipse IDE for Java Developers Version: 2020-03 (4.15.0) Build id: 20200313-1211
maven dependencies:

io.cucumber
cucumber-java
5.7.0

io.cucumber
cucumber-core
5.7.0

io.cucumber
cucumber-junit
5.7.0
test

io.cucumber
gherkin
5.1.0

CTRL+CLICK does not work for me for .feature file to land into stepDefs methods. The suggestion mentioned by @chandra-mummidi does not work for me either as once Natural plug-in removed, it complains about error : No editor descriptor for id org.agileware.natural.cucumber.Cucumber
I tried a new .feature file and a new stepDefinitions file does not work either. I wrote up this issue to stackoverflow, udemy and few other recognized web helps. Badly need a Cucumber Guru, to come out of this installation issue. I appreciate your help guys. I have high hope for this kind of techie blogs.

@SnehasishMukherjee Have you installed Cucumber-Eclipse plugin on your eclipse IDE? I'm using 2019-06 build of Eclipse, and I have installed only Cucumber-Eclipse plugin, but no other cucumber related plugins. You can try installing 2019-06 build version of Eclipse, because cucumber-eclipse plugin may not support latest versions of Eclipse at some times.

@qvdk
Copy link
Member

qvdk commented May 10, 2020

Hi

The Natural 0.7.6 plug-in is not this one.
If you want to install the ours, install Cucumber Eclipse Pluginfrom the Marketplace. Or use the eclipse update site.

@girijant could you check the Eclipse Marketplace to ensure the 2020-03 is checked as supported please ?

@ghost
Copy link

ghost commented May 11, 2020

@qvdk Thanks. As 2020-03 is not compatible with Natural 0.7.6(hopefully it will be supported in near future), I did this(as per other user who had success back in Nov last year):
Uninstall 2020-03
Install 2019-06
(had a hickup with TestNG install along with eclipse as the TestNG archive was removed. Thanks to some great testing help available in the link https://www.ishandevshukl.com/2020/02/solved-unable-to-install-testng-in.html )
Install eclipse-cucumber plug-in from market place.
After then the hyperlink showed up in .feature file to navigate in the stepDefinitions file.
Thank God.
Just one small issue left, if you guys can help.
.feature file does not show up as cucumber-icon attached. Not a blocking factor, but will be feeling great if someone can say how to fix it. You guys are too good, so having high hope to fix this issue as well.
Capture2

@girijant
Copy link
Member

@qvk,
From Eclipse Marketplace, the supported version(2020-03 and 2020-06) is already checked for our stable cucumber-plugin version. Here is the snapshot from Cucumber-Eclipse market place: https://marketplace.eclipse.org/content/cucumber-eclipse-plugin/

image

@qvdk
Copy link
Member

qvdk commented May 12, 2020

@SnehasishMukherjee Could you check if the *.feature file extension is setup with the Cucumber editor in Window > Preferences > General > Editor > File associations ?

Screenshot from 2020-05-12 09-50-31

@ghost
Copy link

ghost commented May 12, 2020

@qvdk Thanks a ton! File association with Cucumber editor worked.

@ckctan
Copy link

ckctan commented May 17, 2020

You must convert your project as a cucumber project. This is required to enable step definitions detection so that your Cucumber Feature file scenario steps can take you to corresponding step definition Java file when you clicked F3 or Ctrl + mouse click.

In Eclipse, right click on your project from the Project Explorer > Configure > Convert as Cucumber Project. Once done, you may need to do a clean build.

@ghost
Copy link

ghost commented May 17, 2020

@ckctan Yes Craig, that's necessary step. However @qvdk suggestion for file association with .feature was needed in addition. So that I have added in my notes.

@qvdk
Copy link
Member

qvdk commented May 18, 2020

The file association setup is required only if you uninstalled the natural plugin. Else, the Cucumber plugin will setup it for you.

@ramyanthn
Copy link

@qvdk @girijant
Hi, I have ensured all the requried plugins are available.
Converted the project to cucumber project.
Having the Cucumber Eclipse Feature 0.0.23.201811220126 installed.

Still unable to use the control-click feature in my project.
Please help!
Thanks,
Ramyanth

@qvdk
Copy link
Member

qvdk commented Jun 10, 2020

Hello @ramyanthn

Please uninstall the plugin and install the latest one with this instructions https://github.com/cucumber/cucumber-eclipse-update-site-snapshot

@ramyanthn
Copy link

Hello @ramyanthn

Please uninstall the plugin and install the latest one with this instructions https://github.com/cucumber/cucumber-eclipse-update-site-snapshot

Thank you @qvdk . It worked.

@SukantBhatia
Copy link

Hi,
Command + Click still not working for me in the latest version of cucumber.Can anyone please tell me the latest stable cucmber plugin for eclipse with latest cucumber maven dependicies.
I downloaded the stable version of cucmber eclipse from this site : https://github.com/cucumber/cucumber-eclipse-update-site-snapshot, but it works only with info.cucumber old dependancy but if i update to io.cucumber still faced the same issue.
Really appreciate your help.

@laeubi
Copy link
Contributor

laeubi commented Aug 24, 2020

There is no "latest stable version", you can only install a development snapshot that might (or might not depending on you configuration) fix the issue see @qvdk comment above.

@qvdk
Copy link
Member

qvdk commented Aug 24, 2020

Hi @SukantBhatia

The plugin works with both packages.
Do you convert your project as Cucumber project ?

@SukantBhatia
Copy link

Yes @qvdk I convert the project as cucumber project.Exactly I am facing two issues:

  1. If i use latest version of both cucumber eclipse plugin and latest cucumber dependency then i am not able to use command +click.
  2. If i use stable cucumber plugin with latest cucumber dependency then on feature file.. i am getting the error as “not find any matching glue”.

@srushti-maladkar
Copy link

You must convert your project as a cucumber project. This is required to enable step definitions detection so that your Cucumber Feature file scenario steps can take you to corresponding step definition Java file when you clicked F3 or Ctrl + mouse click.

In Eclipse, right click on your project from the Project Explorer > Configure > Convert as Cucumber Project. Once done, you may need to do a clean build.

This worked for me. thanks

@qvdk
Copy link
Member

qvdk commented Aug 24, 2020

@SukantBhatia The step definition scan is launched on the project build. Do you have already build the project once with eclipse ?

@SukantBhatia
Copy link

Yes @qvdk I did the same.But still no luck.
And if i use the plugin version 0.0.23.201811220126 with the info.cucumber dependency, everything works fine.

@qvdk
Copy link
Member

qvdk commented Aug 25, 2020

@SukantBhatia I think you have an issue due to the old plugin version setup on your projet.
Could you provide the .project file of your project ?

I think you have the issue #376. I describe how to clean your project setup in this comment.

@SukantBhatia
Copy link

SukantBhatia commented Aug 25, 2020

@qvdk
Now , i am facing the error as "Errors occurred during the build.
Errors running builder 'Cucumber step definitions builder' on project $'.
Dangling meta character '*' near index 0
*.feature
^" on building the project.

@ramyanthn
Copy link

Hello @ramyanthn
Please uninstall the plugin and install the latest one with this instructions https://github.com/cucumber/cucumber-eclipse-update-site-snapshot

Thank you @qvdk . It worked.

Hi @qvdk @girijant
I see the control-click on the step definition, is not working again. Screenshot attached. Please help!

image

@qvdk
Copy link
Member

qvdk commented Sep 26, 2020

Hello @ramyanthn

It is probably a configuration error. Please check :

  • if you have the latest version of the plugin, and you don't have the natural plugin installed ( choose one but the both seems to create instability )
  • check if your project is converted as Cucumber project
  • check if the build automatically is activated, or build the projet since the detection is done during the build

@tstthoughts
Copy link

Hi friends,
below steps worked for me:
*Install Cucumber Eclipse Plugin have only this plugin. restart the IDE
*In Eclipse, right click on your project from the Project Explorer > Configure > Convert as Cucumber Project. Once done, you may need to do a clean build.
*Wait for the Green icon on the feature file to appear like below... then Ctrl Click will work on the steps.
image

@ranabhavin16
Copy link

Hi @qvdk ,
I have written steps for matching features but still the glue symbol is not displayed on the features.
Environment :
Eclipse : Version: 2021-03 (4.19.0),Build id: 20210312-0638
Cucumber Snap Shot Version Taken : Snapshot branch main - 2021-07-15 07:47:36
Screenshot :
Screenshot 2021-08-05 at 11 52 13 AM

Code :
`package stepDefinitions;

import io.cucumber.java.en.And;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;

public class UberBookingSteps {

@Given("User wants to select a car type {string} from uber app")
public void user_wants_to_select_a_car_type_from_uber_app(String string) {
	// Write code here that turns the phrase above into concrete actions
	throw new io.cucumber.java.PendingException();
}

@When("User select car {string} and pick up point {string} and drop location {string}")
public void user_select_car_and_pick_up_point_and_drop_location(String string, String string2, String string3) {
	// Write code here that turns the phrase above into concrete actions
	throw new io.cucumber.java.PendingException();
}

@Then("Driver Starts the Journey")
public void driver_starts_the_journey() {
	// Write code here that turns the phrase above into concrete actions
	throw new io.cucumber.java.PendingException();
}

@And("Driver ends the Journey")
public void driver_ends_the_journey() {
	// Write code here that turns the phrase above into concrete actions
	throw new io.cucumber.java.PendingException();
}

@And("User pays {int} USD")
public void user_pays_usd(Integer int1) {
	// Write code here that turns the phrase above into concrete actions
	throw new io.cucumber.java.PendingException();
}

}
`

@ranabhavin16
Copy link

From Eclipse, go to menu Help > Install New software
Work with: https://cucumber.github.io/cucumber-eclipse-update-site-snapshot
This link is not working in eclipse

@ChinmoyJana14
Copy link

Recently I fixed that problem by changing the default editor light greener to dark greener. Before I installed the plugins and converted to cucumber project
image

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

No branches or pull requests