[forge-issues] [JBoss JIRA] (FORGE-1847) UIContext.getSelection() always return null
George Gastaldi (JIRA)
issues at jboss.org
Wed May 21 11:48:56 EDT 2014
[ https://issues.jboss.org/browse/FORGE-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Gastaldi closed FORGE-1847.
----------------------------------
Resolution: Won't Fix
This is not a bug. UIContext.getSelection() is meant to be set by the commands so that the IDE can know which resource should be selected/opened.
Eg: https://github.com/forge/core/blob/master/projects/impl/src/main/java/org/jboss/forge/addon/projects/ui/NewProjectWizardImpl.java#L396
> UIContext.getSelection() always return null
> -------------------------------------------
>
> Key: FORGE-1847
> URL: https://issues.jboss.org/browse/FORGE-1847
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 2.5.0.Final
> Reporter: Aslak Knutsen
>
> {code}
> value.setDefaultValue(new Callable<JavaResource>() {
> @Override
> public JavaResource call() throws Exception {
> Object selected = builder.getUIContext().getSelection();
> if(selected != null && selected instanceof JavaResource) {
> return (JavaResource)selected;
> }
> return null;
> }
> });
> {code}
> Object selected is always null.
> Using InitalSelection works as expected.
> {code}
> Object selected = builder.getUIContext().getInitialSelection().get();
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
More information about the forge-issues
mailing list