Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2231 Documenting how to create and test Forge commands
  3. FORGE-2233

Documenting how to create and test a command that updates Java code

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Obsolete
    • Major
    • 3.x Future
    • 2.14.0.Final
    • Documentation
    • None

    Description

      The idea is to document commands that add new code to existing classes (add commands). Example, the command to add a CDI producer or add a CDI injection point

      Draft notes from #IRC

      gastaldi UIContext.getInitialSelection() should return a UISelection of Resource objects
      gastaldi Call get() on it and you should have a JavaResource if the command is executed in the context of a java class
      gastaldi Make it the default value of the targetClass field

      agoncal What does the Callable do in the initializeUI method do then ?
      gastaldi That should be used when the value changes over the UI interaction
      gastaldi That is not the case afaik
      gastaldi Because once you execute the command, the initial selection will not change

      Attachments

        Activity

          People

            rhn-support-ggastald George Gastaldi
            agoncal Antonio Goncalves (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: