Skip to content

Commit 0739250

Browse files
committed
Review changes
1 parent c5a78a7 commit 0739250

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

src/vs/workbench/contrib/positronPlots/browser/positronPlotsActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export class PlotsEditorAction extends Action2 {
213213
constructor() {
214214
super({
215215
id: PlotsEditorAction.ID,
216-
title: localize2('positronPlots.openEditor', 'Open Plot in Editor'),
216+
title: localize2('positronPlots.openEditor', 'Open Plot in Editor tab'),
217217
category,
218218
f1: true,
219219
precondition: ContextKeyExpr.equals(`config.${POSITRON_EDITOR_PLOTS}`, true),

src/vs/workbench/contrib/positronPlotsEditor/browser/editorPlotsContainer.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as React from 'react';
77
import { DynamicPlotInstance } from 'vs/workbench/contrib/positronPlots/browser/components/dynamicPlotInstance';
88
import { StaticPlotInstance } from 'vs/workbench/contrib/positronPlots/browser/components/staticPlotInstance';
99
import { ZoomLevel } from 'vs/workbench/contrib/positronPlots/browser/components/zoomPlotMenuButton';
10-
import { usePositronPlotsContext } from 'vs/workbench/contrib/positronPlots/browser/positronPlotsContext';
1110
import { PlotClientInstance } from 'vs/workbench/services/languageRuntime/common/languageRuntimePlotClient';
1211
import { IPositronPlotClient } from 'vs/workbench/services/positronPlots/common/positronPlots';
1312
import { StaticPlotClient } from 'vs/workbench/services/positronPlots/common/staticPlotClient';
@@ -19,8 +18,7 @@ interface EditorPlotsContainerProps {
1918
}
2019

2120
export const EditorPlotsContainer = (props: EditorPlotsContainerProps) => {
22-
usePositronPlotsContext();
23-
const render = (plotClient?: IPositronPlotClient) => {
21+
const render = (plotClient: IPositronPlotClient) => {
2422
if (plotClient instanceof PlotClientInstance) {
2523
return <DynamicPlotInstance
2624
key={props.plotClient.id}

src/vs/workbench/contrib/positronPlotsEditor/browser/positronPlotsEditor.contribution.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ class PositronPlotsEditorContribution extends Disposable {
2525
static readonly ID = 'workbench.contrib.positronPlotsEditor';
2626

2727
constructor(
28-
@IEditorResolverService _editorResolverService: IEditorResolverService,
29-
@IInstantiationService _instantiationService: IInstantiationService
28+
@IEditorResolverService editorResolverService: IEditorResolverService,
29+
@IInstantiationService instantiationService: IInstantiationService
3030
) {
3131
super();
3232

3333
// Register the editor
34-
this._register(_editorResolverService.registerEditor(
34+
this._register(editorResolverService.registerEditor(
3535
`${Schemas.positronPlotsEditor}:**/**`,
3636
{
3737
id: PositronPlotsEditorInput.EditorID,
38-
label: localize('positronPlotsEditor', 'Plots Editor'),
38+
label: localize('positronPlotsEditor', 'Editor Plot tab'),
3939
priority: RegisteredEditorPriority.builtin
4040
},
4141
{
@@ -45,7 +45,7 @@ class PositronPlotsEditorContribution extends Disposable {
4545
{
4646
createEditorInput: ({ resource, options }) => {
4747
return {
48-
editor: _instantiationService.createInstance(
48+
editor: instantiationService.createInstance(
4949
PositronPlotsEditorInput,
5050
resource
5151
),
@@ -65,7 +65,7 @@ Registry.as<IEditorPaneRegistry>(EditorExtensions.EditorPane).registerEditorPane
6565
EditorPaneDescriptor.create(
6666
PositronPlotsEditor,
6767
PositronPlotsEditorInput.EditorID,
68-
'Plots Editor',
68+
'Editor Plot tab',
6969
),
7070
[
7171
new SyncDescriptor(PositronPlotsEditorInput)

src/vs/workbench/contrib/positronPlotsEditor/browser/positronPlotsEditor.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,6 @@ export class PositronPlotsEditor extends EditorPane implements IPositronPlotsEdi
168168
return null;
169169
};
170170

171-
renderPlot = (plotClient: IPositronPlotClient) => {
172-
if (plotClient instanceof PlotClientInstance) {
173-
const dynamicPlot = plotClient as PlotClientInstance;
174-
dynamicPlot.render(this._height, this._width, 1);
175-
}
176-
};
177-
178171
override async setInput(
179172
input: PositronPlotsEditorInput,
180173
options: IPositronPlotsEditorOptions,
@@ -188,7 +181,6 @@ export class PositronPlotsEditor extends EditorPane implements IPositronPlotsEdi
188181

189182
input.setName(plotClient.id);
190183

191-
// this.renderPlot(plotClient);
192184
this.renderContainer(plotClient);
193185
this.onSizeChanged((event: ISize) => {
194186
this._height = event.height;

src/vs/workbench/contrib/positronPlotsEditor/browser/positronPlotsEditorInput.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export class PositronPlotsEditorInput extends EditorInput {
1717

1818
constructor(
1919
readonly resource: URI,
20-
// @IPositronPlotsService private readonly _positronPlotsService: IPositronPlotsService
2120
) { super(); }
2221

2322
override dispose(): void {

0 commit comments

Comments
 (0)