Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions src/MPQEditor/MPQCircleSelector.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import * as vscode from "vscode";

import {
CircleGraphCtrl,
CircleGraphEvent,
} from "../CircleGraph/CircleGraphCtrl";

export interface MPQSelectionEvent {
onSelection(names: string[], document: vscode.TextDocument): void;
onClosed(panel: vscode.WebviewPanel): void;
onOpened(panel: vscode.WebviewPanel): void;
}

export type MPQSelectionCmdOpenArgs = {
modelPath: string;
document: vscode.TextDocument;
names: any;
panel: vscode.WebviewPanel;
};

export class MPQSelectionPanel
extends CircleGraphCtrl
implements CircleGraphEvent
{
public static readonly viewType = "one.viewer.mpq";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's 'viewer' or' 'editor'..?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dayo09
For now its viewer with 'selector' abilities. I mean it doesn't have a document to edit. IMHO.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, Thanks for the explanation!


public static panels: MPQSelectionPanel[] = [];

public static register(_context: vscode.ExtensionContext): void {}

private constructor(
panel: vscode.WebviewPanel,
extensionUri: vscode.Uri,
_args: MPQSelectionCmdOpenArgs,
_handler: MPQSelectionEvent | undefined
) {
super(extensionUri, panel.webview);
// TODO
}

public dispose() {
//TODO
}

/**
* CircleGraphEvent interface implementations
*/
public onViewMessage(_message: any) {
// TODO
}
}