]
George Gastaldi updated FORGE-2109:
-----------------------------------
Fix Version/s: 2.x Future
3.x Future
Refactoring the UICommands
--------------------------
Key: FORGE-2109
URL:
https://issues.jboss.org/browse/FORGE-2109
Project: Forge
Issue Type: Enhancement
Components: UI - API
Affects Versions: 2.12.1.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future, 3.x Future
Attachments: UIForgeNow.png, UIForgeRefactor.png, UIForgeStructure.png
_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*