Skip to content
Snippets Groups Projects
Commit 135bbb35 authored by Julian Skublics's avatar Julian Skublics
Browse files

[vscode-diagrams] Removed unused function

parent 2a3f3fed
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ public class StructureDiagramGenerator implements IDiagramGenerator {
public SModelRoot generate(Context context) {
System.err.println("Generating Diagram!!!");
ActorClass ac;
if (!context.getState().getOptions().get("cursorOffset").equals("0")) {
if (!context.getState().getOptions().get("cursorOffset").equals("-1")) {
EObject o = offsetHelper.resolveContainedElementAt((XtextResource) context.getResource(), Integer.parseInt(context.getState().getOptions().get("cursorOffset")));
while (!(o instanceof ActorClass)) {
if (o == null) {
......
......@@ -43,7 +43,7 @@ public class StructureDiagramServer extends LanguageAwareDiagramServer {
request.getOptions().put("sourceUri", request.getOptions().get("sourceUri").split("\\?")[0]);
if (!request.getOptions().containsKey("cursorOffset")) {
request.getOptions().put("cursorOffset", "0");
request.getOptions().put("cursorOffset", "-1");
}
......
......@@ -6,7 +6,7 @@ import * as net from 'net';
import * as vscode from 'vscode';
import { LanguageClient, LanguageClientOptions, ServerOptions, StreamInfo } from 'vscode-languageclient/node';
import { SprottyDiagramIdentifier, createFileUri, createWebviewPanel, registerDefaultCommands} from 'sprotty-vscode';
import { registerDefaultCommands } from 'sprotty-vscode';
import { LspWebviewPanelManager, LspWebviewPanelManagerOptions, OpenInTextEditorMessage, convertPosition, openInTextEditorMessageType } from 'sprotty-vscode/lib/lsp';
......@@ -57,15 +57,6 @@ class StructureWebviewPanelManager extends LspWebviewPanelManager {
super(options);
options.languageClient.onNotification(openInTextEditorMessageType, message => this.openInTextEditorWorkaround(message));
}
protected override createWebview(identifier: SprottyDiagramIdentifier): vscode.WebviewPanel {
const extensionPath = this.options.extensionUri.fsPath;
const panel = createWebviewPanel(identifier, {
localResourceRoots: [ createFileUri(extensionPath, 'webview', 'pack') ],
scriptUri: createFileUri(extensionPath, 'webview', 'pack', 'webview.js')
});
return panel;
}
/*
Mehtod copied from lsp-utils.ts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment