Skip to content
nittka edited this page Aug 20, 2013 · 6 revisions

The editor responds to files with the file extension .ttl. They need to be located in an eclipse project. If the project does not have the Xtext nature, you will be asked whether you want to add it when first opening a turtle file. Please add it, as otherwise the core linking functionality - which you are interested in - will not be working.

Files within the same project will automatically know each other, i.e. subjects defined in one file will be visible from the other. This is NOT automatically the case for files in different projects.

Cross project linking

(a discussion on this behavior is available at https://github.com/AKSW/Xturtle/issues/40)

A common setup will be that you have a project with basic vocabulary (rdf, rdfs,...) - let's assume the project name is xturtle.core - and others you are actively working on, e.g. my.sample.project. Each project contains a .project file. If you want my.sample.project to know the subjects defined in xturtle.core, you have to add a project reference, i.e. my.sample.project's .project file must contain

<projects>
    <project>xturtle.core</project>
</projects>

possibly with additional project entries. There are several ways to achieve that

  1. You can edit the .project file directly.
  2. Open the project's properties available in the context menu. There you choose the entry "Project References" where you can select the projects to be referenced.
  3. Since version 1.0.1 there are quick fixes for namespace imports. If your project actually uses a namespace defined somewhere in the workspace and the corresponding project reference is missing, applying the quickfix will add it for you. (A problem marker with a light bulb indicates that there is a quickfix.)

In order to support an easy usage of Xturtle, we provide projects for common vocabularies in our vocabulary folder. See the installation page for details.

Turtle Templates

In order to create some common structures on the fly, we ship Xturtle with an extendable list of turtle templates. These templates can be used in an eclipse typical way with autocompletion (control+space).

A list of templates can be viewed and changed with a right-click in the editor window, then Preferences..., Xturtle -> Templates.

If you need more here just modify the list to your needs. If you think that your templates are useful by others too, please send a pull request with changes on the templates file.

Clone this wiki locally