From de7bd5a09488c78c8a136e6bd43418a84888f7d0 Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Thu, 18 Jun 2020 10:35:42 -0400 Subject: [PATCH] trace-explorer: add to default layout Fixes: #80 The following commit adds the `Trace Explorer` to the default layout of the application. This will make the view more discoverable and accessible to end-users. Signed-off-by: vince-fugnitto --- .../trace-explorer/trace-explorer-contribution.ts | 9 ++++++++- .../browser/trace-viewer/trace-viewer-frontend-module.ts | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/viewer-prototype/src/browser/trace-explorer/trace-explorer-contribution.ts b/viewer-prototype/src/browser/trace-explorer/trace-explorer-contribution.ts index 369b770ab..c8091ea8b 100644 --- a/viewer-prototype/src/browser/trace-explorer/trace-explorer-contribution.ts +++ b/viewer-prototype/src/browser/trace-explorer/trace-explorer-contribution.ts @@ -1,7 +1,9 @@ import { AbstractViewContribution } from "@theia/core/lib/browser/shell/view-contribution"; import { TraceExplorerWidget, TRACE_EXPLORER_ID, TRACE_EXPLORER_LABEL } from "./trace-explorer-widget"; +import { FrontendApplicationContribution, FrontendApplication } from "@theia/core/lib/browser"; + +export class TraceExplorerContribution extends AbstractViewContribution implements FrontendApplicationContribution { -export class TraceExplorerContribution extends AbstractViewContribution { constructor() { super({ widgetId: TRACE_EXPLORER_ID, @@ -12,4 +14,9 @@ export class TraceExplorerContribution extends AbstractViewContribution { + await this.openView({ activate: false }); + } + } \ No newline at end of file diff --git a/viewer-prototype/src/browser/trace-viewer/trace-viewer-frontend-module.ts b/viewer-prototype/src/browser/trace-viewer/trace-viewer-frontend-module.ts index ef58228c0..5f9d37c55 100644 --- a/viewer-prototype/src/browser/trace-viewer/trace-viewer-frontend-module.ts +++ b/viewer-prototype/src/browser/trace-viewer/trace-viewer-frontend-module.ts @@ -44,7 +44,7 @@ export default new ContainerModule(bind => { bindViewContribution(bind, TraceExplorerContribution); bind(TraceExplorerWidget).toSelf(); - // bind(FrontendApplicationContribution).toService(TraceExplorerContribution); + bind(FrontendApplicationContribution).toService(TraceExplorerContribution); bind(WidgetFactory).toDynamicValue(context => ({ id: TRACE_EXPLORER_ID, createWidget: () => context.container.get(TraceExplorerWidget)