add solidity-umlgen builtin plugin

pull/3321/head^2
Joseph Izang 2 years ago committed by Aniket
parent a6a28dde7c
commit a4224af48e
  1. 10
      apps/remix-ide/src/app.js
  2. 31
      apps/remix-ide/src/app/plugins/solidity-umlgen.tsx
  3. 2
      apps/remix-ide/src/remixAppManager.js
  4. 4
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx
  5. 4
      libs/remix-ui/solidity-uml-gen/src/lib/solidity-uml-gen.tsx

@ -35,6 +35,7 @@ import { Injected0ptimismProvider } from './app/tabs/injected-optimism-provider'
import { InjectedArbitrumOneProvider } from './app/tabs/injected-arbitrum-one-provider'
import { FileDecorator } from './app/plugins/file-decorator'
import { CodeFormat } from './app/plugins/code-format'
import { SolidityUmlGen } from './app/plugins/solidity-umlgen'
const isElectron = require('is-electron')
@ -173,6 +174,9 @@ class AppComponent {
//----- search
const search = new SearchPlugin()
//---------------- Solidity UML Generator -------------------------
const solidityumlgen = new SolidityUmlGen()
// ----------------- import content service ------------------------
const contentImport = new CompilerImports()
@ -265,7 +269,8 @@ class AppComponent {
injected0ptimismProvider,
injectedArbitrumOneProvider,
this.walkthroughService,
search
search,
solidityumlgen
])
// LAYOUT & SYSTEM VIEWS
@ -378,9 +383,10 @@ class AppComponent {
await this.appManager.activatePlugin(['sidePanel']) // activating host plugin separately
await this.appManager.activatePlugin(['home'])
await this.appManager.activatePlugin(['settings', 'config'])
await this.appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'codeParser', 'codeFormatter', 'fileDecorator', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport', 'gistHandler'])
await this.appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'codeParser', 'codeFormatter', 'fileDecorator', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport', 'gistHandler', 'solidityumlgen'])
await this.appManager.activatePlugin(['settings'])
await this.appManager.activatePlugin(['walkthrough', 'storage', 'search', 'compileAndRun', 'recorder'])
// await this.appManager.activatePlugin(['solidityumlgen'])
this.appManager.on(
'filePanel',

@ -0,0 +1,31 @@
/* eslint-disable @nrwl/nx/enforce-module-boundaries */
import { ViewPlugin } from '@remixproject/engine-web'
import React from 'react'
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
import { RemixUiSolidityUmlGen } from '@remix-ui/solidity-uml-gen'
const profile = {
name: 'solidityumlgen',
displayName: 'Solidity UML Generator',
description: '',
location: 'mainPanel',
methods: [''],
events: [],
}
export class SolidityUmlGen extends ViewPlugin {
element: HTMLElement
constructor() {
super(profile)
this.element = document.createElement('div')
this.element.setAttribute('id', 'sol-uml-gen')
}
hi() {
console.log('hello yourself')
}
render() {
return <div id="sol-uml-gen"><RemixUiSolidityUmlGen plugin={this} /></div>
}
}

@ -11,7 +11,7 @@ const requiredModules = [ // services + layout views + system views
'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp', 'dGitProvider', 'solidity', 'solidity-logic', 'gistHandler', 'layout',
'notification', 'permissionhandler', 'walkthrough', 'storage', 'restorebackupzip', 'link-libraries', 'deploy-libraries', 'openzeppelin-proxy',
'hardhat-provider', 'ganache-provider', 'foundry-provider', 'basic-http-provider', 'injected-optimism-provider', 'injected-arbitrum-one-provider',
'compileAndRun', 'search', 'recorder', 'fileDecorator', 'codeParser', 'codeFormatter']
'compileAndRun', 'search', 'recorder', 'fileDecorator', 'codeParser', 'codeFormatter', 'solidityumlgen']
// dependentModules shouldn't be manually activated (e.g hardhat is activated by remixd)
const dependentModules = ['foundry', 'hardhat', 'truffle', 'slither']

@ -261,7 +261,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
</select>
</div>
<article className="mt-2 pb-0">
<CustomTooltip
{/* <CustomTooltip
placement="right-start"
tooltipId="flattenContractTooltip"
tooltipClasses="text-nowrap"
@ -280,7 +280,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
<button id="generateUML" onClick={generateUML} className="btn btn-secondary btn-block mt-2">
<FormattedMessage id='solidity.generateUMLLabel' />
</button>
</CustomTooltip>
</CustomTooltip> */}
<button id="publishOnIpfs" className="btn btn-secondary btn-block" onClick={() => { handlePublishToStorage('ipfs') }}>
<CustomTooltip
placement="right-start"

@ -1,9 +1,9 @@
import React from 'react'
export interface RemixUiSolidityUmlGenProps {
plugin: any
}
function RemixUiSolidityUmlGen ({ plugin }: RemixUiSolidityUmlGenProps) {
export function RemixUiSolidityUmlGen ({ plugin }: RemixUiSolidityUmlGenProps) {
return (
<div>

Loading…
Cancel
Save