protected void addNameAndDescription(
     final ContentAssistEntry entry,
     final JvmFeature feature,
     final boolean withParents,
     final int insignificantParameters,
     final String shortName,
     final LightweightTypeReferenceFactory converter) {
   final StringBuilder labelBuilder = new StringBuilder(shortName);
   final StringBuilder descriptionBuilder = new StringBuilder();
   if ((feature instanceof JvmOperation)) {
     if (withParents) {
       labelBuilder.append("(");
       this.appendParameters(
           labelBuilder, ((JvmExecutable) feature), insignificantParameters, converter);
       labelBuilder.append(")");
     }
     final JvmTypeReference returnType = ((JvmOperation) feature).getReturnType();
     boolean _and = false;
     boolean _notEquals = (!Objects.equal(returnType, null));
     if (!_notEquals) {
       _and = false;
     } else {
       String _simpleName = returnType.getSimpleName();
       boolean _notEquals_1 = (!Objects.equal(_simpleName, null));
       _and = _notEquals_1;
     }
     if (_and) {
       labelBuilder.append(" : ");
       LightweightTypeReference _lightweightReference =
           converter.toLightweightReference(returnType);
       String _humanReadableName = _lightweightReference.getHumanReadableName();
       labelBuilder.append(_humanReadableName);
     }
     JvmDeclaredType _declaringType = ((JvmOperation) feature).getDeclaringType();
     LightweightTypeReference _plainTypeReference = converter.toPlainTypeReference(_declaringType);
     String _humanReadableName_1 = _plainTypeReference.getHumanReadableName();
     descriptionBuilder.append(_humanReadableName_1);
     if ((!withParents)) {
       descriptionBuilder.append(".");
       String _simpleName_1 = ((JvmOperation) feature).getSimpleName();
       descriptionBuilder.append(_simpleName_1);
       descriptionBuilder.append("()");
     }
   } else {
     if ((feature instanceof JvmField)) {
       labelBuilder.append(" : ");
       JvmTypeReference _type = ((JvmField) feature).getType();
       boolean _notEquals_2 = (!Objects.equal(_type, null));
       if (_notEquals_2) {
         JvmTypeReference _type_1 = ((JvmField) feature).getType();
         LightweightTypeReference _lightweightReference_1 =
             converter.toLightweightReference(_type_1);
         final String fieldType = _lightweightReference_1.getHumanReadableName();
         boolean _notEquals_3 = (!Objects.equal(fieldType, null));
         if (_notEquals_3) {
           labelBuilder.append(fieldType);
         }
       }
       JvmDeclaredType _declaringType_1 = ((JvmField) feature).getDeclaringType();
       LightweightTypeReference _plainTypeReference_1 =
           converter.toPlainTypeReference(_declaringType_1);
       String _humanReadableName_2 = _plainTypeReference_1.getHumanReadableName();
       descriptionBuilder.append(_humanReadableName_2);
     } else {
       if ((feature instanceof JvmConstructor)) {
         if (withParents) {
           labelBuilder.append("(");
           this.appendParameters(
               labelBuilder, ((JvmExecutable) feature), insignificantParameters, converter);
           labelBuilder.append(")");
         }
       }
     }
   }
   String _string = labelBuilder.toString();
   entry.setLabel(_string);
   String _string_1 = descriptionBuilder.toString();
   entry.setDescription(_string_1);
 }
 protected void appendParameters(
     final StringBuilder result,
     final JvmExecutable executable,
     final int insignificantParameters,
     final LightweightTypeReferenceFactory ownedConverter) {
   final EList<JvmFormalParameter> declaredParameters = executable.getParameters();
   int _size = declaredParameters.size();
   int _min = Math.min(insignificantParameters, _size);
   int _size_1 = declaredParameters.size();
   final List<JvmFormalParameter> relevantParameters = declaredParameters.subList(_min, _size_1);
   for (int i = 0; (i < relevantParameters.size()); i++) {
     {
       final JvmFormalParameter parameter = relevantParameters.get(i);
       if ((i != 0)) {
         result.append(", ");
       }
       boolean _and = false;
       boolean _and_1 = false;
       int _size_2 = relevantParameters.size();
       int _minus = (_size_2 - 1);
       boolean _equals = (i == _minus);
       if (!_equals) {
         _and_1 = false;
       } else {
         boolean _isVarArgs = executable.isVarArgs();
         _and_1 = _isVarArgs;
       }
       if (!_and_1) {
         _and = false;
       } else {
         JvmTypeReference _parameterType = parameter.getParameterType();
         _and = (_parameterType instanceof JvmGenericArrayTypeReference);
       }
       if (_and) {
         JvmTypeReference _parameterType_1 = parameter.getParameterType();
         final JvmGenericArrayTypeReference parameterType =
             ((JvmGenericArrayTypeReference) _parameterType_1);
         JvmTypeReference _componentType = parameterType.getComponentType();
         LightweightTypeReference _lightweightReference =
             ownedConverter.toLightweightReference(_componentType);
         String _humanReadableName = _lightweightReference.getHumanReadableName();
         result.append(_humanReadableName);
         result.append("...");
       } else {
         JvmTypeReference _parameterType_2 = parameter.getParameterType();
         boolean _notEquals = (!Objects.equal(_parameterType_2, null));
         if (_notEquals) {
           JvmTypeReference _parameterType_3 = parameter.getParameterType();
           LightweightTypeReference _lightweightReference_1 =
               ownedConverter.toLightweightReference(_parameterType_3);
           final String simpleName = _lightweightReference_1.getHumanReadableName();
           boolean _notEquals_1 = (!Objects.equal(simpleName, null));
           if (_notEquals_1) {
             result.append(simpleName);
           }
         }
       }
       result.append(" ");
       String _name = parameter.getName();
       String _valueOf = String.valueOf(_name);
       result.append(_valueOf);
     }
   }
 }
 protected XbaseIdeCrossrefProposalProvider.ProposalBracketInfo getProposalBracketInfo(
     final IEObjectDescription proposedDescription,
     final ContentAssistContext contentAssistContext) {
   final XbaseIdeCrossrefProposalProvider.ProposalBracketInfo info =
       new XbaseIdeCrossrefProposalProvider.ProposalBracketInfo();
   if ((proposedDescription instanceof IIdentifiableElementDescription)) {
     final JvmIdentifiableElement jvmFeature =
         ((IIdentifiableElementDescription) proposedDescription).getElementOrProxy();
     if ((jvmFeature instanceof JvmExecutable)) {
       final EList<JvmFormalParameter> parameters = ((JvmExecutable) jvmFeature).getParameters();
       int _numberOfParameters =
           ((IIdentifiableElementDescription) proposedDescription).getNumberOfParameters();
       boolean _equals = (_numberOfParameters == 1);
       if (_equals) {
         boolean _and = false;
         String _simpleName = ((JvmExecutable) jvmFeature).getSimpleName();
         boolean _startsWith = _simpleName.startsWith("set");
         if (!_startsWith) {
           _and = false;
         } else {
           QualifiedName _name = ((IIdentifiableElementDescription) proposedDescription).getName();
           String _firstSegment = _name.getFirstSegment();
           boolean _startsWith_1 = _firstSegment.startsWith("set");
           boolean _not = (!_startsWith_1);
           _and = _not;
         }
         if (_and) {
           info.brackets = " = value";
           int _length = "value".length();
           int _minus = (-_length);
           info.selectionOffset = _minus;
           int _length_1 = "value".length();
           info.selectionLength = _length_1;
           return info;
         }
         JvmFormalParameter _last = IterableExtensions.<JvmFormalParameter>last(parameters);
         final JvmTypeReference parameterType = _last.getParameterType();
         XtextResource _resource = contentAssistContext.getResource();
         LightweightTypeReferenceFactory _typeConverter = this.getTypeConverter(_resource);
         final LightweightTypeReference light =
             _typeConverter.toLightweightReference(parameterType);
         boolean _isFunctionType = light.isFunctionType();
         if (_isFunctionType) {
           FunctionTypeReference _asFunctionTypeReference = light.getAsFunctionTypeReference();
           List<LightweightTypeReference> _parameterTypes =
               _asFunctionTypeReference.getParameterTypes();
           final int numParameters = _parameterTypes.size();
           if ((numParameters == 1)) {
             info.brackets = "[]";
             info.caretOffset = (-1);
             return info;
           } else {
             if ((numParameters == 0)) {
               info.brackets = "[|]";
               info.caretOffset = (-1);
               return info;
             } else {
               final StringBuilder b = new StringBuilder();
               for (int i = 0; (i < numParameters); i++) {
                 {
                   if ((i != 0)) {
                     b.append(", ");
                   }
                   b.append(("p" + Integer.valueOf((i + 1))));
                 }
               }
               String _string = b.toString();
               String _plus = ("[" + _string);
               String _plus_1 = (_plus + "|]");
               info.brackets = _plus_1;
               info.caretOffset = (-1);
               int _length_2 = b.length();
               int _minus_1 = (-_length_2);
               int _minus_2 = (_minus_1 - 2);
               info.selectionOffset = _minus_2;
               int _length_3 = b.length();
               info.selectionLength = _length_3;
               return info;
             }
           }
         }
       }
     }
     boolean _isExplicitOperationCall =
         this.isExplicitOperationCall(((IIdentifiableElementDescription) proposedDescription));
     if (_isExplicitOperationCall) {
       info.brackets = "()";
       info.selectionOffset = (-1);
     }
   }
   return info;
 }