# ToolbarContext problem when changing installation file

**URL:** <https://forum.universal-robots.com/t/toolbarcontext-problem-when-changing-installation-file/13103>\
**Category:** URCap Development\
**Created:** [March 22, 2021, 2:19pm UTC](https://forum.universal-robots.com/t/toolbarcontext-problem-when-changing-installation-file/13103 "2021-03-22T14:19:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![umberto.fontana](https://avatars.discourse-cdn.com/v4/letter/u/ba8739/32.png) [@umberto.fontana](https://forum.universal-robots.com/u/umberto.fontana)\
**Post date:** [March 22, 2021, 2:19pm UTC](https://forum.universal-robots.com/t/toolbarcontext-problem-when-changing-installation-file/13103/1 "2021-03-22T14:19:19Z")

</div>

Hi there,

I am developing an URCap to control a gripper.

In the ToolbarContribution.java file we have the following code:

```
toolToolbarContribution(ToolbarContext context) {
    context_ = context;
    installation_ = context_.getAPIProvider().getApplicationAPI().getInstallationNode(toolInstallationNodeContribution.class);
    keyboard_factory_ = context_.getAPIProvider().getUserInterfaceAPI().getUserInteraction().getKeyboardInputFactory();
    view_builder_ = context_.getAPIProvider().getSystemAPI().getSoftwareVersion().getMajorVersion() >= 5 ? new ViewBuilder5() : new ViewBuilder3();
  }

```

while in ProgramNodeContribution.java file we have:

```
public toolProgramNodeContribution(ProgramAPIProvider api_provider, toolProgramNodeView view, DataModel model) {
    api_provider_ = api_provider;
    installation_ = api_provider.getProgramAPI().getInstallationNode(toolInstallationNodeContribution.class);
    view_ = view;
    model_ = model;
...
}

```

We have seen that when loading an existing **.installation** file which differs from the default one, in the toolbar the `installation_` variable is not updated, while the one in the programNode is correctly updated.

Does anyone faced this problem? Do you have any suggestion? Are there any differences between the two `getInstallationNode` methods?

Thank you in advance,

Umberto

---

<div class="post-metadata">

**Author:** ![anon59038427](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@anon59038427](https://forum.universal-robots.com/u/anon59038427)\
**Post date:** [April 1, 2021, 5:35pm UTC](https://forum.universal-robots.com/t/toolbarcontext-problem-when-changing-installation-file/13103/2 "2021-04-01T17:35:00Z")

</div>

Probably because the code who set the variable in ProgramNodeContribution has been executed after the .installation file has been loaded ??
