You are correct, that openView() is called twice when toggling from Program to an open Installation node.
However closeView() is called twice as well, so the math should add up, and you will end up with the openView().
Normally, toggling between two different installation- or program nodes will only yield 1 closeView()and openView()
For the ProgramNode the behaviour is:
Generally, the @Override methods, such as openView(), closeView(), isDefined() etc. should be designed in a way, so they are lean and not very resource consuming, as this might affect the responsiveness of the GUI.
E.g. the isDefined()method is called every time a change is made in the program.
Hence, you should not have any remote calls or methods with slow response time in isDefined()
The problem we have with the openView/closeView called twice is that we set
the visibility of a widget from those callbacks so it flickers on the
screen. That is not a major issue but it looks strange.