| Summary: | optional or required parameters in queries | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Missing name <trostren> |
| Component: | EMF-Facet | Assignee: | Project Inbox <emft.facet-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | gdupe, nicolas.bros |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Build Identifier: i am writing a java query that needs a parameter (ex : stereotypeName). public class isStereotyped implements IJavaModelQuery<Element, Boolean> { public Boolean evaluate(Element context, ParameterValueList parameterValues) throws ModelQueryExecutionException { String stereotypeName =""; if(parameterValues.getParameterValueByName("stereotypeName") == null ){ //TODO what must i do ? }else { stereotypeName = (String)parameterValues.getParameterValueByName("stereotypeName").getValue (); } .... how will the query user know that the query needs a parameter ? i think queries need to specify if they have parameters and if the parameters are mandatory or optionnal. must i throw an IllegalArgumentException, ModelQueryException or ModelQueryExecutionException ? Reproducible: Always