Cevelop / cevelop

The C++ IDE for professional developers
Eclipse Public License 2.0
6 stars 0 forks source link

Clonewar: Extract Template for class does not remove Tx template names from created code #9

Open PeterSommerlad opened 7 years ago

PeterSommerlad commented 7 years ago

Expected Behavior

going back from preview of extract template for a class template should allow to make changes and reflect those in code. or the back button should not be enabled, and only cancel possible, but this is inconvenient, because all types of all things in the class are template candidates.

Actual Behavior

after going back from the preview and removing all but one line in the template parameter selection they stick in the generated code (T2...T6)

template<typename WH> struct OrderT {
    T6 fill(WH& warehouse) {
        if (warehouse.hasInventory(what, howmany)) {
            warehouse.remove(what, howmany);
            setFilled();
        }
    }

    T2 isFilled() const {
        return filled;
    }

    OrderT(T4& whisky, T5 i) :
            what { whisky }, howmany { i } {
    }

private:
    T6 setFilled() {
        filled = true;
    }

    T2 filled { };
    T4 what;
    T3 howmany;
};

Cevelop Version, Operating System and Compiler

current as of today: Version: 1.8.0-201707131430