Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-10356

New refactor feature: create method if doesn't exist

    XMLWordPrintable

Details

    • 7869c4e81 (master)

    Description

      It's very convenient to type a code, using methods which are to be defined in a moment (but there're not defined yet), then have a quick refactor option to let IDE generate the method for you using arguments that we passed to the method and (optionally) the return argument that we use from it.

      Example: Type a code like this:

      Type1 var1;
      Type2 var2;
      Type3 var3 = process(var1, var2);

      Then go to 3rd line, hit Alt+Enter and we should have option like: "Generate private method process() from this use case" (or something like that).

      This would cause the new private method to be generated in the class:

      Type3 ClassName::process(Type1 var1, Type2 var2)
      {
          // TODO implement
      }

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-10356
          # Subject Branch Project Status CR V

          Activity

            People

              kandeler Christian Kandeler
              vipe Vipe
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes