Documentation

Target (queryTarget)

More extensive documentation of EENum Target.

Implementation of queryTarget

The queryTarget determines the starting point (the context) for your query. Most often, we choose PARENT.

Target

Meaning

Example for Task Bool

PARENT

The current model object (e.g., the Task).

Task

MODELROOT

The root object where context is contained

Architecture

RESOURCE

The file you are working on.

Light…Example.oaam

EDITORROOT

The object your editor shows.

Functions

ROOT

The top-level workspace that contains everything.

Workspace

Example: Go to https://xgee.de/en/, start the demo version of XGEE, open the LightControllerExample.oaam file, and navigate to the Functions editor and go to the task Bool DS Sensor 1.

What exactly queryTarget means

In short, queryTarget tells the system at which part of your model the query starts — whether it’s the top-level root, the parent object, or the current editor context. Most often, you will choose PARENT.

Moreover, in XGEE (and EOQ in general), everything is treated as an object i.e., including features such as associations and containments.

For example, the Functions is an instance of the class Functions. It has the functions containment that contains all the individual tasks in the model However, it’s not a visible model element in the eclipse editor — it exists as a structural container in the underlying model.

So when you set the queryTarget to PARENT, it means that the query is evaluated in the context of the Functions object, which holds all task instances in the model. This design allows for very flexible and powerful querying within the XGEE environment, since queries can dynamically traverse and reference various model layers.

For instance, if you have a signal connecting two functions, that signal itself is also treated as an object with features such as source and target. This consistent “everything-is-an-object” concept makes it possible to query and manipulate nearly any aspect of your model in a uniform way.

When to Choose Each Target

Quick Decision Guide:

  • Use PARENT for most queries - starts at your current task/function context

  • Use MODELROOT when you need model-wide data (like Architecture root)

  • Use EDITORROOT typically if you are highly nested and want to start at the editor level (e.g., Functions)

  • Use RESOURCE for file-level operations only (rare)

  • Use ROOT only for workspace-level info (rare)

Why it matters: Each target changes where your queryStr looks for features. A /type query fails at ROOT (workspaces have no “type”) but works at PARENT (since tasks do).