fix rebasing

LianaHus-patch-4
yann300 4 years ago committed by Liana Husikyan
parent b9bded4a0e
commit b8bbe3dd82
  1. 2
      apps/debugger/src/app/debugger-api.ts
  2. 4
      apps/remix-ide/src/app/tabs/debugger-tab.js
  3. 65
      libs/remix-ui/debugger-ui/src/lib/DebuggerAPI.ts
  4. 3
      libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts

@ -130,6 +130,8 @@ export const DebuggerApiMixin = (Base) => class extends Base {
this.off('editor', 'breakpointAdded')
this.off('editor', 'contentChanged')
}
showMessage (title: string, body: string) {}
}
export class CompilerAbstract implements CompilationOutput { // this is a subset of /remix-ide/src/app/compiler/compiler-abstract.js

@ -62,6 +62,10 @@ export class DebuggerTab extends DebuggerApiMixin(ViewPlugin) {
return this.el
}
showMessage (title, body) {
modalDialogCustom.alert(title, body)
}
renderComponent () {
ReactDOM.render(
<DebuggerUI debuggerAPI={this} />

@ -1,65 +0,0 @@
import type { CompilationResult, CompilationSource } from '@remix-project/remix-solidity-ts'
export interface DebuggerUIProps {
debuggerAPI: DebuggerAPI
}
interface EditorEvent {
event: {
register(eventName: 'breakpointCleared' | 'breakpointAdded' | 'contentChanged',
callback: (fileName: string, row: string | number) => void)
}
}
interface LineColumnLocation {
start: {
line: number, column: number
},
end: {
line: number, column: number
}
}
interface RawLocation {
start: number, length: number
}
interface Sources {
[fileName: string] : {content: string}
}
interface CompilationOutput {
source: { sources: Sources, target: string }
data: CompilationResult
getSourceName: (id: number) => string
}
interface Asts {
[fileName: string] : CompilationSource // ast
}
interface TransactionReceipt {
blockHash: string
blockNumber: number
transactionHash: string
transactionIndex: number
from: string
to: string
contractAddress: string | null
}
export interface DebuggerAPI {
offsetToLineColumnConverter: { offsetToLineColumn: (sourceLocation: RawLocation, file: number, contents: Sources, asts: Asts) => LineColumnLocation }
debugHash: string
debugHashRequest: string
removeHighlights: boolean
editor: EditorEvent
discardHighlight: () => void
highlight: (lineColumnPos: LineColumnLocation, path: string) => void
fetchContractAndCompile: (address: string, currentReceipt: TransactionReceipt) => CompilationOutput
getFile: (path: string) => string
setFile: (path: string, content: string) => void
getDebugWeb3: () => any // returns an instance of web3.js
showMessage: (title: string, message: string) => void
}

@ -63,4 +63,5 @@ export interface IDebuggerApi {
getFile: (path: string) => Promise<string>
setFile: (path: string, content: string) => Promise<void>
getDebugWeb3: () => any // returns an instance of web3.js
}
showMessage (title: string, body: string): void
}

Loading…
Cancel
Save