|
|
@ -10,6 +10,7 @@ import { convertUmlClasses2Dot } from 'sol2uml/lib/converterClasses2Dot' |
|
|
|
import { convertAST2UmlClasses } from 'sol2uml/lib/converterAST2Classes' |
|
|
|
import { convertAST2UmlClasses } from 'sol2uml/lib/converterAST2Classes' |
|
|
|
import vizRenderStringSync from '@aduh95/viz.js/sync' |
|
|
|
import vizRenderStringSync from '@aduh95/viz.js/sync' |
|
|
|
import { PluginViewWrapper } from '@remix-ui/helper' |
|
|
|
import { PluginViewWrapper } from '@remix-ui/helper' |
|
|
|
|
|
|
|
import { customAction, customActionType } from '@remixproject/plugin-api' |
|
|
|
const parser = (window as any).SolidityParser |
|
|
|
const parser = (window as any).SolidityParser |
|
|
|
|
|
|
|
|
|
|
|
const profile = { |
|
|
|
const profile = { |
|
|
@ -17,7 +18,7 @@ const profile = { |
|
|
|
displayName: 'Solidity UML Generator', |
|
|
|
displayName: 'Solidity UML Generator', |
|
|
|
description: 'Generate UML diagram in svg format from last compiled contract', |
|
|
|
description: 'Generate UML diagram in svg format from last compiled contract', |
|
|
|
location: 'mainPanel', |
|
|
|
location: 'mainPanel', |
|
|
|
methods: ['showUmlDiagram', 'generateUml'], |
|
|
|
methods: ['showUmlDiagram', 'generateUml', 'generateCustomAction'], |
|
|
|
events: [], |
|
|
|
events: [], |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -47,6 +48,10 @@ export class SolidityUmlGen extends ViewPlugin implements ISolidityUmlGen { |
|
|
|
this.amIActivated = false |
|
|
|
this.amIActivated = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
generateCustomAction = async (action: customAction) => { |
|
|
|
|
|
|
|
this.generateUml(action.path[0]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
generateUml(currentFile: string) { |
|
|
|
generateUml(currentFile: string) { |
|
|
|
this.call('solidity', 'compile', currentFile) |
|
|
|
this.call('solidity', 'compile', currentFile) |
|
|
|
this.on('solidity', 'compilationFinished', async (file, source, languageVersion, data, input, version) => { |
|
|
|
this.on('solidity', 'compilationFinished', async (file, source, languageVersion, data, input, version) => { |
|
|
|