package com.reason.ide.hints;

import com.intellij.lang.parameterInfo.*;
import com.intellij.psi.*;
import com.intellij.psi.util.*;
import com.reason.lang.core.*;
import com.reason.lang.core.psi.*;
import com.reason.lang.core.psi.impl.*;
import com.reason.lang.ocaml.*;
import org.jetbrains.annotations.*;

public class OclParameterInfoHandler extends ORParameterInfoHandler {
    @Override
    int computeParameterIndex(@NotNull PsiParameters paramsOwner, @NotNull UpdateParameterInfoContext context) {
        return ParameterInfoUtils.getCurrentParameterIndex(paramsOwner.getNode(), context.getOffset(), TokenType.WHITE_SPACE);
    }

    @Override
    @Nullable PsiParameters findFunctionParams(@NotNull PsiFile file, int offset) {
        PsiElement elementAt = file.findElementAt(offset);

        if (elementAt == null) {
            // Maybe at the end of file
            if (offset == file.getTextLength()) {
                elementAt = file.findElementAt(offset - 1);
            }
        }

        if (elementAt instanceof PsiWhiteSpace) {
            elementAt = PsiTreeUtil.prevVisibleLeaf(elementAt);
            if (elementAt != null && elementAt.getNode().getElementType() == OclTypes.INSTANCE.LIDENT) {
                elementAt = elementAt.getParent();
            }
        }

        PsiElement parent = elementAt == null ? null : elementAt.getParent();
        if (parent instanceof PsiFunctionCall) {
            return ORUtil.findImmediateFirstChildOfClass(parent, PsiParameters.class);
        }

        return elementAt == null ? null : PsiTreeUtil.getParentOfType(elementAt, PsiParameters.class);
    }
}

@@ -370,16 +370,99 @@
 ndler %7B%0A
+    @Override public boolean isWhitespaceSensitive() %7B%0A        return true;%0A    %7D%0A%0A
     @Ove

Add whitespace sensitivity