Skip to content

Commit

Permalink
Some renames
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagobento committed Jan 9, 2024
1 parent c9e560d commit 7c55d46
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export class ServerlessWorkflowDiagramEditorChannelApiImpl implements Serverless
constructor(
private readonly editor: VsCodeKieEditorController,
resourceContentService: ResourceContentService,
workspaceApi: VsCodeWorkspaceChannelApiImpl,
vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
backendProxy: BackendProxy,
notificationsApi: VsCodeNotificationsChannelApiImpl,
vscodeNotifications: VsCodeNotificationsChannelApiImpl,
javaCodeCompletionApi: JavaCodeCompletionApi,
viewType: string,
i18n: I18n<VsCodeI18n>,
Expand All @@ -80,9 +80,9 @@ export class ServerlessWorkflowDiagramEditorChannelApiImpl implements Serverless
this.defaultApiImpl = new DefaultVsCodeKieEditorChannelApiImpl(
editor,
resourceContentService,
workspaceApi,
vscodeWorkspace,
backendProxy,
notificationsApi,
vscodeNotifications,
javaCodeCompletionApi,
viewType,
i18n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ export class ServerlessWorkflowDiagramEditorChannelApiProducer implements VsCode
get(
editor: VsCodeKieEditorController,
resourceContentService: ResourceContentService,
workspaceApi: VsCodeWorkspaceChannelApiImpl,
vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
backendProxy: BackendProxy,
notificationsApi: VsCodeNotificationsChannelApiImpl,
vscodeNotifications: VsCodeNotificationsChannelApiImpl,
javaCodeCompletionApi: JavaCodeCompletionApi,
viewType: string,
i18n: I18n<VsCodeI18n>
): KogitoEditorChannelApi {
return new ServerlessWorkflowDiagramEditorChannelApiImpl(
editor,
resourceContentService,
workspaceApi,
vscodeWorkspace,
backendProxy,
notificationsApi,
vscodeNotifications,
javaCodeCompletionApi,
viewType,
i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export class DashbuilderViewerChannelApiImpl implements DashbuilderViewerChannel
constructor(
private readonly editor: VsCodeKieEditorController,
resourceContentService: ResourceContentService,
workspaceApi: VsCodeWorkspaceChannelApiImpl,
vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
backendProxy: BackendProxy,
notificationsApi: VsCodeNotificationsChannelApiImpl,
vscodeNotifications: VsCodeNotificationsChannelApiImpl,
javaCodeCompletionApi: JavaCodeCompletionApi,
viewType: string,
i18n: I18n<VsCodeI18n>,
Expand All @@ -63,9 +63,9 @@ export class DashbuilderViewerChannelApiImpl implements DashbuilderViewerChannel
this.defaultApiImpl = new DefaultVsCodeKieEditorChannelApiImpl(
editor,
resourceContentService,
workspaceApi,
vscodeWorkspace,
backendProxy,
notificationsApi,
vscodeNotifications,
javaCodeCompletionApi,
viewType,
i18n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ export class DashbuilderViewerChannelApiProducer implements VsCodeKieEditorChann
get(
editor: VsCodeKieEditorController,
resourceContentService: ResourceContentService,
workspaceApi: VsCodeWorkspaceChannelApiImpl,
vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
backendProxy: BackendProxy,
notificationsApi: VsCodeNotificationsChannelApiImpl,
vscodeNotifications: VsCodeNotificationsChannelApiImpl,
javaCodeCompletionApi: JavaCodeCompletionApi,
viewType: string,
i18n: I18n<VsCodeI18n>
): KogitoEditorChannelApi {
return new DashbuilderViewerChannelApiImpl(
editor,
resourceContentService,
workspaceApi,
vscodeWorkspace,
backendProxy,
notificationsApi,
vscodeNotifications,
javaCodeCompletionApi,
viewType,
i18n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export class DefaultVsCodeKieEditorChannelApiImpl implements KogitoEditorChannel
constructor(
private readonly editor: VsCodeKieEditorController,
private readonly resourceContentService: ResourceContentService,
private readonly workspaceApi: VsCodeWorkspaceChannelApiImpl,
private readonly vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
private readonly backendProxy: BackendProxy,
private readonly notificationsApi: VsCodeNotificationsChannelApiImpl,
private readonly vscodeNotifications: VsCodeNotificationsChannelApiImpl,
private readonly javaCodeCompletionApi: JavaCodeCompletionApi,
private readonly viewType: string,
private readonly i18n: I18n<VsCodeI18n>
Expand Down Expand Up @@ -98,7 +98,7 @@ export class DefaultVsCodeKieEditorChannelApiImpl implements KogitoEditorChannel
);
}

this.workspaceApi.openFile(
this.vscodeWorkspace.openFile(
__path.join(
getWorkspaceRoot(this.editor.document.document).workspaceRootAbsoluteFsPath,
toFsPath(normalizedPosixPathRelativeToTheWorkspaceRoot)
Expand Down Expand Up @@ -193,22 +193,22 @@ export class DefaultVsCodeKieEditorChannelApiImpl implements KogitoEditorChannel
}

public kogitoNotifications_createNotification(notification: Notification): void {
this.notificationsApi.createNotification(this.editor.document.document, notification);
this.vscodeNotifications.createNotification(this.editor.document.document, notification);
}

public kogitoNotifications_setNotifications(
normalizedPosixPathRelativeToTheWorkspaceRoot: string,
notifications: Notification[]
): void {
this.notificationsApi.setNotifications(
this.vscodeNotifications.setNotifications(
this.editor.document.document,
normalizedPosixPathRelativeToTheWorkspaceRoot,
notifications
);
}

public kogitoNotifications_removeNotifications(normalizedPosixPathRelativeToTheWorkspaceRoot: string): void {
this.notificationsApi.removeNotifications(
this.vscodeNotifications.removeNotifications(
this.editor.document.document,
normalizedPosixPathRelativeToTheWorkspaceRoot
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ export interface VsCodeKieEditorChannelApiProducer {
* Method to obtain the KogitoEditorChannelApi instance.
* @param editor
* @param resourceContentService
* @param workspaceApi
* @param vscodeWorkspace
* @param backendProxy
* @param notificationsApi
* @param vscodeNotifications
* @param javaCodeCompletionApi
* @param viewType
* @param i18n
*/
get(
editor: VsCodeKieEditorController,
resourceContentService: ResourceContentService,
workspaceApi: VsCodeWorkspaceChannelApiImpl,
vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
backendProxy: BackendProxy,
notificationsApi: VsCodeNotificationsChannelApiImpl,
vscodeNotifications: VsCodeNotificationsChannelApiImpl,
javaCodeCompletionApi: JavaCodeCompletionApi,
viewType: string,
i18n: I18n<VsCodeI18n>
Expand All @@ -61,19 +61,19 @@ export class DefaultVsCodeEditorChannelApiProducer implements VsCodeKieEditorCha
get(
editor: VsCodeKieEditorController,
resourceContentService: ResourceContentService,
workspaceApi: VsCodeWorkspaceChannelApiImpl,
vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
backendProxy: BackendProxy,
notificationsApi: VsCodeNotificationsChannelApiImpl,
vscodeNotifications: VsCodeNotificationsChannelApiImpl,
javaCodeCompletionApi: JavaCodeCompletionApi,
viewType: string,
i18n: I18n<VsCodeI18n>
): KogitoEditorChannelApi {
return new DefaultVsCodeKieEditorChannelApiImpl(
editor,
resourceContentService,
workspaceApi,
vscodeWorkspace,
backendProxy,
notificationsApi,
vscodeNotifications,
javaCodeCompletionApi,
viewType,
i18n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export class VsCodeKieEditorControllerFactory {
private readonly editorStore: VsCodeKieEditorStore,
private readonly editorEnvelopeLocator: EditorEnvelopeLocator,
private readonly messageBroadcaster: EnvelopeBusMessageBroadcaster,
private readonly workspaceApi: VsCodeWorkspaceChannelApiImpl,
private readonly vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
private readonly backendProxy: BackendProxy,
private readonly notificationsApi: VsCodeNotificationsChannelApiImpl,
private readonly vscodeNotifications: VsCodeNotificationsChannelApiImpl,
private readonly javaCodeCompletionApi: JavaCodeCompletionApi,
private readonly viewType: string,
private readonly i18n: I18n<VsCodeI18n>,
Expand Down Expand Up @@ -119,9 +119,9 @@ export class VsCodeKieEditorControllerFactory {
return this.channelApiProducer.get(
editor,
resourceContentService,
this.workspaceApi,
this.vscodeWorkspace,
this.backendProxy,
this.notificationsApi,
this.vscodeNotifications,
this.javaCodeCompletionApi,
this.viewType,
this.i18n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class VsCodeKieEditorsCustomEditorProvider implements CustomEditorProvide
private readonly editorStore: VsCodeKieEditorStore,
private readonly editorFactory: VsCodeKieEditorControllerFactory,
private readonly vsCodeI18n: I18n<VsCodeI18n>,
private readonly vscodeNotificationsApi: VsCodeNotificationsChannelApiImpl,
private readonly vscodeNotifications: VsCodeNotificationsChannelApiImpl,
private readonly editorEnvelopeLocator: EditorEnvelopeLocator
) {}

Expand All @@ -75,7 +75,7 @@ export class VsCodeKieEditorsCustomEditorProvider implements CustomEditorProvide
this.resolveBackupUri(openContext.backupId),
this.editorStore,
this.vsCodeI18n,
this.vscodeNotificationsApi,
this.vscodeNotifications,
this.editorEnvelopeLocator
);
this.setupListeners(document);
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-extension/src/generateSvg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const encoder = new TextEncoder();

export async function generateSvg(args: {
editorStore: VsCodeKieEditorStore;
workspaceApi: VsCodeWorkspaceChannelApiImpl;
vscodeWorkspace: VsCodeWorkspaceChannelApiImpl;
vsCodeI18n: I18n<VsCodeI18n>;
displayNotification: boolean;
editorEnvelopeLocator: EditorEnvelopeLocator;
Expand Down Expand Up @@ -94,7 +94,7 @@ export async function generateSvg(args: {
return;
}

args.workspaceApi.openFile(svgUri.fsPath);
args.vscodeWorkspace.openFile(svgUri.fsPath);
});
}
}
4 changes: 2 additions & 2 deletions packages/vscode-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export async function startExtension(args: {
vscode.commands.registerCommand(args.generateSvgCommandId, () =>
generateSvg({
editorStore,
workspaceApi,
vscodeWorkspace: workspaceApi,
vsCodeI18n: i18n,
displayNotification: true,
editorEnvelopeLocator: args.editorEnvelopeLocator,
Expand All @@ -138,7 +138,7 @@ export async function startExtension(args: {
vscode.commands.registerCommand(args.silentlyGenerateSvgCommandId, () =>
generateSvg({
editorStore,
workspaceApi,
vscodeWorkspace: workspaceApi,
vsCodeI18n: i18n,
displayNotification: false,
editorEnvelopeLocator: args.editorEnvelopeLocator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { NotificationsApiVsCodeI18nDictionary } from "./i18n";

export class PopupMessagesNotificationHandler {
constructor(
private readonly workspaceApi: VsCodeWorkspaceChannelApiImpl,
private readonly vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
private readonly i18n: I18n<NotificationsApiVsCodeI18nDictionary>
) {}

Expand Down Expand Up @@ -69,7 +69,7 @@ export class PopupMessagesNotificationHandler {
if (!selected) {
return;
}
this.workspaceApi.openFile(normalizedPosixPathRelativeToTheWorkspaceRoot);
this.vscodeWorkspace.openFile(normalizedPosixPathRelativeToTheWorkspaceRoot);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class VsCodeNotificationsChannelApiImpl {
private readonly strategies;

constructor(
private readonly workspaceApi: VsCodeWorkspaceChannelApiImpl,
private readonly vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
private readonly i18n = new I18n(
notificationsApiVsCodeI18nDefaults,
notificationsApiVsCodeI18nDictionaries,
Expand All @@ -39,7 +39,7 @@ export class VsCodeNotificationsChannelApiImpl {
) {
this.strategies = {
PROBLEM: new ProblemsTabNotificationHandler(),
ALERT: new PopupMessagesNotificationHandler(this.workspaceApi, this.i18n),
ALERT: new PopupMessagesNotificationHandler(this.vscodeWorkspace, this.i18n),
};
}

Expand Down

0 comments on commit 7c55d46

Please sign in to comment.