Giter Club home page Giter Club logo

natural's People

Contributors

dassusovan avatar drkstr101 avatar piergiuseppe82 avatar rlogiacco avatar rodrigopavezi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

natural's Issues

matching scenario outline variables with java code definitions does not work

hi,

when using simple scenario outlines like

simple scenario feature

    ...
    When i send <command>
    Then i get a response <output>

    Examples:  
    |  command    |  output    |
    | "TEST1"     | 1          |
    | "TEST2"     | 2          |

and the steps are not defined yet then the java cucumberrunner will autogenerate it with

simple scenario java

    ...     
    @When("^i send \"([^\"]*)\"$")
    public void i_send(String arg1) throws Throwable {
    // Express the Regexp above with the code you wish you had
    throw new PendingException();
    }

    @Then("^i get a response (\\d+)$")
    public void i_get_a_response(int arg1) throws Throwable {
    // Express the Regexp above with the code you wish you had
    throw new PendingException();
    }

when i use this declarations cucumber does work with no problems - but the matching in your editor plugin allways says for example
No definition found for i send <command>

when i change the regex to

    @When("^i send (.*)$")
    public void i_send(String arg1) throws Throwable {
        // Express the Regexp above with the code you wish you had
        throw new PendingException();
    }

the matching is working in the editor

but i think thats not exact enough - so imho the matching should be adapted to work with all correct regular expressions or am i doing something completely wrong ?

i am using

  • eclipse jee Kepler Service Release 1
  • cucumber 1.1.5
  • cucumber editor 0.7.4
  • jbehave editor 0.3.0
  • xtext 2.4.3
  • cucumber eclipse feature 0.0.6

regards
joe

StepDefs not identified with Cucumber JVM 1.1

With the new release and the class refactoring the StepDefs are not linked anymore due to the package name change and the way the plugin finds the matching annotations.
This is an easy fix and this is a reminder to fix this as soon as possible.

Code formatting

Add automatic code formatting so that CTRL+SHIFT+F can create the necessary code indentation.

The trick here is not to mess up with step definitions because of the regexp matching.

Customize folding regions

By using this suggestion the folding regions should be customized to match the gherkin syntax.

The idea is to allow folding of scenarios, scenario outlines, background and steps containing tables/docstrings only.

All other elements (tags, simple steps) should not be foldable but they currently are and folding regions are not properly computed due to EOL usage in the grammar.

Bug - Ctrl + Space not working for me

Type= Error

Message=Conflicting handlers for org.eclipse.ui.edit.text.contentAssist.proposals: {org.eclipse.xtext.ui.editor.handler.ContentAssistHandler@245a9e5b} vs {ActionHandler(org.eclipse.ui.texteditor.ContentAssistAction@5baecab9)}

Exception Stack Trace=An exception stack trace is not available.

Session Data=eclipse.buildId=M20120914-1800
java.version=1.7.0_10
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Users/jason/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/jason/.eclipse_keyring -showlocation

Not sure if this is a bug in the code or if it is my environment so I just wanted to open an issue. Let me know if this is just me or something everyone else is getting.

Basically, I go to a step feature file (with an implemented definition) and I hit CTRL + Space to go to the step definition when I get this error.

Please note I am using a Mac (not a PC)

Update display in Project/Package explorer

Would it be possible to update the icons in the project and package explorers to indicate when there are warnings on a feature file? This would make it easier to see which files have issues or missing steps.

Incompatibility with latest versions of Xtext

Hello rlogiacco,

I was having issues when installing the Cucumber Natural component, and after some investigation I found out that only versions of Xtext up to 2.7.3 seem to be working correctly with the plugin. From version 2.8.0 onward, all the lines in the feature files show a "No definition found for [...]" warning message.

Thanks in advance for your help!

Cheers,

Pyves

Add quickfix support

If a step does not have a matching stepdef it should be easy to create a quickfix action that creates a new method with the right annotation in the class where the other stepdefs are defined or by prompting the user to select one.

More investigation is required to know what can be achieved, but definitely there should be some sort of support.

Multiple examples highlighted as syntax error

I believe that the following is valid gherkin syntax. However the second examples block is highlighted as a syntax error.

Feature: Test feature
Scenario Outline: Test scenario 1
Given i have <something>
When I don't need <anything>
Then complain   

  Examples: Something
    |something|anything|
    |foo      |bar     |

  Examples: Nothing
    |something|anything|
    |foo      |bar     |

Code folding seems to fold a couple too many lines

When editing my feature files with Natural's cucumber editor and I use the code folding feature by the line number to fold an entire scenario it seems like it also hides the Scenario line of the scenario below the folded one actually making it look like the steps of the following scenario belong to the one that was just folded, i.e.;

[-] Scenario: A
Given: A step

[-] Scenario: B
Given: B step

When folding A, the end result looks like:

[+] Scenario: A
Given: B step

Create Eclipse update site

The current features installation process requires the users to download the archive locally and use it as an archived local update site.
This is a long error prone process (some people download the repo archive rather than the exported artifacts) while a better, more standard approach is to use an Eclipse update site.

The idea is to use Github Pages to provide that update site and it would be nice if all the necessary dependencies could be hosted there to avoid further installation complications like adding other repositories and stuff like that.

Any volunteer?

Feature file comparison

When trying to compare a feature file with another or against local or SCM history an empty comparator view is shown. Switching between comparators does not help either.

Personalized preferences

The plugin is showing two preference pages that are not needed: compiler and refactor.

They should both be removed, unless refactoring can be implemented in a nice way.

CTRL-Click not working when using composed Regex

We've been investigating an issue with CTRL+Click not working when one of our project is loaded.

We noticed that if a project that contains steps defs as below is loaded, it will not work, and generate entry logs in eclipse when trying to CTRL+Click on a step. This should be taken as a regression since is was reported to be working on previous versions of the plugin or eclipse. Tests are valid and runs without problem.

Thanks for your help.

protected static final String REF_PATTERN = "(\\s*\\w+\\s*(?:,\\s*\\w+\\s*)*)";
@When("^I request events " + REF_PATTERN + " by ID$")
public void whenGetEventsById(List<String> refs) {
   ...
}

The error that is generated in eclipse using Natural 0.7.6

eclipse.buildId=4.6.2.M20161124-1400
java.version=1.8.0_121
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_CA
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.ui
Error
Tue Mar 07 11:12:20 EST 2017
Unhandled event loop exception

java.lang.NullPointerException

!ENTRY org.eclipse.ui 4 0 2017-03-07 11:11:29.218
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at java.util.regex.Pattern.<init>(Pattern.java:1350)
	at java.util.regex.Pattern.compile(Pattern.java:1028)
	at java.util.regex.Pattern.matches(Pattern.java:1133)
	at java.lang.String.matches(String.java:2121)
	at org.agileware.natural.common.JavaAnnotationMatcher.findMatches(JavaAnnotationMatcher.java:71)
	at org.agileware.natural.cucumber.ui.CucumberHyperlinkHelper.findLinkTargets(CucumberHyperlinkHelper.java:54)
	at org.agileware.natural.cucumber.ui.CucumberHyperlinkHelper.createHyperlinksByOffset(CucumberHyperlinkHelper.java:47)
	at org.eclipse.xtext.ui.editor.hyperlinking.DefaultHyperlinkDetector$1.exec(DefaultHyperlinkDetector.java:48)
	at org.eclipse.xtext.ui.editor.hyperlinking.DefaultHyperlinkDetector$1.exec(DefaultHyperlinkDetector.java:1)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:98)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:520)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:133)
	at org.eclipse.xtext.ui.editor.hyperlinking.DefaultHyperlinkDetector.detectHyperlinks(DefaultHyperlinkDetector.java:39)
	at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:287)
	at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:259)
	at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:455)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4561)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4151)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

Support Task Tags (i.e.: TODO or FIXME)

Many plugin's editors allow configuration (as well as with generic Eclipse editor preferences) to configure which Content Types and files should be included in Tasks discovery for listing in the Tasks view. It would be nice this this plugin supported it as well so comments like:

TODO: Need to add a scenario here for XYZ.

Would show up alongside other tasks in the IDE.

Ctrl+Shift+F does not work correctly

When applying the auto-formatter, this plugin does not correctly format Gherkin feature files.

Before:
image

After:
image

Note the incorrect indentation, mix of tabs and spaces, and appended spaces.

Is there a way to customize the formatter or does this require a fix in the plugin iteself?

Natural plugin is not working in Eclipse Juno service release 2

Hi All,

One issue am seeing is Natural plugin is not working when i use Eclipse Juno Service release 2. And its working only with Eclipse Juno Service release 1.

Major versions (Indigo,Helios etc) not supported is understandable (if eclipse fw itself changes the way a plug-in interacts). Will Service releases usually change the underlying interfaces? Any idea about this restrictions and how to overcome it?

Thanks in Advance.

License missing

Hi,

I am very interested in pushing this plugin a little and combine it with eclipse.org/ease. Therefore we would require clear licenses as part of the bundles and best also of the source files. From the marketplace I can see that these plugins are available under EPL. However I cannot find refereces to EPL on the github page or within the source files.

Revalidate features after Java change

When a Java build occurs the plugin must re execute the EValidator to check if change has fixed or broken any matching between steps and stepdefs.

Right now to verify this you have to open the feature file and force a re validation by modifying and saving it, which is impractical.

The current easiest way to check the entire feature sets is to issue a clean build, which should be documented.

Autocomplete on tags

It would be nice, when you type the @ char to define a tag, if existing tags can be suggested for autocompletion, so to avoid hard to identify typos.

Auto-complete

I can not use the Auto-Complete in midsentence ...

example:
                      Giv + Ctrl + Space
I click + Ctrl + Space

Empty item within pipes causes an error

If you have a feature file like this:

Given a user runs a search for "wine"
Then the results are:
|Barolo |
| |
|Chianti|

In this case I expect the second line in the results to be empty, but the tool complains saying:

Multiple markers at this line

  • required (...)+ loop did not match anything at input '|'
  • required (...)+ loop did not match anything at input '\r\n'

The feature file can be executed correctly but the parsing error remains

Update to Gherkin 3

In the following example, I get java hyperlinks for the second line in the scenario outline, but not for the first. It seems to be caused by using '*' and not one of the keywords 'And', 'Given', etc.

Feature: Checkout

    Scenario Outline: Checkout a banana
        * the price of a "banana" is 40c
        And the price of a "pear" is 60 c
        When I checkout <count> "banana"
        And I checkout 1 "banana"
        And I checkout 2 "pear"
        Then the total price should be <total>c

        Examples:
        | count | total |
        | 1     | 200   |
        | 2     | 240   |
        | 3     | 280   |

missing-java-link

Keyword highlighting

The keyword highlighting doesn't work when there is an empty line after an initial comment line (defining the language used). See below

Sk rmklipp

But when I remove the empty row the highlighting is back in business!

Sk rmklipp2

Tagged Scenario Outline breaks indentation of subsequent Scenarios and Scenario Outlines

Scenario: A feature file with a tagged Scenario Outline breaks indentation
Given a feature file with a tagged Scenario Outline
When I hit Ctrl-Shift-F to format the feature file 
Then subsequent Scenarios and Scenario Outlines aren't indented correctly.
  • Without tag
Feature: feature description 
    In order to do something
    As someone
    I want something else to happen

Background: 
    Given the user is logged in 
    And goes to landing page 

Scenario: scenario description 
    Given something 
    When an action is performed 
    Then something should be asserted 

Scenario Outline: scenario description 
    Given something with <param_1> 
    And something with <param_2> 
    Then check <param_3> is the output 
        """
        """

    Examples: 
        | param_1 | param_2 | param_3 |
        | value1_1 | value1_2 | value1_3 |
        | value2_1 | value2_2 | value2_3 |
        | value3_1 | value3_2 | value3_3 |

Scenario Outline: scenario description 
    Given something with <param_1> 
    And something with <param_2> 
    Then check <param_3> is the output 
        """
        """

    Examples: 
        | param_1 | param_2 | param_3 |
        | value1_1 | value1_2 | value1_3 |
        | value2_1 | value2_2 | value2_3 |
        | value3_1 | value3_2 | value3_3 |

Scenario: scenario description 
    Given something 
    When an action is performed 
    Then something should be asserted 
  • With tag
Feature: feature description 
    In order to do something
    As someone
    I want something else to happen

Background: 
    Given the user is logged in 
    And goes to landing page 

Scenario: scenario description 
    Given something 
    When an action is performed 
    Then something should be asserted 

@wip 
Scenario Outline: scenario description 
    Given something with <param_1> 
    And something with <param_2> 
    Then check <param_3> is the output 
        """
        """

    Examples: 
        | param_1 | param_2 | param_3 |
        | value1_1 | value1_2 | value1_3 |
        | value2_1 | value2_2 | value2_3 |
        | value3_1 | value3_2 | value3_3 |

    Scenario Outline: scenario description 
        Given something with <param_1> 
        And something with <param_2> 
        Then check <param_3> is the output 
            """
        """

        Examples: 
            | param_1 | param_2 | param_3 |
            | value1_1 | value1_2 | value1_3 |
            | value2_1 | value2_2 | value2_3 |
            | value3_1 | value3_2 | value3_3 |

        Scenario: scenario description 
            Given something 
            When an action is performed 
            Then something should be asserted 

Content assitance is getting auto sorted

Hi All,

We have customized the content assist of natural plugin to display our own content as content assist for our project. This works good currently. But this contents were getting auto sorted to ascending order while displaying it in the feature file. We want to display the content assist in the order which we have in the proposal list object in JavaAnnotationMatcher.findProposals() method.

Any way can we stop this auto sorting and display the content assist in the order as we have in the proposal object.

Thanks in Advance.

Reformat should (conditionally) align DataTables

Feature: Autoformat of DataTables 
    In order to improve readability of Features
    As a Feature author
    I want the Natural plugin to automatically align column delimiters in DataTables
Scenario: Formatting a feature file with one or more DataTables 
    should align the pipe symbols.
    # This should work similarly to the ruby cucumber --autoformat argument;
    # notwithstanding the feature is being removed from there.
    Given a feature file 
        '''
        Feature: feature description
            In order to do something
            As someone
            I want something else to happen

        Scenario: scenario description
            Given something
                |Lorem|ipsum|dolor|sit|amet|
                |consectetur|adipiscing|elit|
            When an action is performed
                |sed|do|eiusmod|tempor|incididunt|ut|labore|et|dolore|magna|aliqua|
                |Ut|enim|ad|minim|veniam|
            Then something should be asserted
                |quis|nostrud|exercitation|ullamco|laboris|nisi|ut|aliquip|ex|ea|commodo|consequat|
                |Duis|aute|irure|dolor|in|reprehenderit|in|voluptate|velit|esse|cillum|dolore|eu|fugiat|nulla|pariatur|

        Scenario Outline: scenario description
            Given something with <param_1>
            And something with <param_2>
            Then check <param_3> is the output
            Examples:
                |Excepteur|sint|occaecat|cupidatat|non|proident|
                |sunt|in|culpa|qui|officia|deserunt|
        '''
    When I invoke the format function on the file 
    Then the feature file should look like this 
        '''
        Feature: feature description
            In order to do something
            As someone
            I want something else to happen

        Scenario: scenario description
            Given something
                | Lorem       | ipsum      | dolor | sit | amet |
                | consectetur | adipiscing | elit  |
            When an action is performed
                | sed | do   | eiusmod | tempor | incididunt | ut | labore | et | dolore | magna | aliqua |
                | Ut  | enim | ad      | minim  | veniam     |
            Then something should be asserted
                | quis | nostrud | exercitation | ullamco | laboris | nisi          | ut | aliquip   | ex    | ea   | commodo | consequat |
                | Duis | aute    | irure        | dolor   | in      | reprehenderit | in | voluptate | velit | esse | cillum  | dolore    | eu | fugiat | nulla | pariatur |

        Scenario Outline: scenario description
            Given something with <param_1>
            And something with <param_2>
            Then check <param_3> is the output
            Examples:
                | Excepteur | sint | occaecat | cupidatat | non     | proident |
                | sunt      | in   | culpa    | qui       | officia | deserunt |
        '''

Reg: Documentation for Natural plugin tool

Hi,

I am using the Natural - eclipse plugin as its a preferred tool by most of the developers. Natural tool is providing most of the features we require for our cucumber editor tool. Even though we require some customization for the content assistance feature. And trying to build upon the existing natural source code.

I see the comments in the classes like
/**

But these links were not working actually. It would be great if somebody helps me to understand on how to customize or sharing any documentation on the code flow.

Thanks in advance.

Deployment guidelines of customized natural plugin code

Hi All,

We are using the Natural plugin for cucumber editor as most of the requirements were available in this tool and it works well also. Now we are in need of customizing the natural plugin code.

I have customized the Natural plugin code to load the content assistance from config file instead. Am facing issues while creating as plugin again so that the customized natural plugin can be used by other team members.

Any guidelines/help on how to deploy the after customizing the natural plugin code.

Thanks.

Projects building

Could you pleease explain more how to build the projects using Eclipse ?

Compare broken with Git

I am using the cucumber editor with eclipse. When I try to compare my feature files with older versions in git I get a blank compare screen with the following error

Error
Wed Oct 09 12:58:33 CDT 2013
Guice configuration errors:

  1. No implementation for org.eclipse.compare.IViewerCreator was bound.
    while locating org.eclipse.compare.IViewerCreator
    for field at org.eclipse.xtext.ui.compare.InjectableViewerCreator.viewerCreator(Unknown Source)
    while locating org.eclipse.xtext.ui.compare.InjectableViewerCreator

1 error ExtensionFactory: org.agileware.natural.cucumber.ui.CucumberExecutableExtensionFactory

com.google.inject.ConfigurationException: Guice configuration errors:

  1. No implementation for org.eclipse.compare.IViewerCreator was bound.
    while locating org.eclipse.compare.IViewerCreator
    for field at org.eclipse.xtext.ui.compare.InjectableViewerCreator.viewerCreator(Unknown Source)
    while locating org.eclipse.xtext.ui.compare.InjectableViewerCreator

1 error
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:50)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:262)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.compare.internal.ViewerDescriptor.createViewer(ViewerDescriptor.java:46)
at org.eclipse.compare.internal.CompareUIPlugin.getViewer(CompareUIPlugin.java:969)
at org.eclipse.compare.internal.CompareUIPlugin.findContentViewer(CompareUIPlugin.java:964)
at org.eclipse.compare.CompareUI.findContentViewer(CompareUI.java:330)
at org.eclipse.compare.CompareEditorInput.findContentViewer(CompareEditorInput.java:954)
at org.eclipse.team.ui.synchronize.SaveableCompareEditorInput.findContentViewer(SaveableCompareEditorInput.java:435)
at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.getViewer(CompareContentViewerSwitchingPane.java:92)
at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:266)
at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.setInput(CompareContentViewerSwitchingPane.java:158)
at org.eclipse.compare.CompareEditorInput.internalSetContentPaneInput(CompareEditorInput.java:845)
at org.eclipse.compare.CompareEditorInput.access$8(CompareEditorInput.java:843)
at org.eclipse.compare.CompareEditorInput$11.run(CompareEditorInput.java:779)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.CompareEditorInput.feed1(CompareEditorInput.java:773)
at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:751)
at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:555)
at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:462)
at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:422)
at org.eclipse.compare.internal.CompareEditor$3.run(CompareEditor.java:378)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)
at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

My configuration is as follows
Spring Tool Suite

Version: 3.4.0.RELEASE
Build Id: 201310051816

Thanks
Shaival

Ctrl+space doesn't work

I installed the plugin successfully and opened an existing feature file with the editor. I can popup templates, but the step definition finder feature doesn't work. attached is a screen shot of the error in the eclipse log.

I'm using eclipse Juno 64 bit on a win 7 64 bit running java 1.6.0_31 64 bit.

Help appreciated

cucumber_natural_error2
cucumber_natural_error1

Not recognizing step definition in Scenario Outline

While natural seems to do a great job with the step definition in the flows (seen above in pic), in the scenario outline, it doesn't seem to find the regex. Is it confused by the placeholders not being digits?

screenshot 2014-12-05 10 46 06

Groovy step definitions

I am using cucumber in eclipse mars/gradle/groovy setup. The groovy step definitions run perfectly fine on command line, however I could not get the plugin to work. Defined steps do not appear on auto complete list and I still see feature steps as "not defined" on editor.

Could you please let me know if this is requires additional development or is an issue on my setup?

Enable reverse-lookup

It would be handy to be able to do the following:

When you have a step definition java class, click on the Cucumber condition (@then, @when etc) and get a list of feature files where that condition is used. The output could be similar to the search dialog in Eclipse.

Problem linking steps to step definition methods

I am having a problem linking step definition methods to steps in my project. My environment is Eclipse Neon.3 on Windows 10 with the Natural 0.7.6 plugin installed. The code is as follows:

Feature file ProofOfConcept.feature:

Feature: ProofOfConcept 
	As a BDD enthusiast
	I want to demonstrate working Cucumber (Gherkin) scenarios
	So that we can incorporate BDD into our projects
Scenario: Simple Test One
	Given I Am Logged In To The App 
	When I click My Account 
	Then I see the My Account screen

The compiler is flagging the steps with 'no definition found' warnings.

Step definition file ProofOfConceptSteps.java:

package cucumber.stepDefinitions;
import org.agileware.natural.*;
public class ProofOfConceptSteps {
	@Given("I Am Logged In To The App")
	public void GivenIAmLoggedInToTheApp() {
		// TODO
	}
}

The compiler is flagging the "@given" line with the error "Given cannot be resolved to a type".

In the project, org.agileware.natural.*jar are added as Referenced Libraries. This project also uses Gradle to build but I have no idea what if anything to put into the build.gradle file to make this work. I tried adding the following line in the file's dependencies section but it doesn't help:
compile 'org.agileware.natural:0.7.6'

I've been unable to find sample code on the web to show the proper way to do this, and at this point I am stuck.

Thanks for any help!

Tom

Multiple definitions found issue

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.

Keyword "And" is wrongly identified within the scenario body

If the keyword "And" is the first word of one of the feature scenario an error is reported
Repro steps:
Create a feature file like the one below:

Feature: Consumer Report UI and validation - Address Match Report

As a LoggedIn Revolution user with active credentials for CallCredit
I want to be able to search for consumer names

=>And retrieve financial information if I have a correct surname and address

Expected Results:
No errors are displayed

Actual Results:
The message "required (...)+ loop did not match anything at input 'And'" is displayed
And retrieve financial information if I have a correct surname and address

Support russian language

Hi!
Cucumber supports 40 languages, but plugin understands only english.
Could you, please, add support for russian language?
Thanks in advance!

Cucumber editor can't handle large projects

I've installed the plugin on a brand new eclipse install with xtext 2.3.1
When I load my project, which has ~4,700 classes (not even any cucumber binidngs, just regular java project) eclipse will eat 100% of cpu. Even building the projects takes several minutes.
After uninstalling xtext and cucumber editor things got back to normal.

"Go to Definition" stopped working in Cucumber Editor

I've been using your Cucumber editor for a while with great success. Thank you for providing it. I'm using 0.7.4 in Juno.

Recently, we reorganized the project by moving a local module into a Nexus repository. Since then, the "Go to Definition" feature has stopped working (Gherkin -> Java). Some of the step definitions were moved into the repository - I can understand if the tool can't see those. But some of the step definitions remain in the same project with the Gherkin. Those don't work either.

  1. Can you tell me how the editor knows where to look for step definitions in the Java?

  2. Is there something special I need to do to let it see step definitions in external dependencies?

Thank you for your help and thank you for a very helpful tool.

Rob Conaway

Step identification rules in Natural not the same as in Cucumber

I had a step as follows:

And a label saying "Address:" is not displayed.

note the double space between is and not.

My step definition had

And a label saying "Address:" is not displayed.

no double space.

Natural connected the two and said the step was defined, but when I ran the test case cucumber gave a PendingException saying that the step did not exist.

Possibly Natural's rules are slightly looser than Cucumber's?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.