[forge-issues] [JBoss JIRA] (FORGE-2233) Documenting how to create and test a command that updates Java code
Antonio Goncalves (JIRA)
issues at jboss.org
Mon Mar 9 10:58:18 EDT 2015
[ https://issues.jboss.org/browse/FORGE-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Goncalves updated FORGE-2233:
-------------------------------------
Description:
The idea is to document commands that add new code to existing classes ({{add}} commands). Example, the command to add a [CDI producer|FORGE-2079] or add a [CDI injection point|FORGE-2226]
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
was:The idea is to document commands that add new code to existing classes ({{add}} commands). Example, the command to add a [CDI producer|FORGE-2079] or add a [CDI injection point|FORGE-2226]
> Documenting how to create and test a command that updates Java code
> -------------------------------------------------------------------
>
> Key: FORGE-2233
> URL: https://issues.jboss.org/browse/FORGE-2233
> Project: Forge
> Issue Type: Sub-task
> Components: Documentation
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 2.x Future
>
>
> The idea is to document commands that add new code to existing classes ({{add}} commands). Example, the command to add a [CDI producer|FORGE-2079] or add a [CDI injection point|FORGE-2226]
> 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
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the forge-issues
mailing list