Ejemplo n.º 1
0
		internal CrossPlatformWizard(
			IPlatformProvider platformProvider,
			ISolutionExplorer solutionExplorer)
		{
			this.platformProvider = platformProvider;
			this.solutionExplorer = solutionExplorer;
		}
Ejemplo n.º 2
0
        void SatifyDependencies()
        {
            if (solutionExplorer == null)
            {
                solutionExplorer = ServiceLocator.Global.GetExport <ISolutionExplorer>();
            }

            if (platformProvider == null)
            {
                platformProvider = ServiceLocator.Global.GetExport <IPlatformProvider>();
            }

            if (uiShell == null)
            {
                uiShell = ServiceLocator.Global.GetService <SVsUIShell, IVsUIShell>();
            }

            if (packageInstaller == null)
            {
                packageInstaller = ServiceLocator.Global.GetExport <IVsPackageInstaller>();
            }

            if (packageInstallerServices == null)
            {
                packageInstallerServices = ServiceLocator.Global.GetExport <IVsPackageInstallerServices>();
            }
        }
Ejemplo n.º 3
0
        public override void TestInitialize()
        {
            base.TestInitialize();

            this.explorer = base.ServiceLocator.GetInstance <ISolutionExplorer>();
            this.OpenSolution("SampleSolution\\SampleSolution.sln");
            this.explorer.Solution.Select();
        }
Ejemplo n.º 4
0
 public TestRunner(ITestsExtractor testsExtractor,
     ITestExecutorScriptEngine testExecutorScriptEngine,
     ISolutionExplorer solutionExplorer)
 {
     _testsExtractor = testsExtractor;
     _testExecutorScriptEngine = testExecutorScriptEngine;
     _solutionExplorer = solutionExplorer;
 }
Ejemplo n.º 5
0
 internal MultiPlatformWizard(
     IPlatformProvider platformProvider,
     ISolutionExplorer solutionExplorer,
     IVsUIShell uiShell)
 {
     this.platformProvider = platformProvider;
     this.solutionExplorer = solutionExplorer;
     this.uiShell          = uiShell;
 }
Ejemplo n.º 6
0
		public VsSolutionSelectionSpec (OpenSolution11Fixture fixture)
		{
			this.fixture = fixture;
			selection = GlobalServices.Instance.GetServiceLocator ().GetExport<IVsSolutionSelection> ();
			explorer = GlobalServices.Instance.GetServiceLocator ().GetExport<ISolutionExplorer> ();

			// Clear previous selections before running tests.
			fixture.Solution.Select (false);
		}
Ejemplo n.º 7
0
        public VsSolutionSelectionSpec(OpenSolution11Fixture fixture)
        {
            this.fixture = fixture;
            selection    = GlobalServices.Instance.GetServiceLocator().GetExport <IVsSolutionSelection>();
            explorer     = GlobalServices.Instance.GetServiceLocator().GetExport <ISolutionExplorer>();

            // Clear previous selections before running tests.
            fixture.Solution.Select(false);
        }
        public void Init(Workspace myWorkspace)
        {
            var nUnitTestExtractor = new NUnitTestExtractor();
            _solutionExplorer = new SolutionExplorer(new RewrittenDocumentsStorage(), myWorkspace);
            _auditVariablesRewriter = new AuditVariablesRewriter(new AuditVariablesWalker(), nUnitTestExtractor);
            _coverageStore = new SqlCompactCoverageStore();
            var settingsStore = new XmlCoverageSettingsStore();
            _testExplorer = new TestExplorer(_solutionExplorer, nUnitTestExtractor, _coverageStore, settingsStore);

        }
 public TestExplorer(ISolutionExplorer solutionExplorer, 
     ITestsExtractor testsExtractor, 
     ICoverageStore coverageStore,
     ICoverageSettingsStore coverageSettingsStore)
 {
     _solutionExplorer = solutionExplorer;
     _testsExtractor = testsExtractor;
     _coverageStore = coverageStore;
     _coverageSettingsStore = coverageSettingsStore;
 }
        public AddPlatformImplementationCommand(
			ISolutionExplorer solutionExplorer,
			IPlatformProvider platformProvider,
			IDialogService dialogService)
            : base(Commands.AddPlatformImplementationCommandId)
        {
            this.solutionExplorer = solutionExplorer;
            this.platformProvider = platformProvider;
            this.dialogService = dialogService;
        }
        public void Activation()
        {
            var shell = IoC.Get <IShell>();

            shell.AddDocument(this);
            shell.SolutionChanged += ShellOnSolutionChanged;

            //LoadNewsFeed().GetAwaiter().GetResult();
            //LoadVideoFeed().GetAwaiter().GetResult();
            _solutionExplorer = IoC.Get <ISolutionExplorer>();
        }
        public void Setup()
        {
            _solutionExplorerMock = Substitute.For<ISolutionExplorer>();
            _testExtractorMock = Substitute.For<ITestsExtractor>();
            _settingsStoreMock = Substitute.For<ICoverageSettingsStore>();
            _coverageStoreMock = Substitute.For<ICoverageStore>();

            _settingsStoreMock.Read().Returns(new CoverageSettings());

            _sut = new TestExplorer(_solutionExplorerMock, _testExtractorMock, _coverageStoreMock, _settingsStoreMock);
        }
Ejemplo n.º 13
0
 public VSFake(ITargetAdapter targetAdapter, IProjectAdapter projectAdapter,
               ISessionDebugManager sessionDebugManager, ISolutionExplorer solutionExplorer,
               IDebugSession debugSession, VSFakeTimeoutSource timeouts)
 {
     TargetAdapter       = targetAdapter;
     ProjectAdapter      = projectAdapter;
     SessionDebugManager = sessionDebugManager;
     SolutionExplorer    = solutionExplorer;
     DebugSession        = debugSession;
     Timeouts            = timeouts;
 }
 public AddPlatformImplementationCommand(
     ISolutionExplorer solutionExplorer,
     IPlatformProvider platformProvider,
     IDialogService dialogService,
     IVsPackageInstaller packageInstaller,
     IVsPackageInstallerServices packageInstallerServices)
     : base(Commands.AddPlatformImplementationCommandId)
 {
     this.solutionExplorer         = solutionExplorer;
     this.platformProvider         = platformProvider;
     this.dialogService            = dialogService;
     this.packageInstaller         = packageInstaller;
     this.packageInstallerServices = packageInstallerServices;
 }
Ejemplo n.º 15
0
 public CreateNuGetPackageCommand(
     ISolutionExplorer solutionExplorer,
     IDialogService dialogService,
     IVsPackageInstaller packageInstaller,
     IVsPackageInstallerServices packageInstallerServices,
     IBuildService msBuildService)
     : base(Commands.CreateNuGetPackageCommandId)
 {
     this.solutionExplorer         = solutionExplorer;
     this.dialogService            = dialogService;
     this.packageInstaller         = packageInstaller;
     this.packageInstallerServices = packageInstallerServices;
     this.buildService             = msBuildService;
 }
        public virtual ISolutionExplorer GetSolutionExplorer()
        {
            if (_solutionExplorer == null)
            {
                JoinableTaskContext taskContext = GetJoinableTaskContext();
                var vcProjectAdapterFactory     = new VcProjectAdapter.Factory();
                var dte2 = Package.GetGlobalService(typeof(DTE)) as DTE2;
                var envDteUtilFactory = new EnvDteUtil.Factory();
                var envDteUtil        = envDteUtilFactory.Create(taskContext, dte2);
                _solutionExplorer =
                    new SolutionExplorer(taskContext, vcProjectAdapterFactory, envDteUtil);
            }

            return(_solutionExplorer);
        }
Ejemplo n.º 17
0
        public WelcomeScreenViewModel(ISolutionExplorer solutionExplorer)
        {
            Title = "Start Page";

            _solutionExplorer = solutionExplorer;

            _recentProjects = new ObservableCollection <RecentProjectViewModel>();
            _newsFeed       = new ObservableCollection <NewsFeedViewModel>();
            _videoFeed      = new ObservableCollection <VideoFeedViewModel>();

            NewSolution  = ReactiveCommand.Create(_solutionExplorer.NewSolution);
            OpenSolution = ReactiveCommand.Create(_solutionExplorer.OpenSolution);

            LoadRecentProjects();
        }
Ejemplo n.º 18
0
        public void Activation()
        {
            var shell = IoC.Get <IShell>();

            shell.AddDocument(this, false);

            _disposables = new CompositeDisposable
            {
                Observable.FromEventPattern <SolutionChangedEventArgs>(shell, nameof(shell.SolutionChanged)).Subscribe(o => ShellOnSolutionChanged(o.Sender, o.EventArgs))
            };
            //shell.SolutionChanged += ShellOnSolutionChanged;

            //LoadNewsFeed().GetAwaiter().GetResult();
            //LoadVideoFeed().GetAwaiter().GetResult();
            _solutionExplorer = IoC.Get <ISolutionExplorer>();
        }
Ejemplo n.º 19
0
        public ProjectNodeProvider(
            JoinableTaskContext jtc,
            UnconfiguredProject unconfiguredProject,
            ISolutionExplorer solutionExplorer)
        {
            this.jtc = jtc;
            this.unconfiguredProject = unconfiguredProject;
            this.solutionExplorer    = solutionExplorer;

            projectNode = new JoinableLazy <IProjectNode>(async() =>
                                                          (await solutionExplorer.Solution)
                                                          .FindProject(x => string.Equals(
                                                                           x.PhysicalPath,
                                                                           unconfiguredProject.FullPath,
                                                                           StringComparison.OrdinalIgnoreCase)), jtc.Factory);
        }
Ejemplo n.º 20
0
        public override ISolutionExplorer GetSolutionExplorer()
        {
            if (_solutionExplorer != null)
            {
                return(_solutionExplorer);
            }

            var taskContext       = GetJoinableTaskContext();
            var dte2              = Substitute.For <DTE2>();
            var envDteUtilFactory = new EnvDteUtil.Factory();
            var dte2Util          = envDteUtilFactory.Create(taskContext, dte2);

            _solutionExplorer = new SolutionExplorer(taskContext, null, dte2Util);

            return(_solutionExplorer);
        }
Ejemplo n.º 21
0
        public SolutionExtensionsSpec()
        {
            var solution = new FakeSolution
            {
                Nodes =
                {
                    new FakeSolutionFolder("Solution Items")
                    {
                        Nodes =
                        {
                            new FakeSolutionItem("Readme.md"),
                        }
                    },
                    new FakeSolutionFolder("CSharp")
                    {
                        Nodes =
                        {
                            new FakeProject("CsConsole")
                            {
                                Nodes =
                                {
                                    new FakeItem("Class1.cs"),
                                }
                            }
                        }
                    },
                    new FakeSolutionFolder("VB")
                    {
                        Nodes =
                        {
                            new FakeProject("VbConsole")
                            {
                                Nodes =
                                {
                                    new FakeItem("Class1.vb"),
                                }
                            }
                        }
                    },
                }
            };

            explorer = new FakeSolutionExplorer
            {
                Solution = Awaitable.Create <ISolutionNode>(async() => solution)
            };
        }
        public given_a_solution()
        {
            explorer = new FakeSolutionExplorer
            {
                Solution = new FakeSolution
                {
                    Nodes =
                    {
                        new FakeSolutionFolder("Solution Items")
                        {
                            Nodes = 
                            {
                                new FakeSolutionItem("Readme.md"),
                            }
                        },
                        new FakeSolutionFolder("CSharp")
                        {
                            Nodes = 
                            {
                                new FakeProject("CsConsole")
                                {
                                    Nodes = 
                                    {
                                        new FakeItem("Class1.cs"),
                                    }
                                }
                            }
                        },
                        new FakeSolutionFolder("VB")
                        {
                            Nodes = 
                            {
                                new FakeProject("VbConsole")
                                {
                                    Nodes = 
                                    {
                                        new FakeItem("Class1.vb"),
                                    }
                                }
                            }
                        },
                    }
                }
            };

        }
Ejemplo n.º 23
0
        public void Activation()
        {
            var shell  = IoC.Get <IShell>();
            var studio = IoC.Get <IStudio>();

            shell.AddOrSelectDocument(this);

            _disposables = new CompositeDisposable
            {
                Observable.FromEventPattern <SolutionChangedEventArgs>(studio, nameof(studio.SolutionChanged)).Subscribe(o => ShellOnSolutionChanged(o.Sender, o.EventArgs))
            };
            //shell.SolutionChanged += ShellOnSolutionChanged;

            LoadNewsFeed();
            //LoadVideoFeed();
            _solutionExplorer = IoC.Get <ISolutionExplorer>();
        }
Ejemplo n.º 24
0
 public SolutionExtensionsSpec()
 {
     explorer = new FakeSolutionExplorer
     {
         Solution = new FakeSolution
         {
             Nodes =
             {
                 new FakeSolutionFolder("Solution Items")
                 {
                     Nodes =
                     {
                         new FakeSolutionItem("Readme.md"),
                     }
                 },
                 new FakeSolutionFolder("CSharp")
                 {
                     Nodes =
                     {
                         new FakeProject("CsConsole")
                         {
                             Nodes =
                             {
                                 new FakeItem("Class1.cs"),
                             }
                         }
                     }
                 },
                 new FakeSolutionFolder("VB")
                 {
                     Nodes =
                     {
                         new FakeProject("VbConsole")
                         {
                             Nodes =
                             {
                                 new FakeItem("Class1.vb"),
                             }
                         }
                     }
                 },
             }
         }
     };
 }
Ejemplo n.º 25
0
        public BuildCommands(
            ISolutionExplorer solutionExplorer,
            CommandIconService commandIconService)
        {
            _studio           = IoC.Get <IStudio>();
            _solutionExplorer = solutionExplorer;

            var shellCanRunTask = _studio.CanRunTask();

            BuildCommand = new CommandDefinition(
                "Build",
                commandIconService.GetCompletionKindImage("Build"),
                ReactiveCommand.Create(_studio.Build, shellCanRunTask));

            CleanCommand = new CommandDefinition(
                "Clean",
                commandIconService.GetCompletionKindImage("Clean"),
                ReactiveCommand.Create(_studio.Clean, shellCanRunTask));
        }
Ejemplo n.º 26
0
        public SolutionExplorerCommands(ISolutionExplorer solutionExplorer)
        {
            _shell            = IoC.Get <IShell>();
            _studio           = IoC.Get <IStudio>();
            _solutionExplorer = solutionExplorer;

            NewSolutionCommand = new CommandDefinition(
                "New Solution", null, ReactiveCommand.Create(_solutionExplorer.NewSolution));

            OpenSolutionCommand = new CommandDefinition(
                "Open Solution", null, ReactiveCommand.Create(_solutionExplorer.OpenSolution));

            CloseSolutionCommand = new CommandDefinition(
                "Close Solution", null, ReactiveCommand.Create(
                    _studio.CloseSolutionAsync, _studio.OnSolutionChanged.Select(s => s != null)));

            ViewSolutionExplorerCommand = new CommandDefinition("Solution Explorer", null,
                                                                ReactiveCommand.Create(() =>
            {
                _shell.CurrentPerspective.AddOrSelectTool(_solutionExplorer);
            }));
        }
Ejemplo n.º 27
0
 public CommitCommandHandler(IShell shell, ISolutionExplorer solutionExplorer) : base(shell, solutionExplorer)
 {
 }
Ejemplo n.º 28
0
 public MsBuildAdapter(IVsSolution vsSolution, ISolutionExplorerNodeFactory nodeFactory, ISolutionExplorer solutionExplorer)
 {
     this.vsSolution       = vsSolution;
     this.nodeFactory      = nodeFactory;
     this.solutionExplorer = solutionExplorer;
 }
        public void Setup()
        {
            _solutionExplorerMock = Substitute.For<ISolutionExplorer>();
            _testExecutorEngineMock = Substitute.For<ITestExecutorScriptEngine>();
            _testExtractorMock = Substitute.For<ITestsExtractor>();

            _sut = new TestRunner(_testExtractorMock, _testExecutorEngineMock, _solutionExplorerMock);
        }
Ejemplo n.º 30
0
 protected static string GetFileName(ISolutionExplorer solutionExplorer) => (solutionExplorer.SelectedItem?.Tag) switch
 {
 public ViewSolutionExplorerToolCommandHandler(IShell shell, ISolutionExplorer solutionExplorer)
 {
     _shell            = shell;
     _solutionExplorer = solutionExplorer;
 }
Ejemplo n.º 32
0
 public RunFactorioCommandHandler(IShell shell, ISolutionExplorer solutionExplorer, IFactorioStandardOutput output)
 {
     _shell            = shell;
     _solutionExplorer = solutionExplorer;
     _output           = output;
 }
Ejemplo n.º 33
0
 public NewFactorioProjectMenuCommandHandler(IWindowManager windowManager, NewProjectSettingsViewModel newProjectDialog, ISolutionExplorer solutionExplorer)
 {
     _windowManager    = windowManager;
     _newProjectDialog = newProjectDialog;
     _solutionExplorer = solutionExplorer;
 }
Ejemplo n.º 34
0
		public SolutionContext(ISolutionExplorer solutionExplorer)
		{
			this.solutionExplorer = solutionExplorer;
		}
Ejemplo n.º 35
0
		void SatifyDependencies()
		{
			if (solutionExplorer == null)
				solutionExplorer = ServiceLocator.Global.GetExport<ISolutionExplorer>();

			if (platformProvider == null)
				platformProvider = ServiceLocator.Global.GetExport<IPlatformProvider>();
		}
Ejemplo n.º 36
0
 public VsHierarchySelectionSpec(OpenSolution11Fixture fixture)
 {
     this.fixture = fixture;
     selection    = GlobalServices.Instance.GetServiceLocator().GetExport <IVsHierarchySelection>();
     explorer     = GlobalServices.Instance.GetServiceLocator().GetExport <ISolutionExplorer>();
 }
Ejemplo n.º 37
0
 public StopFactorioCommandHandler(ISolutionExplorer solutionExplorer)
 {
     _solutionExplorer = solutionExplorer;
 }
 public OpenFactorioProjectMenuCommandHandler(IShell shell, [ImportMany] IProjectProvider[] projectProviders, ISolutionExplorer solutionExplorer)
 {
     _shell            = shell;
     _projectProviders = projectProviders;
     _solutionExplorer = solutionExplorer;
 }
Ejemplo n.º 39
0
 protected GitCommandHandlerBase(IShell shell, ISolutionExplorer solutionExplorer)
 {
     Shell            = shell;
     SolutionExplorer = solutionExplorer;
 }
 public BuildNuGetPackageCommand(ISolutionExplorer solutionExplorer, IDialogService dialogService)
     : base(Commands.BuildNuGetPackageCommandId)
 {
     this.solutionExplorer = solutionExplorer;
     this.dialogService = dialogService;
 }
Ejemplo n.º 41
0
 public SolutionContext(ISolutionExplorer solutionExplorer)
 {
     this.solutionExplorer = solutionExplorer;
 }
        public void Setup()
        {
            _compilerMock = Substitute.For<ICompiler>();
            _solutionExplorerMock = Substitute.For<ISolutionExplorer>();
            _testRunnerMock = Substitute.For<ITestRunner>();
            _compiledAllItems = new List<ICompiledItem>();
            _compiledSingleProjectItems=new List<ICompiledItem>();
            _testExplorerMock = Substitute.For<ITestExplorer>();

            _testExplorerMock.SolutionExplorer.Returns(_solutionExplorerMock);

            _sut = new LineCoverageCalc(_testExplorerMock,
                _compilerMock,
                _testRunnerMock);

            _compilerMock.Compile(Arg.Any<CompilationItem>(), Arg.Any<IEnumerable<string>>())
                .Returns((x) => _compiledSingleProjectItems.ToArray());

            _compilerMock.Compile(Arg.Any<IEnumerable<CompilationItem>>())
                .Returns((x) => _compiledAllItems.ToArray());
        }
 public OpenFactrIDESolutionMenuCommandHandler(IShell shell, [ImportMany] ISolutionProvider[] solutionProviders, ISolutionExplorer solutionExplorer)
 {
     _shell             = shell;
     _solutionProviders = solutionProviders;
     _solutionExplorer  = solutionExplorer;
 }
Ejemplo n.º 44
0
		public VsHierarchySelectionSpec (OpenSolution11Fixture fixture)
		{
			this.fixture = fixture;
			selection = GlobalServices.Instance.GetServiceLocator ().GetExport<IVsHierarchySelection> ();
			explorer = GlobalServices.Instance.GetServiceLocator ().GetExport<ISolutionExplorer> ();
		}