Giter VIP home page Giter VIP logo

Comments (2)

jrbye avatar jrbye commented on June 12, 2024 1

I see. Since the outline parameter is surrounded by <> would you be able to do the coloring of all of the parameters based on the placeholder (column name in the Examples table) before substituting the value in there? The column names shouldn't contain any special characters and they should be discernible based on the <>. Then your match you are using for current non-outline parameters would work for the remaining parameter right?

I know that I don't know anything and I am oversimplifying lots of stuff so if this doesn't make any sense please let me know. I just wanted to share that incase it sparked an idea on your side.

Thanks for all of the work on the extension. It is working very well for me so far.

from deveroom-visualstudio.

gasparnagy avatar gasparnagy commented on June 12, 2024

This behavior is by design, but maybe not the best one.
The problem is that in case of an outline step, the location of the outline placeholders (<duration>) and the location of the step parameters matched from the regex might be misaligned. Therefore the current behavior is:

  • Color outline placeholders only if there are outline placeholders
  • Color step parameters if there are no placeholders

A tricky example would be the following (this example does not make sense, of course, but it is hard to detect):

Let's consider this step definition

[When(@"this is a '([a-z ]*)' step")]
public void WhenFoo(string param)
{ }

And the following scenario outline

Scenario Outline: Parameter mix
  When this is a '<param1>' step        # step A
  When this is <param2> step            # step B
  When this is <param3> tricky' step    # step C
Examples:
  | param1 | param2     | param3  |
  | tricky | a 'tricky' | a 'very |

In this example

  • Step A: the outline placeholders and the step parameters are aligned (like in your example), we could be color <param1> with both italic (placeholder) and brown (parameter)
  • Step B: the placeholder contains the parameter entirely. Probably in this case we should only color it as placeholder
  • Step C: The placeholder and the parameter overlaps. I have no idea what coloring would make sense. Maybe color <param3> as placeholder and tricky as step parameter?

It is also a problem to detect the situation, because the regex of the step definition might not even match to the step line with the placeholder. E.g. in my case the regex allows letters and spaces ([a-z ]*) that does not match to <param1> (because of the angle brackets).

from deveroom-visualstudio.

Related Issues (20)

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.