NitorCreations / RobotFramework-EclipseIDE

Developing an Eclipse IDE for the Robot Framework test automation tool
70 stars 53 forks source link

Content assist includes a lot of irrelevant alternatives #5

Closed xkr47 closed 12 years ago

xkr47 commented 12 years ago

Need to rewrite the matching logic a little bit

efonsell commented 12 years ago

Some examples of irrelevant matches, please?

xkr47 commented 12 years ago

If you have a keyword definition with an inline argument in the middle, it will currently always show up in the results. For example:

Enter ${username} into form and click the register button

Currently the keyword completion code picks keywords to suggest using a wildcard matcher that treats inline variables as wildcards. This is done in order to make sure the following keyword call matches the above keyword declaration:

Example testcase
  Enter kalle into form and click the register button

It can also be the other way around, where the keyword call uses a variable, while the keyword definition does not. Or even a combination of the two.

The extra matches occur because I was experimenting with substring matches and the code is not finished yet. In a typical scenario the user might not remember the exact keyword name and enter for example just "register" hoping to get a list of keywords containing "register". So my quick hack was to put some dummy variables around the search string to get a substring search. But it didn't work out so well.

efonsell commented 12 years ago

Treating inline variable as wildcards is not commented out. When it's uncommented it should be fixed to work, too.

xkr47 commented 11 years ago

Included in release 1.0.6.