The Eclipse Project Explorer adapter identifies workspace resources in Eclipse as traceable artifacts. It also provides access to various properties of these resources.
The Eclipse Project Explorer data access can be configured to access arbitrary files, folders and projects within the Eclipse workspace. You can define patterns to specify the locations and filenames that will be taken into account.
Open the ANALYZE configuration with the ANALYZE configuration editor, and add a new data access as described in section "Data accesses". Select Eclipse Project Explorer as data access type.
Supported keywords:
Example:
resource /de.itemis.*/*
The above example specifies all resources (i.e., folders, files, and projects) that are located in projects whose names start with
de.itemis.
.
The Eclipse Project Explorer artifact type identifies each of the resources that match the patterns defined in the associated Eclipse Project Explorer data access as an artifact. It supports selection propagation from artifacts in ANALYZE to resources in the Project Explorer view in Eclipse and vice versa.
Open the ANALYZE configuration with the ANALYZE configuration editor, and add a new artifact type as described in section "Artifact types". Select your previously-configured Eclipse Project Explorer data access in the Data access drop-down list.
The Eclipse Project Explorer artifact type can be configured to access several properties of these resources, e.g., the type of resource, the date of the last modification, or whether the resource is read-only. You can concatenate these properties with static strings and with each other and assign them to custom attributes of the artifact. You can also define the name of artifacts in the same way. By default, the name of the artifact will be the name of the resource.
For an example, consider that you want the name of each artifact to be the full name of the resource, followed by the type of resource (file, folder, or project) in parentheses. You can concatenate strings as usual with the + operator, and you can access properties with the valueOf keyword, followed by the name of the property in parentheses. For the sake of this example, you can define the artifact name using the following line in the artifact type configuration:
name valueOf(fullName) + " (" + valueOf(type) + ")"
Let us consider that you also want to assign the values of some properties to some custom attributes. You want to have custom attributes containing the path of the resource, the date of the last modification, and – in a single attribute – whether the resource is read-only and whether it is hidden or not. For files, you also want to maintain the file size in an attribute. The following lines in the artifact configuration accomplish this:
map{
Path to valueOf(path)
LastModification to valueOf(lastModified)
State to "read-only: " + valueOf(isReadOnly)+ ", hidden: " + valueOf(isHidden)
FileSize to valueOf(fileSize) + " bytes"
}
The Eclipse Project Explorer artifact type configuration supports the following keywords:
to
expression, where
attribute is the attribute name and
expression defines how the assigned value is computed.
An artifact’s version is used for suspicious links validation. The version of an artifact of this type is its resource modification timestamp.