Skip to main content

Module project

Module project 

Source
Expand description

Eclipse project linked folders, as CS-Studio BOY workspaces use them.

BOY screens name each other through the workspace project: a .project file links folder names to real directories, so ../mks937a/gauge.opi from proj/vacuum/x.opi means the mks937a link of proj. A path through such a project is kept as written (so .. keeps working across links), and locate finds the real file when it is opened.

DLS modules have no .project on disk: the generated launcher runcss.sh beside a module’s screens lists the links, and CS-Studio builds the project from them when it starts. Such a launcher is read (not run) as a project of its own, in a virtual directory below the script: …/opi/opi/runcss.sh/vacuum_4-100 for project vacuum_4-100, which cannot clash with a real file since runcss.sh is a file, not a folder. See launcher_path.

Constants§

LAUNCHER
The DLS CS-Studio launcher that lists a module’s links.

Functions§

forget
Forget the projects read so far, so that changed .project and runcss.sh files are read again.
is_project
Whether dir is a project: it holds a .project (which is not read), or is one of a launcher’s.
launcher_path
The virtual path of the real BOY screen real through the projects of the launcher in its folder or up to two above, as CS-Studio would open it from there: …/opi/opi/x.opi is …/opi/opi/runcss.sh/vacuum_4-100/vacuum/x.opi. None for a path that is not a real file, one in no launcher’s linked folders, and one that a .project nearer than the launcher (or beside it) links: a .project that links nothing, as many DLS modules have, does not count.
links
Linked folders of dir’s project, by name, when dir holds a .project or is a project of a launcher (…/runcss.sh/PROJECT).
locate
The real file for path: path itself when it exists, else the path through the linked folder of the Eclipse project it lies in, else path with . and .. removed (for the error message).
normalize
path with . and .. removed, without looking at the file system.
project_dir
The project that -p DIR names: dir when its .project links folders, else the (first) project of the launcher in dir (or dir itself, when that is a runcss.sh), else dir with a .project that links nothing.
through_launcher
Whether path goes through a launcher’s project.
virtual_path
The virtual path of real in the project at project_dir: the first linked folder holding it, so its .. names resolve through the project.