Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2109

Refactoring the UICommands

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.12.1.Final
    • Fix Version/s: 3.x Future
    • Component/s: UI - API
    • Labels:
      None

      Description

      From the Mailing List https://developer.jboss.org/thread/249733

      I'm trying to add more commands in Forge... but I have to say, I'm a bit lost. So, I've made a quick UML class diagram.

      As you can see in the attached diagram (UIForgeNow.png), most of the Java EE commands extend AbstractJavaEECommand, which makes sense. But not all of them (NewBeanCommand (CDI), ValidationNewAnnotationCommandImpl, NewQualifierCommand....). And some times you have an extra level of abstraction (AbstractFacesCommand). Same for the Java commands. JavaClassCommandImpl extend AbstractJavaSourceCommand but JavaAddAnnotationCommand and JavaFieldCommand inherit from AbstractProjectCommand. Some other commands, just use the @Command annotation.

      Then, when you dive into a command (UIForgeStructure.png), some commands use interface and implementation (see in the second diagram JavaAddAnnotationCommandImpl implementing JavaAddAnnotationCommand), some don't (e.g. NewQualifierCommand).

      Correct me if I'm wrong, but the way I see it would be (UIForgeRefactor.png) : under AbstractJavaEECommand you have a set of AbstractValidationCommand, AbstractCDICommand, AbstractJPACommand.... each implementing PrerequisiteCommandsProvider (this way, each command sets up its own pre-requisite). And then, under AbstractCDICommand you have all the NewQualifierCommand, NewBeanCommand....

      The idea of this JIRA is to brainstorm about refactoring the commands, and see if we do it and how

        Attachments

        1. UIForgeNow.png
          UIForgeNow.png
          176 kB
        2. UIForgeRefactor.png
          UIForgeRefactor.png
          162 kB
        3. UIForgeStructure.png
          UIForgeStructure.png
          50 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: