[
https://issues.jboss.org/browse/JBIDE-23324?page=com.atlassian.jira.plugi...
]
Andre Dietisheim updated JBIDE-23324:
-------------------------------------
Description:
(copied from
https://issues.jboss.org/browse/JBIDE-23182?focusedCommentId=13306362&...)
We need to update EvaluationContext in OpenShiftResourcePropertySection class for example
like this:
{code}
table.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
IHandlerService service = (IHandlerService)
page.getSite().getService(IHandlerService.class);
service.getCurrentState().addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME,
table.getSelection());
}
});
{code}
But this made no sense, because in the example above i'm trying to update the global
evaluation context from getter. Nothing just happens. So the way to solve it is to define
a child evaluation context, which will be used then in Handlers too.
I think it's a much bigger refactoring, than the one that Slava made. I think we
should merge it.
However, i might have missed some possibilities and maybe someone has more experience with
updating the evaluation context. That is the thing that should be done for Properties view
similarly to what i offered above, because it's a "peculiar" view.
Properties: should set selection to child context
-------------------------------------------------
Key: JBIDE-23324
URL:
https://issues.jboss.org/browse/JBIDE-23324
Project: Tools (JBoss Tools)
Issue Type: Enhancement
Components: openshift
Affects Versions: 4.4.1.AM3
Reporter: Andre Dietisheim
(copied from
https://issues.jboss.org/browse/JBIDE-23182?focusedCommentId=13306362&...)
We need to update EvaluationContext in OpenShiftResourcePropertySection class for example
like this:
{code}
table.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
IHandlerService service = (IHandlerService)
page.getSite().getService(IHandlerService.class);
service.getCurrentState().addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME,
table.getSelection());
}
});
{code}
But this made no sense, because in the example above i'm trying to update the global
evaluation context from getter. Nothing just happens. So the way to solve it is to define
a child evaluation context, which will be used then in Handlers too.
I think it's a much bigger refactoring, than the one that Slava made. I think we
should merge it.
However, i might have missed some possibilities and maybe someone has more experience
with updating the evaluation context. That is the thing that should be done for Properties
view similarly to what i offered above, because it's a "peculiar" view.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)