protected String _case(
     JvmOperation input,
     XAssignment context,
     EReference ref,
     JvmFeatureDescription jvmFeatureDescription) {
   final int irrelevantArguments = jvmFeatureDescription.getNumberOfIrrelevantArguments();
   if (input.getParameters().size() != (1 + irrelevantArguments))
     return INVALID_NUMBER_OF_ARGUMENTS;
   if (context.getValue() != null) {
     JvmTypeReference type = getTypeProvider().getType(context.getValue(), true);
     final JvmFormalParameter valueParam = input.getParameters().get(0 + irrelevantArguments);
     if (!isCompatibleArgument(valueParam.getParameterType(), type)) return INVALID_ARGUMENT_TYPES;
   }
   return null;
 }
Esempio n. 2
0
 @Override
 protected QualifiedName getAssignmentOperator(XAssignment assignment) {
   if (assignment.eContainer() instanceof StyleRule) return ASSIGN_COLON;
   return ASSIGN;
 }