Open HeikoKlare opened 4 months ago
Actually there is already org.eclipse.tycho.model.project.EclipseProject.getVariables()
but it seems unused at the moment.
Actually there is already
org.eclipse.tycho.model.project.EclipseProject.getVariables()
but it seems unused at the moment.
Indeed, and ProjectParser.parse()
already fills EclipseProject
with the defined variables, so the variables and their values can already be retrieved. ProjectParser.resolvePath()
will require some additional logic to resolve them (probably analogous to org.eclipse.core.internal.resources.ProjectPathVariableManager.resolveVariable()
).
Current Behavior
The
ProjectParser
is able to resolve linked resources and also supports some pre-defined variable names supported by the Eclipse platform (such asPROJECT_LOC
andPARENT-X-PROJECT_LOC
). It does, however, not yet support custom variables that can be defined in thevariablesList
of a project description file to share paths between multiple linked resources. When using custom variables in the location URIs of linked resources, they are considered as ordinary path segments.Example
The binary fragments in SWT define a variable for the path to the host project:
This is then used in locationURIs for linked resources, such as:
In this case, Tycho considers
SWT_HOST_PLUGIN
as an ordinary path segment as it is not aware of custom variables.Expected Behavior
Tycho should resolve custom variables just like the project description resolver of the Eclipse platform does.
I do not consider this an urgent topic, as those variables are only a means to avoid repetitions. Still it would by nice to have in order to be consistent with the capabilities of project description files in the Eclipse platform.