pull/2074/head
bunsenstraat 3 years ago
parent 4fae5f9c35
commit 0b2403d52d
  1. 0
      apps/remix-ide/src/app/components/ViewPluginUI.tsx
  2. 2
      apps/remix-ide/src/app/components/hidden-panel.tsx
  3. 2
      apps/remix-ide/src/app/components/main-panel.tsx
  4. 2
      apps/remix-ide/src/app/components/plugin-manager-component.js
  5. 2
      apps/remix-ide/src/app/components/side-panel.tsx
  6. 2
      apps/remix-ide/src/app/components/vertical-icons.tsx
  7. 4
      apps/remix-ide/src/app/editor/editor.js
  8. 52
      apps/remix-ide/src/app/tabs/analysis-tab.js
  9. 2
      apps/remix-ide/src/app/tabs/settings-tab.tsx

@ -4,7 +4,7 @@ import ReactDOM from 'react-dom' // eslint-disable-line
import { AbstractPanel } from './panel'
import * as packageJson from '../../../../../package.json'
import { RemixPluginPanel } from '@remix-ui/panel'
import { ViewPluginUI } from '../plugins/ViewPluginUI'
import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = {
name: 'hiddenPanel',

@ -3,7 +3,7 @@ import { AbstractPanel } from './panel'
import ReactDOM from 'react-dom' // eslint-disable-line
import { RemixPluginPanel } from '@remix-ui/panel'
import packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../plugins/ViewPluginUI'
import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = {
name: 'mainPanel',

@ -3,7 +3,7 @@ import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import {RemixUiPluginManager} from '@remix-ui/plugin-manager' // eslint-disable-line
import * as packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../plugins/ViewPluginUI'
import { ViewPluginUI } from '../components/ViewPluginUI'
const _paq = window._paq = window._paq || []
const profile = {

@ -5,7 +5,7 @@ import { AbstractPanel } from './panel'
import { RemixPluginPanel } from '@remix-ui/panel'
import packageJson from '../../../../../package.json'
import RemixUIPanelHeader from 'libs/remix-ui/panel/src/lib/plugins/panel-header'
import { ViewPluginUI } from '../plugins/ViewPluginUI'
import { ViewPluginUI } from '../components/ViewPluginUI'
// const csjs = require('csjs-inject')
const sidePanel = {

@ -6,7 +6,7 @@ import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events'
import { IconRecord, RemixUiVerticalIconsPanel } from '@remix-ui/vertical-icons-panel'
import { Profile } from '@remixproject/plugin-utils'
import { ViewPluginUI } from '../plugins/ViewPluginUI'
import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = {
name: 'menuicons',

@ -4,7 +4,7 @@ import ReactDOM from 'react-dom'
import { EditorUI } from '@remix-ui/editor' // eslint-disable-line
import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../plugins/ViewPluginUI'
import { ViewPluginUI } from '../components/ViewPluginUI'
const EventManager = require('../../lib/events')
@ -68,8 +68,6 @@ class Editor extends Plugin {
setDispatch (dispatch) {
this.dispatch = dispatch
}
updateComponent(state) {

@ -1,10 +1,10 @@
import React from 'react' // eslint-disable-line
import { ViewPlugin } from '@remixproject/engine-web'
import ReactDOM from 'react-dom'
import { EventEmitter } from 'events'
import {RemixUiStaticAnalyser} from '@remix-ui/static-analyser' // eslint-disable-line
import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry'
import { ViewPluginUI } from '../components/ViewPluginUI'
var EventManager = require('../../lib/events')
@ -35,6 +35,7 @@ class AnalysisTab extends ViewPlugin {
offsetToLineColumnConverter: this.registry.get(
'offsettolinecolumnconverter').api
}
this.dispatch = null
}
async onActivation () {
@ -43,33 +44,40 @@ class AnalysisTab extends ViewPlugin {
await this.call('manager', 'activatePlugin', 'solidity')
}
this.renderComponent()
this.event.register('staticAnaysisWarning', (count) => {
if (count > 0) {
this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning' })
} else if (count === 0) {
this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' })
} else {
// count ==-1 no compilation result
this.emit('statusChanged', { key: 'none' })
}
})
}
setDispatch (dispatch) {
this.dispatch = dispatch
}
render () {
return this.element
return <div id='staticAnalyserView'><ViewPluginUI plugin={this} /></div>
}
updateComponent(state) {
return <RemixUiStaticAnalyser
registry={state.registry}
analysisModule={state}
event={state.event}
/>
}
renderComponent () {
ReactDOM.render(
<RemixUiStaticAnalyser
registry={this.registry}
analysisModule={this}
event={this.event}
/>,
this.element,
() => {
this.event.register('staticAnaysisWarning', (count) => {
if (count > 0) {
this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning' })
} else if (count === 0) {
this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' })
} else {
// count ==-1 no compilation result
this.emit('statusChanged', { key: 'none' })
}
})
}
)
this.dispatch({
registry: this.registry,
analysisModule: this,
event: this.event
})
}
}

@ -5,7 +5,7 @@ import * as packageJson from '../../../../../package.json'
import { RemixUiSettings } from '@remix-ui/settings' //eslint-disable-line
import Registry from '../state/registry'
import { ViewReactPlugin } from '../plugins/viewReactPlugin'
import { ViewPluginUI } from '../plugins/ViewPluginUI'
import { ViewPluginUI } from '../components/ViewPluginUI'
const profile = {
name: 'settings',

Loading…
Cancel
Save