viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

Allow xbase expressions in annotation parameter value #284

Closed abelhegedus closed 11 years ago

abelhegedus commented 12 years ago

This would be nice in several use cases when some basic manipulation of the match values is needed.

The idea was conceived when thinking about creating invertable derived features but a similar usecase occurs in the message of validation annotation, and maybe the observable values in databinding.

Example:

@DerivedFeature(invert = {Target.id}, invertFeature="targetId")
@Constraint(location = "Source",
    message = {"Source " + Source.name + " connected to " + Target.name + "},
    severity = "info")
pattern softLink(Source, Target) {
  Source.targetId(Source, ID);
  Target.id(Target, ID);
}
bergmanngabor commented 12 years ago

I would also list OrderBy as a separate future use case - although if we ever add support for it in EMF-IncQuery, we could also consider a dedicated language element in this case. Anyways, in Viatra, we would have made good use of expressions in the annotation.

ujhelyiz commented 11 years ago

Migrated to https://bugs.eclipse.org/bugs/show_bug.cgi?id=398816