[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] How to limit expressions for IU requirements and filters

How do we want to limit the expression that can be used for the requirements and filters in our IU? Do we want to do that as a recommendation (i.e., documentation saying - don't use these constructs), or as a hard limit? The reason I ask is that we now have an API method with this signature:

public static IRequirement createRequirement(
   IMatchExpression<IInstallableUnit> requirement,
   IMatchExpression<IInstallableUnit> filter,
   int minCard, int maxCard, boolean greedy)

and even with the best separation in the world, we cannot really see how the 'requirement' or 'filter' was created. What parser was used, what factory, etc. What we can do, is to let this method use a visitor that triggers on expressions that are not allowed. Do we want that? If so, what expressions do we want to allow/prevent?

- thomas