public void Init() { method = MockMethod.CreateMockMethodWithoutAnyAttributes(); method.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; treeView = new MockTestTreeView(); treeView.SelectedMember = method; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }
public void Init() { MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); c.CompilationUnit.FileName = @"c:\projects\mytest.cs"; treeView = new MockTestTreeView(); treeView.SelectedClass = c; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }
public void Init() { method = MockMethod.CreateMockMethodWithoutAnyAttributes(); method.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; int methodBeginLine = 3; // 1 based. int methodBeginColumn = 6; // 1 based. method.Region = new DomRegion(methodBeginLine, methodBeginColumn); treeView = new MockTestTreeView(); treeView.SelectedMember = method; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }
public void Init() { MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); c.CompilationUnit.FileName = @"c:\projects\mytest.cs"; int beginLine = 3; // 1 based. int beginColumn = 6; // 1 based. c.Region = new DomRegion(beginLine, beginColumn); treeView = new MockTestTreeView(); treeView.SelectedClass = c; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }
private void InitializeInternal() { var page = (DiagnosticsDialogPage)GetDialogPage(typeof(DiagnosticsDialogPage)); if (page.EnableDiagnosticLogging) { DiagnosticConfiguration.EnableDiagnostics(); } Log.Info(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this)); base.Initialize(); var langService = new PowerShellLanguageInfo(this); ((IServiceContainer)this).AddService(langService.GetType(), langService, true); var componentModel = (IComponentModel)GetGlobalService(typeof(SComponentModel)); _textBufferFactoryService = componentModel.GetService <ITextBufferFactoryService>(); EditorImports.ClassificationTypeRegistryService = componentModel.GetService <IClassificationTypeRegistryService>(); EditorImports.ClassificationFormatMap = componentModel.GetService <IClassificationFormatMapService>(); _visualStudioEvents = componentModel.GetService <VisualStudioEvents>(); _visualStudioEvents.SettingsChanged += _visualStudioEvents_SettingsChanged; if (_textBufferFactoryService != null) { _textBufferFactoryService.TextBufferCreated += TextBufferFactoryService_TextBufferCreated; } InitializePowerShellHost(); _gotoDefinitionCommand = new GotoDefinitionCommand(); RefreshCommands(new ExecuteSelectionCommand(), new ExecuteAsScriptCommand(), _gotoDefinitionCommand, new PrettyPrintCommand(Debugger.Runspace), new OpenDebugReplCommand()); }
public void Init() { baseClassMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); baseClassMethod.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; MockClass derivedClass = MockClass.CreateMockClassWithoutAnyAttributes(); derivedClass.CompilationUnit.FileName = @"d:\projects\myderivedtestclass.cs"; int methodBeginLine = 3; // 1 based. int methodBeginColumn = 6; // 1 based. baseClassMethod.Region = new DomRegion(methodBeginLine, methodBeginColumn); BaseTestMember baseTestMethod = new BaseTestMember(derivedClass, baseClassMethod); treeView = new MockTestTreeView(); treeView.SelectedMember = baseTestMethod; fileService = new MockFileService(); gotoDefinitionCommand = new GotoDefinitionCommand(fileService); gotoDefinitionCommand.Owner = treeView; gotoDefinitionCommand.Run(); }