Imports
Imports can be defined with the keyword "import" or "importlib" at the beginning of a .poosl file (before any class or system).
To enable change propagation, it is recommended that all imported files are inside an opened Eclipse project.
Keyword "import"
Imports with the keyword "import" can be declared relative to the current file or absolute.
Relative examples (recommended):
- import "example.poosl"
- import "models/example.poosl"
- import "../../models/example.poosl"
Absolute examples:
- import "file:///C:/imports/model.poosl"
- import "file:///C:/Users/guest/EclipsePoosl/model.poosl"
Keyword "importlib"
Imports declared with the keyword "importlib" are relative to the first Poosl include path that contains the specified file.
Going backwards in the path (using "..\") is not allowed.
Examples:
- importlib "example.poosl"
- importlib "models/example.poosl"
Poosl include paths
The list of Poosl include paths is defined in the Poosl properties of a project (Project -> Properties -> Poosl).
There are two types of include paths:
- Workspace (recommended): click on the "Add" button to open up a window in which only folders of the workspace can be selected.
- External: click on the "Add External" button to open up a window in which folders from the whole file system can be selected.
The list of Poosl include paths is saved in a file "org.eclipse.poosl.xtext.Poosl.prefs", which can be found inside the project's ".settings" folder.
The "Up" and "Down" buttons move the paths up and down in the list.