How to use the surya.inheritance function in surya

To help you get started, we’ve selected a few surya examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ConsenSys / vscode-solidity-auditor / src / features / commands.js View on Github external
});
                                        });
                                });
                            });
                        } else {
                            vscode.window.showTextDocument(doc, vscode.ViewColumn.Beside);
                        }
                        
                    });
                /*
                vscode.env.openExternal(vscode.Uri.file("/Users/tintin/workspace/vscode/solidity-auditor/images/icon.png"))
                    .then(doc => vscode.window.showTextDocument(doc, vscode.ViewColumn.Beside))
                    */
                break;
            case "inheritance":
                ret = surya.inheritance(files,{draggable:false});
                vscode.workspace.openTextDocument({content: ret, language: "dot"})
                    .then(doc => {
                        if(solidityVAConfig.preview.dot){
                            vscode.commands.executeCommand("interactive-graphviz.preview.beside", {document: doc, content:ret, callback:null})
                            .catch(error =>{
                                vscode.commands.executeCommand("graphviz.previewToSide", doc.uri)
                                .catch(error => {
                                    //command not available. fallback open as text and try graphviz.showPreview
                                    vscode.window.showTextDocument(doc, vscode.ViewColumn.Beside)
                                        .then(editor => {
                                            vscode.commands.executeCommand("graphviz.showPreview", editor)  // creates new pane
                                                .catch(error => {
                                                    //command not available - do nothing
                                                });
                                        });
                                });

surya

Sūrya, The Sun God: A set of utilities for inspecting the structure of Solidity contracts.

Apache-2.0
Latest version published 3 months ago

Package Health Score

76 / 100
Full package analysis