src/Tools/VSCode/extension/src/output_view.ts
changeset 75135 8dd7f0130266
parent 75126 da1108a6d249
child 75179 549e4fb76724
child 75181 98fbc9accb51
equal deleted inserted replaced
75134:c04ccea8bdd2 75135:8dd7f0130266
     3 import { WebviewViewProvider, WebviewView, Uri, WebviewViewResolveContext,
     3 import { WebviewViewProvider, WebviewView, Uri, WebviewViewResolveContext,
     4    CancellationToken, window, Position, Selection, Webview} from 'vscode'
     4    CancellationToken, window, Position, Selection, Webview} from 'vscode'
     5 import { text_colors } from './decorations'
     5 import { text_colors } from './decorations'
     6 import * as library from './library'
     6 import * as library from './library'
     7 import * as path from 'path'
     7 import * as path from 'path'
     8 import { Isabelle_FSP } from './isabelle_filesystem/isabelle_fsp'
     8 import { Isabelle_Workspace } from './isabelle_filesystem/isabelle_workspace'
     9 
     9 
    10 class Output_View_Provider implements WebviewViewProvider
    10 class Output_View_Provider implements WebviewViewProvider
    11 {
    11 {
    12 
    12 
    13   public static readonly view_type = 'isabelle-output'
    13   public static readonly view_type = 'isabelle-output'
    62 {
    62 {
    63   const uri = Uri.parse(link)
    63   const uri = Uri.parse(link)
    64   const line = Number(uri.fragment) || 0
    64   const line = Number(uri.fragment) || 0
    65   const pos = new Position(line, 0)
    65   const pos = new Position(line, 0)
    66   const uri_no_fragment = uri.with({ fragment: '' })
    66   const uri_no_fragment = uri.with({ fragment: '' })
    67   const isabelle_uri = Isabelle_FSP.get_isabelle(uri_no_fragment)
    67   const isabelle_uri = Isabelle_Workspace.get_isabelle(uri_no_fragment)
    68   window.showTextDocument(isabelle_uri, {
    68   window.showTextDocument(isabelle_uri, {
    69     preserveFocus: false,
    69     preserveFocus: false,
    70     selection: new Selection(pos, pos)
    70     selection: new Selection(pos, pos)
    71   })
    71   })
    72 }
    72 }