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 368 by also matching io.cucumber annotations and interfaces #369

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

timtebeek
Copy link

As discussed in #368 ; First time developing on a plugin; Not tested yet but code seems straight forward. What's the flow needed to try this out?

@timtebeek
Copy link
Author

timtebeek commented Jul 11, 2019

Just tried a local mvn clean install, but I get

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.3.0:compile (default-compile) on project cucumber.eclipse.editor: Compilation failure: Compilation failure: 
[ERROR] /home/tim/Documents/workspace/cucumber-eclipse/cucumber.eclipse.editor/src/main/java/cucumber/eclipse/editor/editors/GherkinKeywordsAssistProcessor.java:[21] 
[ERROR] 	import org.omg.PortableInterceptor.AdapterStateHelper;
[ERROR] 	       ^^^^^^^

So have not been able to test this yet. Any idea how to resolve? Do I need to update the binaries?

Nvm: Looks to be Java 11 related; I'll see what I can fix locally.

@qvdk
Copy link
Member

qvdk commented Jul 11, 2019

First time developing on a plugin

Great ! And welcome :)

Pushed some code to a branch just now in #369 ; Could you have a look if this matches what you envisioned?

It's done. 👍

Not tested yet but code seems straight forward. What's the flow needed to try this out?

Unfortunally, the plugin does not have many tests. Most of them are done manually.
For now, I used the examples from cucumber-jvm to play with the plugin.

When I try the plugin manually, I generally play with

  • the java-calculator project from cucumber-jvm
  • a project where the step definitions are stored in an external jar file
  • and finally I play with it during some days on projects at work

Since you introduce the support of the latest cucumber, the job should be done with the same samples with both cucmber v4 and v5.

So have not been able to test this yet. Any idea how to resolve? Do I need to update the binaries?

Simply build it with JDK1.8 for now.
Travis-CI built your branch successfully.

@timtebeek
Copy link
Author

Hmm; tried it just now on the calculator examples, but it appears the new step definitions are not yet picked up. I also suddenly had to configure my projects with the Cucumber nature, which is also a first for me. Any idea what might be going on? My debug options/skills for a plugin a pretty limited.

// Then set Language of Java8-cuke-api
if (decl.getElementName().matches(REGEX_JAVA8_CUKEAPI)) {
String importDeclaration = decl.getElementName();
// setJava8CukeLang(importDeclaration);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code appeared left over from before; Hope it's OK to remove.

@timtebeek
Copy link
Author

As discussed in slack, the testing issues might seem from having to match cucumber expressions in the latest calculator examples, rather than regular expressions in a previous iteration. Not confirmed yet, but something to be aware of in testing this branch.

@RusmanCool
Copy link

@timtebeek could you create a ZIP archive for a local installation? I have V 1.0.0.201907020018 that is not working.

@timtebeek
Copy link
Author

@RusmanCool Unfortunately my changes are not working for me either; so a zip won't help you much. If you know how to fix the code please do! I'm at a loss here, and don't have the time to dive in fully.

@sgrillon14
Copy link

Are there any ongoing actions to correct this problem? because this is blocking for all new version (io.cucumber.*)

@qvdk qvdk merged commit 253fee8 into master Sep 2, 2019
@qvdk
Copy link
Member

qvdk commented Sep 2, 2019

@timtebeek Thanks for your contribution !

@sgrillon14 You can use the snapshot update-site to get this fix.

@sgrillon14
Copy link

@qvdk , where is the delivery please? i see https://marketplace.eclipse.org/content/cucumber-eclipse-plugin but last delivery is :

image

@sgrillon14
Copy link

I find https://github.com/cucumber/cucumber-eclipse-update-site-snapshot and it work update.

But plugin do not work

image

@qvdk
Copy link
Member

qvdk commented Jan 24, 2020

I can not deliver to the Eclipse Marketplace, I do not have its access. @girijant could share it please?

The snapshot plugin works, but you need to setup your project from its contextual menu (right clic), Configure > Convert as cucumber project...

I added this trick in a FAQ

@sgrillon14
Copy link

sgrillon14 commented Feb 5, 2020

it's already better, the plugin finds the steps that are in the project. I still have a problem, it can't find the steps that are in a dependency (Maven) that contains generic steps.

Reproduce my problem:

  • run this Maven command: mvn archetype:generate -B -DarchetypeGroupId=com.github.noraui -DarchetypeArtifactId=noraui-archetype -DarchetypeVersion=4.0.0.0 -DgroupId=com.your.company -DartifactId=robot -Dversion=0.0.1-SNAPSHOT -DinteractiveMode=false

  • Import robot project generated in Eclipse

  • I added the cucumber nature to my project. Open the contextual menu from my project - right click - Configure > Convert as cucumber project... A cucumber icon will appears on my project.

  • run project is OK but the plugin can't find the steps that are in a dependency (Maven)

image

I try add package in Cucumber plugin configuration but do not work:

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

Successfully merging this pull request may close these issues.

4 participants