/// <summary> /// Initializes a new instance of the <see cref="ServiceToolWindowControl"/> class. /// </summary> public ServiceToolWindowControl(ToolWindowContext context) { this.InitializeComponent(); this.Focusable = true; this.GotFocus += TermWindowControl_GotFocus; var target = new TerminalEvent(context.Package, this.terminalView, context.SolutionUtils); this.rpc = JsonRpc.Attach(context.ServiceHubStream, target); this.package = context.Package; this.solutionUtils = context.SolutionUtils; }
internal TerminalScriptingObject( TermWindowPackage package, JsonRpc ptyService, SolutionUtils solutionUtils, string workingDirectory, bool useSolutionDir, string shellPath, IEnumerable <string> args, IDictionary <string, string> env) { this.package = package; this.ptyService = ptyService; this.solutionUtils = solutionUtils; this.workingDirectory = workingDirectory; this.useSolutionDir = useSolutionDir; this.shellPath = shellPath; this.args = args; this.env = env; }
protected override async Task <object> InitializeToolWindowAsync(Type toolWindowType, int id, CancellationToken cancellationToken) { await this.JoinableTaskFactory.SwitchToMainThreadAsync(); var solutionService = (IVsSolution)await this.GetServiceAsync(typeof(SVsSolution)); var componentModel = (IComponentModel)await this.GetServiceAsync(typeof(SComponentModel)); var workspaceService = componentModel.GetService <IVsFolderWorkspaceService>(); var solutionUtils = new SolutionUtils(solutionService, workspaceService); var client = new HubClient(); var clientStream = await client.RequestServiceAsync("wwt.pty"); return(new ToolWindowContext() { Package = this, ServiceHubStream = clientStream, SolutionUtils = solutionUtils, }); }
public SolutionEvents(IVsSolution solutionService, SolutionUtils solutionUtils) { this.solutionService = solutionService; this.solutionUtils = solutionUtils; }
public TerminalEvent(TermWindowPackage package, BetterBrowser browser, SolutionUtils solutionUtils) { this.package = package; this.browser = browser; }