diff --git a/de.gebit.integrity.dsl.ui/src/de/gebit/integrity/ui/contentassist/DSLProposalProvider.java b/de.gebit.integrity.dsl.ui/src/de/gebit/integrity/ui/contentassist/DSLProposalProvider.java index 7c76083d1..665430fa8 100644 --- a/de.gebit.integrity.dsl.ui/src/de/gebit/integrity/ui/contentassist/DSLProposalProvider.java +++ b/de.gebit.integrity.dsl.ui/src/de/gebit/integrity/ui/contentassist/DSLProposalProvider.java @@ -70,6 +70,7 @@ import de.gebit.integrity.dsl.SuiteDefinition; import de.gebit.integrity.dsl.SuiteParameter; import de.gebit.integrity.dsl.SuiteParameterDefinition; +import de.gebit.integrity.dsl.SuiteReturn; import de.gebit.integrity.dsl.SuiteReturnDefinition; import de.gebit.integrity.dsl.TableTest; import de.gebit.integrity.dsl.TableTestRow; @@ -98,6 +99,8 @@ import de.gebit.integrity.utils.JavaTypeUtil; import de.gebit.integrity.utils.ParamAnnotationTypeTriplet; import de.gebit.integrity.utils.ParameterUtil.UnresolvableVariableException; +import de.gebit.integrity.utils.ParsedDocumentationComment; +import de.gebit.integrity.utils.ParsedDocumentationComment.ParseException; import de.gebit.integrity.utils.ResultFieldTuple; /** @@ -149,9 +152,9 @@ protected ConfigurableCompletionProposal doCreateProposal(String aProposal, Styl Image anImage, int aPriority, ContentAssistContext aContext) { int tempReplacementOffset = aContext.getReplaceRegion().getOffset(); int tempReplacementLength = aContext.getReplaceRegion().getLength(); - ConfigurableCompletionProposal tempResult = new IntegrityConfigurableCompletionProposal(aProposal, - tempReplacementOffset, tempReplacementLength, aProposal.length(), anImage, aDisplayString, null, - aContext); + ConfigurableCompletionProposal tempResult + = new IntegrityConfigurableCompletionProposal(aProposal, tempReplacementOffset, tempReplacementLength, + aProposal.length(), anImage, aDisplayString, null, aContext); tempResult.setPriority(aPriority); tempResult.setMatcher(aContext.getMatcher()); tempResult.setReplaceContextLength(aContext.getReplaceContextLength()); @@ -404,8 +407,8 @@ private void completeParametersInternal(Set someAlreadyUsedParameters, M List tempParamList = IntegrityDSLUtil.getAllParamNamesFromFixtureMethod(aMethod); for (ParamAnnotationTypeTriplet tempParam : tempParamList) { if (!someAlreadyUsedParameters.contains(tempParam.getParamName())) { - String tempJavadocDescription = tempJavadocMap != null - ? tempJavadocMap.get(tempParam.getJavaParamName()) : null; + String tempJavadocDescription + = tempJavadocMap != null ? tempJavadocMap.get(tempParam.getJavaParamName()) : null; String tempDisplayText = null; if (tempJavadocDescription != null) { tempDisplayText = tempParam.getParamName() + ": " + tempJavadocDescription; @@ -513,8 +516,8 @@ private void completeArbitraryParameterOrResultNameInternal(EObject aModel, Cont IType tempJDTType = resolveJDTTypeForJvmType(tempMethodReference.getType()); FixtureTypeWrapper tempFixtureClassWrapper = wrapType(tempJDTType); - ArbitraryParameterEnumerator tempEnumerator = tempFixtureClassWrapper - .instantiateArbitraryParameterEnumerator(); + ArbitraryParameterEnumerator tempEnumerator + = tempFixtureClassWrapper.instantiateArbitraryParameterEnumerator(); if (tempEnumerator != null) { resolveVariables(tempParameterMap); @@ -540,7 +543,8 @@ private void completeArbitraryParameterOrResultNameInternal(EObject aModel, Cont String tempPrefix = aPrefixPlusSignFlag ? "+" : ""; String tempSuffix = (aModel instanceof TableTest) ? "" : (tempParameterDescription.getSuffix() != null - ? tempParameterDescription.getSuffix().getText() : ": "); + ? tempParameterDescription.getSuffix().getText() + : ": "); if (!(aModel instanceof TableTest) && tempParameterDescription.isNestedObjectParam()) { tempSuffix += "{}"; @@ -567,7 +571,8 @@ private void completeArbitraryParameterOrResultNameInternal(EObject aModel, Cont } String tempPrefix = aPrefixPlusSignFlag ? "+" : ""; String tempSuffix = tempResultDescription.getSuffix() != null - ? tempResultDescription.getSuffix().getText() : " = "; + ? tempResultDescription.getSuffix().getText() + : " = "; if (tempResultDescription.isNestedObjectParam()) { tempSuffix += "{}"; } @@ -593,8 +598,8 @@ private void completeArbitraryParameterOrResultNameInternal(EObject aModel, Cont if (tempParameterDescriptions != null) { for (ArbitraryParameterDefinition tempParameterDescription : tempParameterDescriptions) { if (tempParameterDescription.hasSubdefinitions()) { - ArbitraryParameterDefinition tempDefinition = tempParameterDescription - .getSubdefinitionByPath(aParameterPath); + ArbitraryParameterDefinition tempDefinition + = tempParameterDescription.getSubdefinitionByPath(aParameterPath); if (tempDefinition != null && tempDefinition.hasSubdefinitions()) { for (ArbitraryParameterDefinition tempSubdefinition : tempDefinition .getSubdefinitions()) { @@ -704,20 +709,20 @@ private void completeKeyValuePairInternal(EObject aModel, ContentAssistContext a .findTypeByName(tempMethodReference.getMethod().getReturnType().getQualifiedName()); } else { // First, search for parameters... - List tempParamList = IntegrityDSLUtil - .getAllParamNamesFromFixtureMethod(tempMethodReference); + List tempParamList + = IntegrityDSLUtil.getAllParamNamesFromFixtureMethod(tempMethodReference); for (ParamAnnotationTypeTriplet tempPossibleParam : tempParamList) { if (tempParamName.equals(tempPossibleParam.getParamName())) { if (tempPossibleParam != null && tempPossibleParam.getType() != null && tempPossibleParam.getType().getType() != null) { - String tempQualifiedName = tempPossibleParam.getType().getType() - .getQualifiedName(); + String tempQualifiedName + = tempPossibleParam.getType().getType().getQualifiedName(); // The qualified name can contain brackets here if it is an array. We don't care // for arrays for the purpose of proposal providing, so we strip the array // brackets. if (tempQualifiedName.endsWith("[]")) { - tempQualifiedName = tempQualifiedName.substring(0, - tempQualifiedName.length() - 2); + tempQualifiedName + = tempQualifiedName.substring(0, tempQualifiedName.length() - 2); } tempRootType = IntegrityDSLUIUtil.findTypeByName(tempQualifiedName); @@ -728,8 +733,8 @@ private void completeKeyValuePairInternal(EObject aModel, ContentAssistContext a if (tempRootType == null) { // If nothing was found, look into named test results - List tempResultList = IntegrityDSLUtil - .getAllResultNamesFromFixtureMethod(tempMethodReference); + List tempResultList + = IntegrityDSLUtil.getAllResultNamesFromFixtureMethod(tempMethodReference); for (ResultFieldTuple tempPossibleResult : tempResultList) { if (tempParamName.equals(tempPossibleResult.getResultName())) { if (tempPossibleResult != null && tempPossibleResult.getField() != null) { @@ -759,8 +764,8 @@ private void completeKeyValuePairInternal(EObject aModel, ContentAssistContext a ResolvedTypeName tempResolvedTypeName = IntegrityDSLUIUtil .getResolvedTypeName(tempField.getTypeSignature(), tempTypeInFocus); if (tempResolvedTypeName.getGenericParameterTypes() == null) { - tempTypeInFocus = IntegrityDSLUIUtil - .findTypeByName(tempResolvedTypeName.getRawType()); + tempTypeInFocus + = IntegrityDSLUIUtil.findTypeByName(tempResolvedTypeName.getRawType()); } else { // We support 1 single generic parameter only here, since that's enough to deal // with the also-supported collections like List or Set @@ -1083,8 +1088,8 @@ public void completeTableTestRow_Values(EObject aModel, Assignment anAssignment, IType tempJDTType = resolveJDTTypeForJvmType(tempMethod.getType()); FixtureTypeWrapper tempFixtureClassWrapper = wrapType(tempJDTType); - tempConvertedResultValue = tempFixtureClassWrapper - .convertResultValueToFixtureDefinedType( + tempConvertedResultValue + = tempFixtureClassWrapper.convertResultValueToFixtureDefinedType( tempMethod.getMethod().getSimpleName(), tempResultName, tempResultValue); @@ -1153,53 +1158,102 @@ public void completeParameterTableValue_Value(EObject aModel, Assignment anAssig } } + /** + * The suite result priority, relative to the default priority. Results should be higher prioritized than the + * default, so they appear on top of the list when autocompleting suite calls. + */ + protected static final int SUITE_RESULT_PRIORITY = 1; + + /** + * The suite parameter property, relative to the default priority. Parameters must be placed before results, so they + * must be even higher prioritized. + */ + protected static final int SUITE_PARAMETER_PRIORITY = SUITE_RESULT_PRIORITY + 1; + @Override // SUPPRESS CHECKSTYLE MethodName public void completeSuiteParameter_Name(EObject aModel, Assignment anAssignment, final ContentAssistContext aContext, final ICompletionProposalAcceptor anAcceptor) { - // filter out everything except suite parameters of the suite that is currently being called - super.completeSuiteParameter_Name(aModel, anAssignment, aContext, new ICompletionProposalAcceptor() { - - @Override - public void accept(ICompletionProposal aProposal) { - if (aContext.getCurrentModel() instanceof Suite) { - Suite tempCurrentSuiteCall = (Suite) aContext.getCurrentModel(); - SuiteDefinition tempCurrentSuiteDef = (tempCurrentSuiteCall).getDefinition(); - if (aProposal instanceof IntegrityConfigurableCompletionProposal) { - SuiteDefinition tempSuiteDef = ((IntegrityConfigurableCompletionProposal) aProposal) - .getSuiteDefiningProposedParameter(); - if (tempSuiteDef == tempCurrentSuiteDef) { - ConfigurableCompletionProposal tempProposal = (ConfigurableCompletionProposal) aProposal; - - // now filter out the ones that are already present in the call - boolean tempAlreadyUsed = false; - for (SuiteParameter tempAlreadyUsedParam : tempCurrentSuiteCall.getParameters()) { - if (tempProposal.getReplacementString() - .equals(tempAlreadyUsedParam.getName().getName())) { - tempAlreadyUsed = true; - break; - } - } - if (!tempAlreadyUsed) { - tempProposal.setReplacementString(tempProposal.getReplacementString() + ": "); + if (aModel instanceof Suite) { + SuiteDefinition tempSuiteDef = ((Suite) aModel).getDefinition(); + if (tempSuiteDef != null) { + for (SuiteParameterDefinition tempParam : tempSuiteDef.getParameters()) { + if (((Suite) aModel).getParameters().stream().map(SuiteParameter::getName) + .anyMatch(aName -> aName == tempParam.getName())) { + // Parameter already given -> skip for proposal purposes + continue; + } - // For some reason, Xtext doesn't get the cursor positions quite right on these - // proposals, so we calculate them manually here - tempProposal.setCursorPosition(tempProposal.getReplacementString().length()); + ParsedDocumentationComment tempDoc = null; + if (tempSuiteDef.getDocumentation() != null) { + try { + tempDoc = new ParsedDocumentationComment(tempSuiteDef.getDocumentation(), null); + } catch (ParseException exc) { + // ignore if this fails, there's just no documentation then + } + } - anAcceptor.accept(aProposal); - } + String tempProposalText = tempParam.getName().getName() + ": "; + String tempProposalDisplayText = tempProposalText; + if (tempDoc != null) { + String tempParamDoc + = tempDoc.getParameterDocumentationTexts().get(tempParam.getName().getName()); + if (tempParamDoc != null) { + tempProposalDisplayText = tempProposalDisplayText + tempParamDoc; } } + + ICompletionProposal tempProposal + = createCompletionProposal(tempProposalText, new StyledString(tempProposalDisplayText), + null, getPriorityHelper().getDefaultPriority() + SUITE_PARAMETER_PRIORITY, + aContext.getPrefix(), aContext); + anAcceptor.accept(tempProposal); } } + } + } - @Override - public boolean canAcceptMoreProposals() { - return anAcceptor.canAcceptMoreProposals(); - } + @Override + // SUPPRESS CHECKSTYLE MethodName + public void completeSuiteReturn_Name(EObject aModel, Assignment anAssignment, final ContentAssistContext aContext, + final ICompletionProposalAcceptor anAcceptor) { + if (aModel instanceof Suite) { + SuiteDefinition tempSuiteDef = ((Suite) aModel).getDefinition(); + if (tempSuiteDef != null) { + for (SuiteReturnDefinition tempReturn : tempSuiteDef.getReturn()) { + if (((Suite) aModel).getReturn().stream().map(SuiteReturn::getName) + .anyMatch(aName -> aName == tempReturn.getName())) { + // Result already given -> skip for proposal purposes + continue; + } - }); + ParsedDocumentationComment tempDoc = null; + if (tempSuiteDef.getDocumentation() != null) { + try { + tempDoc = new ParsedDocumentationComment(tempSuiteDef.getDocumentation(), null); + } catch (ParseException exc) { + // ignore if this fails, there's just no documentation then + } + } + + String tempProposalText = tempReturn.getName().getName() + " -> "; + String tempProposalDisplayText = tempProposalText; + if (tempDoc != null) { + String tempReturnDoc + = tempDoc.getResultDocumentationTexts().get(tempReturn.getName().getName()); + if (tempReturnDoc != null) { + tempProposalDisplayText = tempProposalDisplayText + tempReturnDoc; + } + } + + ICompletionProposal tempProposal + = createCompletionProposal(tempProposalText, new StyledString(tempProposalDisplayText), + null, getPriorityHelper().getDefaultPriority() + SUITE_RESULT_PRIORITY, + aContext.getPrefix(), aContext); + anAcceptor.accept(tempProposal); + } + } + } } @Override @@ -1220,8 +1274,9 @@ public void accept(ICompletionProposal aProposal) { if (tempRef.eContainer() instanceof TestDefinition) { if (aProposal instanceof IntegrityConfigurableCompletionProposal) { - JvmOperation tempOperation = (JvmOperation) ((IntegrityConfigurableCompletionProposal) aProposal) - .getAdditionalProposalInfoObject(); + JvmOperation tempOperation + = (JvmOperation) ((IntegrityConfigurableCompletionProposal) aProposal) + .getAdditionalProposalInfoObject(); JvmTypeReference tempReturnType = tempOperation.getReturnType(); if (tempReturnType != null && tempReturnType.getType() instanceof JvmVoid) { // This is a reference to a method which returns nothing. Filter these out! @@ -1237,25 +1292,6 @@ public void accept(ICompletionProposal aProposal) { }); } - @Override - // SUPPRESS CHECKSTYLE MethodName - public void completeSuiteReturn_Name(EObject aModel, Assignment anAssignment, final ContentAssistContext aContext, - final ICompletionProposalAcceptor anAcceptor) { - super.completeSuiteReturn_Name(aModel, anAssignment, aContext, new ICompletionProposalAcceptor() { - - @Override - public void accept(ICompletionProposal aProposal) { - anAcceptor.accept(aProposal); - } - - @Override - public boolean canAcceptMoreProposals() { - return anAcceptor.canAcceptMoreProposals(); - } - - }); - } - @Override public void completeDocumentationComment_Content(EObject aModel, Assignment anAssignment, ContentAssistContext aContext, ICompletionProposalAcceptor anAcceptor) { @@ -1394,9 +1430,9 @@ private void completeParameterValuesInternal(ParameterName aParameter, MethodRef tempFixtureClassWrapper.convertParameterValuesToFixtureDefinedTypes(aMethod.getMethod().getSimpleName(), aParamMap, aParameterPath, true); - List tempProposals = tempProposalProvider.defineParameterProposals( - aMethod.getMethod().getSimpleName(), - IntegrityDSLUtil.getParamNameStringFromParameterName(aParameter), aParamMap); + List tempProposals + = tempProposalProvider.defineParameterProposals(aMethod.getMethod().getSimpleName(), + IntegrityDSLUtil.getParamNameStringFromParameterName(aParameter), aParamMap); acceptCustomProposals(tempProposals, aContext, anAcceptor); } catch (JavaModelException exc) { diff --git a/de.gebit.integrity.dsl/src/de/gebit/integrity/validation/DSLJavaValidator.java b/de.gebit.integrity.dsl/src/de/gebit/integrity/validation/DSLJavaValidator.java index 1a33c12c8..7edeb3603 100644 --- a/de.gebit.integrity.dsl/src/de/gebit/integrity/validation/DSLJavaValidator.java +++ b/de.gebit.integrity.dsl/src/de/gebit/integrity/validation/DSLJavaValidator.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Optional; import java.util.Set; import javax.inject.Inject; @@ -53,7 +54,9 @@ import de.gebit.integrity.dsl.ParameterTableValue; import de.gebit.integrity.dsl.Suite; import de.gebit.integrity.dsl.SuiteDefinition; +import de.gebit.integrity.dsl.SuiteParameter; import de.gebit.integrity.dsl.SuiteParameterDefinition; +import de.gebit.integrity.dsl.SuiteReturn; import de.gebit.integrity.dsl.SuiteReturnDefinition; import de.gebit.integrity.dsl.SuiteStatementWithResult; import de.gebit.integrity.dsl.TableTest; @@ -80,8 +83,8 @@ public class DSLJavaValidator extends AbstractDSLJavaValidator { @Inject private JvmFixtureEvaluation evaluator; /** Polymorphical dispatches calls to _checkParameter" methods. */ - private PolymorphicDispatcher checkParameterDispatcher = PolymorphicDispatcher - .createForSingleTarget("_checkParameter", this); + private PolymorphicDispatcher checkParameterDispatcher + = PolymorphicDispatcher.createForSingleTarget("_checkParameter", this); /** * Checks whether a given {@link DateValue} is actually correct (finds errors like days which don't exist in the @@ -135,8 +138,8 @@ public void checkIfDateAndTimesAreValid(DateAndTimeValue aValue) { public void checkIfVariableDefinitionsAreValid(VariableDefinition anEntity) { if (anEntity.getName() != null && anEntity.getName().getName() != null) { String tempVariableName = anEntity.getName().getName(); - EStructuralFeature tempFeature = anEntity.eClass() - .getEStructuralFeature(DslPackage.VARIABLE_DEFINITION__NAME); + EStructuralFeature tempFeature + = anEntity.eClass().getEStructuralFeature(DslPackage.VARIABLE_DEFINITION__NAME); performDotCheck(tempVariableName, "variable", tempFeature); @@ -153,8 +156,8 @@ public void checkIfVariableDefinitionsAreValid(VariableDefinition anEntity) { public void checkIfConstantDefinitionsAreValid(ConstantDefinition anEntity) { if (anEntity.getName() != null) { String tempConstantName = anEntity.getName().getName(); - EStructuralFeature tempFeature = anEntity.eClass() - .getEStructuralFeature(DslPackage.VARIABLE_DEFINITION__NAME); + EStructuralFeature tempFeature + = anEntity.eClass().getEStructuralFeature(DslPackage.VARIABLE_DEFINITION__NAME); performDotCheck(tempConstantName, "constant", tempFeature); @@ -354,6 +357,42 @@ public void checkSuiteStatement(Suite aSuiteStatement) { } } + /** + * Checks for redundant suite parameters. + * + * @param aParameter + */ + @Check + public void checkSuiteParameter(SuiteParameter aParameter) { + if (aParameter.eContainer() instanceof Suite && aParameter.getName() != null) { + Optional tempDuplicate = ((Suite) aParameter.eContainer()).getParameters().stream().filter( + anOtherParam -> (anOtherParam.getName() == aParameter.getName() && anOtherParam != aParameter)) + .findFirst(); + + if (tempDuplicate.isPresent()) { + error("Duplicate use of suite parameter '" + aParameter.getName().getName() + "'", null); + } + } + } + + /** + * Checks for redundant suite results. + * + * @param aReturn + */ + @Check + public void checkSuiteReturn(SuiteReturn aReturn) { + if (aReturn.eContainer() instanceof Suite && aReturn.getName() != null) { + Optional tempDuplicate = ((Suite) aReturn.eContainer()).getReturn().stream() + .filter(anOtherReturn -> (anOtherReturn.getName() == aReturn.getName() && anOtherReturn != aReturn)) + .findFirst(); + + if (tempDuplicate.isPresent() && aReturn.getName().getName() != null) { + error("Duplicate use of suite result '" + aReturn.getName().getName().getName() + "'", null); + } + } + } + /** * Checks for missing parameters. * @@ -383,10 +422,10 @@ protected void _checkParameter(Test aTest) { /** Polymorphic Dispatch of {@link #checkParameter(Call)}. */ protected void _checkParameter(TableTest aTableTest) { - Set tempMandatoryParameter = getMandatoryParameterNamesOf( - aTableTest.getDefinition().getFixtureMethod()); - Set tempSpecifiedParameter = Sets - .newHashSet(transform(aTableTest.getParameters(), FUNC_PARAMETER_NAME)); + Set tempMandatoryParameter + = getMandatoryParameterNamesOf(aTableTest.getDefinition().getFixtureMethod()); + Set tempSpecifiedParameter + = Sets.newHashSet(transform(aTableTest.getParameters(), FUNC_PARAMETER_NAME)); Iterables.addAll(tempSpecifiedParameter, transform(aTableTest.getParameterHeaders(), FUNC_PARAMETER_HEADER_NAME)); @@ -395,8 +434,8 @@ protected void _checkParameter(TableTest aTableTest) { aTableTest.getDefinition().getFixtureMethod(), aTableTest.getParameters()); if (tempNonNullableParameterNames != null) { - Map> tempMap = IntegrityDSLUtil - .getTableParameterValuesPerParameter(aTableTest); + Map> tempMap + = IntegrityDSLUtil.getTableParameterValuesPerParameter(aTableTest); for (Entry> tempColumn : tempMap.entrySet()) { if (tempNonNullableParameterNames.contains( IntegrityDSLUtil.getParamNameStringFromParameterName(tempColumn.getKey().getName()))) { @@ -458,8 +497,8 @@ protected Set getMandatoryParameterNamesOf(MethodReference aMethod) { if (aMethod == null) { return emptySet(); } - List> tempAnnotatedParameter = evaluator - .getAllAnnotatedParameter(aMethod, FixtureParameterAssessment.ACCEPTED_ANNOTATION); + List> tempAnnotatedParameter + = evaluator.getAllAnnotatedParameter(aMethod, FixtureParameterAssessment.ACCEPTED_ANNOTATION); List tempParameter = wrap(tempAnnotatedParameter); return collectMandatoryParameterNames(tempParameter); } @@ -492,8 +531,8 @@ protected void checkForMissingParameter(Set someMandatoryParameters, Set * (regardless of whether violations were found), null otherwise */ protected Set checkForNonNullableParameter(MethodReference aMethod, List someParameters) { - List> tempAnnotatedParameter = evaluator - .getAllAnnotatedParameter(aMethod, FixtureParameterAssessment.ACCEPTED_ANNOTATION); + List> tempAnnotatedParameter + = evaluator.getAllAnnotatedParameter(aMethod, FixtureParameterAssessment.ACCEPTED_ANNOTATION); List tempParameter = wrap(tempAnnotatedParameter); Set tempNonNullableParameters = collectNonNullableParameterNames(tempParameter); @@ -556,8 +595,8 @@ public List wrap( * @return */ protected Set collectMandatoryParameterNames(Collection aCollection) { - Iterable tempMandatory = filter(aCollection, - FixtureParameterAssessment.IS_MANDATORY); + Iterable tempMandatory + = filter(aCollection, FixtureParameterAssessment.IS_MANDATORY); Iterable tempMandatoryNames = transform(tempMandatory, FixtureParameterAssessment.NAME); return Sets.newLinkedHashSet(tempMandatoryNames); } @@ -570,8 +609,8 @@ protected Set collectMandatoryParameterNames(Collection collectNonNullableParameterNames(Collection aCollection) { - Iterable tempNonNullable = filter(aCollection, - FixtureParameterAssessment.IS_NOT_NULLABLE); + Iterable tempNonNullable + = filter(aCollection, FixtureParameterAssessment.IS_NOT_NULLABLE); Iterable tempNonNullableNames = transform(tempNonNullable, FixtureParameterAssessment.NAME); return Sets.newLinkedHashSet(tempNonNullableNames); } @@ -591,12 +630,13 @@ public String apply(Parameter aParameter) { /** * Maps parameters to their names. */ - private final Function FUNC_PARAMETER_HEADER_NAME = new Function() { + private final Function FUNC_PARAMETER_HEADER_NAME + = new Function() { - @Override - public String apply(ParameterTableHeader aParameterHeader) { - return evaluator.getParameterNameOf(aParameterHeader.getName()); - }; + @Override + public String apply(ParameterTableHeader aParameterHeader) { + return evaluator.getParameterNameOf(aParameterHeader.getName()); + }; - }; + }; }