Project

General

Profile

Actions

Bug #157

closed

In to contains refactor option breaks insert command

Added by Wil van Antwerpen over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
07/09/2019
Due date:
% Done:

0%

Estimated time:

Description

Reported on behalf of Jose.

I have tried IN -> Contains function on our biggest project and it doesn't compile after that. Reason is that we have Insert command on it.

Suppose something like this:

string city

move "Niagara, NY" to city
insert " Falls" in city at 8

It gets refactored to:

string city

move "Niagara, NY" to city
insert (city contains " Falls") at 8

See also:
https://support.dataaccess.com/Forums/showthread.php?64596-DFRefactor-3-1-0-IN-gt-Contains-function-broke-Insert-command

Actions #1

Updated by Wil van Antwerpen over 6 years ago

Leon reports that you also have to take comments into account:

The above problem also exists in comment lines.
Like this, these lines:

// record to the end of the table. In both cases we take
// all record in between, and also add the stepsize

become:

// record to the end of the (both contains table.) cases we take
// all (between, contains record) and also add the stepsize
Actions #2

Updated by Wil van Antwerpen over 6 years ago

The "In to Contains" refactoring was done via regular expressions.

While the idea is great, neither of us wanted to support that and as such we pulled the refactoring option and decided that it has to be written using code we can understand and follow without it ending up becoming a puzzle.

Actions #3

Updated by Wil van Antwerpen over 6 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF