Skip to content

Commit a875daa

Browse files
committed
changes to look and feel of cells
1 parent 49efd35 commit a875daa

5 files changed

Lines changed: 4 additions & 146 deletions

File tree

src/client/jupyter/display/cellOptions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as vscode from 'vscode';
22
import {Commands} from '../../common/constants';
33
import {JupyterCodeLensProvider} from '../editorIntegration/codeLensProvider';
4-
import {JupyterCellHighlightProvider} from '../editorIntegration/cellHighlightProvider';
54

65
export class CellOptions extends vscode.Disposable {
76
private disposables: vscode.Disposable[];
8-
constructor(private cellCodeLenses: JupyterCodeLensProvider, private cellHighlightProvider: JupyterCellHighlightProvider) {
7+
constructor(private cellCodeLenses: JupyterCodeLensProvider) {
98
super(() => { });
109
this.disposables = [];
1110
this.registerCommands();
@@ -116,7 +115,6 @@ export class CellOptions extends vscode.Disposable {
116115
textEditor.selection = new vscode.Selection(firstLineOfCellRange.start, firstLineOfCellRange.start);
117116
textEditor.revealRange(range);
118117
vscode.window.showTextDocument(textEditor.document);
119-
this.cellHighlightProvider.highlightCurrentCell(textEditor.document, firstLineOfCellRange.start);
120118
}
121119
private displayCellOptions(document: vscode.TextDocument, range: vscode.Range, nextCellRange?: vscode.Range) {
122120
interface Option extends vscode.QuickPickItem {

src/client/jupyter/display/main.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {KernelspecMetadata} from '../contracts';
55
import {TextDocumentContentProvider} from './resultView';
66
import {CellOptions} from './cellOptions';
77
import {JupyterCodeLensProvider} from '../editorIntegration/codeLensProvider';
8-
import {JupyterCellHighlightProvider} from '../editorIntegration/cellHighlightProvider';
98
import {Server} from './server';
109

1110
const jupyterSchema = 'jupyter-result-viewer';
@@ -16,7 +15,7 @@ export class JupyterDisplay extends vscode.Disposable {
1615
private previewWindow: TextDocumentContentProvider;
1716
private cellOptions: CellOptions;
1817
private server: Server;
19-
constructor(cellCodeLenses: JupyterCodeLensProvider, cellHighlightProvider: JupyterCellHighlightProvider) {
18+
constructor(cellCodeLenses: JupyterCodeLensProvider) {
2019
super(() => { });
2120
this.disposables = [];
2221
this.server = new Server();
@@ -25,7 +24,7 @@ export class JupyterDisplay extends vscode.Disposable {
2524
this.disposables.push(vscode.commands.registerCommand(Commands.Jupyter.Kernel_Options, this.showKernelOptions.bind(this)));
2625
this.previewWindow = new TextDocumentContentProvider();
2726
this.disposables.push(vscode.workspace.registerTextDocumentContentProvider(jupyterSchema, this.previewWindow));
28-
this.cellOptions = new CellOptions(cellCodeLenses, cellHighlightProvider);
27+
this.cellOptions = new CellOptions(cellCodeLenses);
2928
this.disposables.push(this.cellOptions);
3029
this.server.on('appendResults', appendResults => {
3130
this.appendResults = appendResults === true;

src/client/jupyter/editorIntegration/cellBorderProvider.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/client/jupyter/editorIntegration/cellHighlightProvider.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/client/jupyter/main.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import {JupyterDisplay} from './display/main';
55
import {KernelStatus} from './display/kernelStatus';
66
import {Commands, PythonLanguage} from '../common/constants';
77
import {JupyterCodeLensProvider} from './editorIntegration/codeLensProvider';
8-
import {JupyterCellBorderProvider} from './editorIntegration/cellBorderProvider';
98
import {JupyterSymbolProvider} from './editorIntegration/symbolProvider';
10-
import {JupyterCellHighlightProvider} from './editorIntegration/cellHighlightProvider';
119
import {formatErrorForLogging} from '../common/utils';
1210

1311
// Todo: Refactor the error handling and displaying of messages
@@ -32,13 +30,9 @@ export class Jupyter extends vscode.Disposable {
3230
this.codeLensProvider = new JupyterCodeLensProvider();
3331
this.disposables.push(vscode.languages.registerCodeLensProvider(PythonLanguage, this.codeLensProvider));
3432
this.disposables.push(vscode.languages.registerDocumentSymbolProvider(PythonLanguage, new JupyterSymbolProvider()));
35-
let highlightProvider: JupyterCellHighlightProvider;
36-
// highlightProvider = new JupyterCellHighlightProvider(codeLensProvider);
37-
// this.disposables.push(vscode.languages.registerDocumentHighlightProvider(PythonLanguage, highlightProvider));
38-
this.disposables.push(new JupyterCellBorderProvider(this.codeLensProvider, highlightProvider));
3933
this.status = new KernelStatus();
4034
this.disposables.push(this.status);
41-
this.display = new JupyterDisplay(this.codeLensProvider, highlightProvider);
35+
this.display = new JupyterDisplay(this.codeLensProvider);
4236
this.disposables.push(this.display);
4337

4438
// This happend when user changes it from status bar

0 commit comments

Comments
 (0)