src/com/millennialmedia/intellibot/psi/element/HeadingImpl.java
/**
     * search sibling library by keywords
     * patch for SeleniumLibrary dynamic keywords
     * support all libraries that contain "keywords" package.
     *
     * @param files       all pyClass
     * @param libraryName default search is keywords.
     */
search sibling library by keywords
patch for SeleniumLibrary dynamic keywords
support all libraries that contain "keywords" package.

@param files       all pyClass
@param libraryName default search is keywords.
search sibling library by keywords patch for SeleniumLibrary dynamic keywords support all libraries that contain " keywords " package . @param files all pyClass @param libraryName default search is keywords .
void findChildrenClass(Collection<KeywordFile> files, String libraryName) {
        Collection<PyFile> fileList = PyModuleNameIndex.find(libraryName, getProject(), true);
        /* TODO: judge whether the PyFile is in subdirectory of a RobotPythonClass need import(in files)
           if no, don't import this library
           pyFile.getParent().getParent() ==
           RobotPythonClass.pythonClass.getContainingFile().getVirtualFile().getParent() ?
         */
        String withName = "";
        for (PyFile pyFile : fileList) {
            /* tested, SeleniumLibrary:
            pyFile.getName() == "__init__.py"
            pyFile.getParent().getName() == "keywords"
            pyFile.getParent().getParent().getName() == "SeleniumLibrary"
            */
            if (pyFile.getParent() != null) {
                boolean toBeAdded = false;
                if (pyFile.getParent().getParent() != null) {
                    String name = pyFile.getParent().getParent().getName();
                    for (KeywordFile file: files) {
                        if (file instanceof RobotPythonClass) {
                            if (((RobotPythonClass) file).getOriginalLibrary().equals(name)) {
                                withName = ((RobotPythonClass) file).getLibrary();
                                toBeAdded = true;
                                break;
                            }
                        }
                    }
                }
                if (toBeAdded) {
                    for (PsiFile psiFile : pyFile.getParent().getFiles()) {
                        if (psiFile instanceof RobotFileImpl) {
                            continue;
                        }
                        PsiElement[] all = psiFile.getChildren();
                        for (PsiElement psiElement : all) {
                            if (psiElement instanceof PyClass) {
                                files.add(new RobotPythonClass(withName, ((PyClass) psiElement).getName(), (PyClass) psiElement, ImportType.LIBRARY));
                            }
                        }
                    }
                }
            }
        }
    }
void findChildrenClass ( Collection < KeywordFile > files , String libraryName ) { Collection < PyFile > fileList = PyModuleNameIndex . find ( libraryName , getProject ( ) , true ) ; /* TODO: judge whether the PyFile is in subdirectory of a RobotPythonClass need import(in files)
           if no, don't import this library
           pyFile.getParent().getParent() ==
           RobotPythonClass.pythonClass.getContainingFile().getVirtualFile().getParent() ?
         */ String withName = "" ; for ( PyFile pyFile : fileList ) { /* tested, SeleniumLibrary:
            pyFile.getName() == "__init__.py"
            pyFile.getParent().getName() == "keywords"
            pyFile.getParent().getParent().getName() == "SeleniumLibrary"
            */ if ( pyFile . getParent ( ) != null ) { boolean toBeAdded = false ; if ( pyFile . getParent ( ) . getParent ( ) != null ) { String name = pyFile . getParent ( ) . getParent ( ) . getName ( ) ; for ( KeywordFile file : files ) { if ( file instanceof RobotPythonClass ) { if ( ( ( RobotPythonClass ) file ) . getOriginalLibrary ( ) . equals ( name ) ) { withName = ( ( RobotPythonClass ) file ) . getLibrary ( ) ; toBeAdded = true ; break ; } } } } if ( toBeAdded ) { for ( PsiFile psiFile : pyFile . getParent ( ) . getFiles ( ) ) { if ( psiFile instanceof RobotFileImpl ) { continue ; } PsiElement [ ] all = psiFile . getChildren ( ) ; for ( PsiElement psiElement : all ) { if ( psiElement instanceof PyClass ) { files . add ( new RobotPythonClass ( withName , ( ( PyClass ) psiElement ) . getName ( ) , ( PyClass ) psiElement , ImportType . LIBRARY ) ) ; } } } } } } }
search sibling library by keywords
 patch for SeleniumLibrary dynamic keywords
 support all libraries that contain "keywords" package.
search sibling library by keywords patch for SeleniumLibrary dynamic keywords support all libraries that contain " keywords " package .
// this is static library ,do not need to gen //if (psiFile.getNextSibling() instanceof RobotFileImpl) {