-
Notifications
You must be signed in to change notification settings - Fork 97
CS Studio Perspectives
In January 2016, CSS version 4.2 changes the *.opi runtimes to be based on "views". This allows their their arrangement to be saved, switched, restored as part of the Eclipse "Perspective" handling.
For previous users of BOY, the key change is that *.opi display files are best opened in the "OPI Runtime" perspective, where a newly opened display will by default appear in the center. When starting in other perspectives, the center is usually occupied by the editors area.
- Open fresh "OPI Runtime" perspective: Window/Open Perspective/Other/OPI Runtime. "Reset" if it was already active.
- Open views, position them as desired.
- Invoke "Save As" context menu on the perspective.
You can now close the perspective, later re-open it, or switch between perspectives.
After closing or moving views, either
a) "Reset" the perspective to revert to the original layout
b) Use "Save As" with a new name for a new perspective, or under the same name to overwrite the existing perspective.
- Creating a OPI Runtime perspective with the default part stacks
The preference option to "Show OPI Runtime Stacks" adds one placeholder view in each part stack, which helps positioning views in those stacks. Remember, however, to close the placeholder views when done!
org.csstudio.opibuilder/show_opi_runtime_stacks=true
- Setting the folder for saving and reading perspectives
Whenever a perspective is saved with the save as
command, this will create a <perspective_name>.xmi file in the specified 'save' directory. On startup cs-studio will load all the perspectives available in the 'load' directory, these perspectives will then be available in the perspective toolbar/open perspective editor.
The OPI Runtime perspective has part stacks named CENTER, TOP, BOTTOM, LEFT, RIGHT which are positioned as one would guess. When an action is configured to open an *.opi to the "left", it will be placed in the LEFT part stack.
When these part stacks are empty, they are invisible and it is thus impossible to manually move displays into them. A display can be positioned "left" from the center, but the actual LEFT part stack would be even further to the left.
If you want displays to be outside of the original workbench window, there are three options:
-
'Detach' by dragging it outside of the workbench. Detached windows belong to the current perspective of their origin window. They open/close with perspective changes.
-
Open display in new workbench (or move to another existing workbench). Each workbench has its own perspective.
-
Standalone Window (shell) Not part of any perspective, will not be persisted over application restarts.
By default, CS-Studio will start up with the same window layout in which it was last shut down.
For operational setups it can sometimes be more practical to always start out with a known window layout, regardless of how it was shut down. For example, this allows you to create a setup where users always have some "Main" layout when they start CSS. They can then switch to a "Vacuum", "Experiment 1", etc. layout as desired. They can still move things around. For the most part, they can "reset" a perspective to get the original layout. When users close & restart CSS, that start again with the "Main" setup.
If you want to "lock" a display setup:
- Create the desired perspectives
- Arrange windows as desired
- Exit CS-Studio
- Locate the workbench.xmi in the workspace folder, create a copy:
cp YOUR_WORKSPACE/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi $HOME/my_golden_workbench.xmi
- Start CSS with the -workbench_xmi option:
css -workbench_xmi $HOME/my_golden_workbench.xmi
https://github.com/ControlSystemStudio/cs-studio/issues/1707 (workaround: https://github.com/ControlSystemStudio/cs-studio/issues/1499)
For details on the evolution of perspective handling, see https://github.com/ControlSystemStudio/cs-studio/issues/544