Skip to content

Commit

Permalink
trace-explorer: add to default layout
Browse files Browse the repository at this point in the history
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 <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed Jun 18, 2020
1 parent d9a61a1 commit de7bd5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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<TraceExplorerWidget> implements FrontendApplicationContribution {

export class TraceExplorerContribution extends AbstractViewContribution<TraceExplorerWidget> {
constructor() {
super({
widgetId: TRACE_EXPLORER_ID,
Expand All @@ -12,4 +14,9 @@ export class TraceExplorerContribution extends AbstractViewContribution<TraceExp
toggleCommandId: 'trace-explorer:toggle'
});
}

async initializeLayout(_app: FrontendApplication): Promise<void> {
await this.openView({ activate: false });
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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>(TraceExplorerWidget)
Expand Down

0 comments on commit de7bd5a

Please sign in to comment.