Manage Imports¶
The Manage Imports panel lets you add and remove owl:imports declarations in Turtle (.ttl) ontology headers without hand-editing import lines.
Requires OntoCode v0.11.3+ and a trusted workspace.
Open the panel¶
| Entry point | How |
|---|---|
| Explorer | Ontologies view → right-click a .ttl file → Manage Imports |
| Command Palette | OntoCode: Manage Imports (when a Turtle file is active or selected) |
Workflow¶
- Select a Turtle ontology file in the workspace.
- Open Manage Imports.
- Review current
owl:importsIRIs listed for that document. - Add import — enter the ontology IRI to import; preview the Turtle fragment.
- Remove import — select an existing import and confirm removal.
- Apply — writes the
.ttlfile on disk and re-indexes the workspace.
Import changes use patch operations add_import and remove_import. See Patch reference.
CLI equivalent¶
# Preview
ontocore patch ./ontology.ttl imports.json --preview
# Apply
ontocore patch ./ontology.ttl imports.json
Example imports.json:
[
{
"op": "add_import",
"ontology_iri": "http://example.org/people",
"import_iri": "http://example.org/vocab/core"
}
]
Troubleshooting¶
| Problem | What to try |
|---|---|
| Panel empty or disabled | File must be .ttl; other formats are read-only |
| Import not resolved after add | Confirm the imported ontology is in the workspace or reachable; run Index Workspace |
| Broken import diagnostic | Use the lightbulb quick fix or remove via Manage Imports — see Troubleshooting |
Related¶
- Authoring — Turtle write-back overview
- Patch reference —
add_import/remove_importJSON - Migration v0.11 — release notes