Computer-implemented method for generating computer program code from an initial model (M) by means of a code generator, with the steps: - conversion of the initial model (M) into a starting model (M) by means of a first transformation (T), - conversion of the starting model (M) into an intermediate model (M...M(n-2)) by means of an intermediate transformation (T...T(n-3)), - conversion of the intermediate model (M...M(n-2)) into a final model (M(n-1)) by means of a penultimate transformation (T(n-2)), - conversion of the final model (M(n-1)) into a code model (M(n)) comprising a code file by means of a last transformation (T(n-1)), - wherein the intermediate transformation (T...T(n-3)) is specified by the code generator, wherein - the code generator is executed within a runtime environment, - wherein the initial model (M) is transmitted by a generator client to the runtime environment at the beginning of the method, - wherein the code model (M(n)) is transmitted by the runtime environment to the generator client towards the end of the method and - wherein the runtime environment monitors the work of the code generator, characterized in that in the course of the method, an old code model (M(n)), which was generated during an earlier run of the method and into which modifications (13, 14, 15) were inserted after its generation at least locally, is taken into account in such a way that the modifications (13, 14, 15) are maintained in the new code model (M(n)) generated by the method, wherein the old code model (M(n)) is parsed at the beginning of the method, so that an old version of the final model (M'(n-1)) is created, wherein for each model element of this old version of the final model (M'(n -1)) a temporary old model version is created which contains at least one corresponding modification (13, 14, 15) if the modifications (13, 14, 15) have affected the respective model element, wherein during the last transformation (T(n-1)) one old model element each of the old version of the final model (M'(n-1)) is compared with the corresponding model element of the new final model (M(n-1)), so that the modifications (13, 14, 15) are taken into account in the new code model (M(n)). - conversion of the initial model (M) into a starting model (M) by means of a first transformation (T), - conversion of the starting model (M) into an intermediate model (M...M(n-2)) by means of an intermediate transformation (T...T(n-3)), - conversion of the intermediate model (M...M(n-2)) into a final model (M(n-1)) by means of a penultimate transformation (T(n-2)), - conversion of the final model (M(n-1)) into a code model (M(n)) comprising a code file by means of a last transformation (T(n-1)), - wherein the intermediate transformation (T...T(n-3)) is specified by the code generator, wherein - the code generator is executed within a runtime environment, - wherein the initial model (M) is transmitted by a generator client to the runtime environment at the beginning of the method, - wherein the code model (M(n)) is transmitted by the runtime environment to the generator client towards the end of the method and - wherein the runtime environment monitors the work of the code generator, in the course of the method, an old code model (M(n)), which was generated during an earlier run of the method and into which modifications (13, 14, 15) were inserted after its generation at least locally, is taken into account in such a way that the modifications (13, 14, 15) are maintained in the new code model (M(n)) generated by the method, wherein the old code model (M(n)) is parsed at the beginning of the method, so that an old version of the final model (M'(n-1)) is created, wherein for each model element of this old version of the final model (M'(n -1)) a temporary old model version is created which contains at least one corresponding modification (13, 14, 15) if the modifications (13, 14, 15) have affected the respective model element, wherein during the last transformation (T(n-1)) one old model element each of the old version of the final model (M'(n-1)) is compared with the corresponding model element of the new final model (M(n-1)), so that the modifications (13, 14, 15) are taken into account in the new code model (M(n)).