]
George Gastaldi updated FORGE-2494:
-----------------------------------
Fix Version/s: (was: 2.x Future)
when composing commands from other commands we need to be able to
hide inputs in the base command
-------------------------------------------------------------------------------------------------
Key: FORGE-2494
URL:
https://issues.jboss.org/browse/FORGE-2494
Project: Forge
Issue Type: Feature Request
Components: Brainstorming, UI - API
Reporter: James Strachan
Fix For: 3.x Future
right now in fabric8-forge for creating new projects; we reuse the project-new command;
but we've added a hack to override the targetLocation property; so that the user
doesn't' get to pick that - we want to hide that completely from the user.
Meanwhile the project-new-git logical wrapper command defaults this value, uses a
canonical temporary folder and then stores the new project in git (instead of a local file
system on the developers laptop).
It would be good to port this code to be pure vanilla forge commands that could be reused
from the CLI / eclipse / IDEA too. To do this we'd need to be able to wrap the
project-new command with a project-new-git command that then hides the input for the
"targetLocation" property (defaulting the value so that the inner project-new
command can work as before; then the outer command, project-new-git can do the git
thingy.
I've not had chance to experiment a way to do this nicely; maybe using a proxy
command or something and using a temporary UIBuilder class that we pass to the delegate
inner command to build its stuff; so that the outer command can remove things from the
real UIBuilder etc - but I figured it'd be nice for this kind of thing to be a
standard feature to make commands easier to combine and compose. It'd also make it
easier for us to move the project-new-git command back into the main forge project (though
I guess thats kinda complex as the project-new-git command would probably want to create a
local copy too on the users desktop when not running in a REST service - so maybe this
kinda thing is highly environment specific?)