Examples of GoTypeInterfaceMethodSet


Examples of ro.redeul.google.go.lang.psi.types.interfaces.GoTypeInterfaceMethodSet

    private void discover() {
        GoPsiTypeInterface psiType = myTypeInterface.getPsiType();

        myIgnoredNames.add(psiType.getName());
        myMethodSet = new GoTypeInterfaceMethodSet();

        for (GoPsiTypeName embeddedInterface : psiType.getTypeNames()) {

            GoTypeInterface typeInterface = GoTypes.fromPsi(embeddedInterface).underlyingType(GoTypeInterface.class);
            if (typeInterface == null)
                continue;

            GoTypeInterfaceMethodSet methodSet =
                    new MethodSetDiscover(typeInterface, myIgnoredNames).getMethodSet();

            myMethodSet.merge(methodSet);
        }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.interfaces.GoTypeInterfaceMethodSet

                    @Override
                    public PsiElement resolve(@NotNull InterfaceMethodReference interfaceMethodReference, boolean incompleteCode) {
                        if ( type == null || type.getPsiType() == null)
                            return null;

                        GoTypeInterfaceMethodSet methodSet = new MethodSetDiscover(type).getMethodSet();

                        for (GoFunctionDeclaration declaration : methodSet.getMethods())
                            if (getElement().getText().equals(declaration.getFunctionName()))
                                return declaration;

                        return null;
                    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.interfaces.GoTypeInterfaceMethodSet

    @Override
    public Object[] getVariants() {
        if ( type == null )
            return EMPTY_ARRAY;

        GoTypeInterfaceMethodSet methodSet = new MethodSetDiscover(type).getMethodSet();

        List<LookupElementBuilder> variants = new ArrayList<LookupElementBuilder>();
        for (GoFunctionDeclaration functionDeclaration : methodSet.getMethods()) {
            variants.add(functionDeclaration.getLookupPresentation());
        }

        return variants.toArray();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.