public void files_for_ripple_solution() { SolutionFiles .FromDirectory(theScenario.DirectoryForSolution("FubuCore")) .Mode .ShouldEqual(SolutionMode.Ripple); }
public void files_for_classic_solution() { SolutionFiles .FromDirectory(theScenario.DirectoryForSolution("HtmlTags")) .Mode .ShouldEqual(SolutionMode.Classic); }
public static ISolutionBuilder NewSolutionBuilder(Solution solution) { var loader = new InMemorySolutionLoader(solution); var files = SolutionFiles.FromDirectory(RippleFileSystem.CurrentDirectory(), loader); return(new SolutionBuilder(files, ProjectReader.Basic())); }
public override bool OnCommand() { if (null == mFiles) { Log.Info("First time fast open is run, scanning solution for files"); mFiles = new SolutionFiles(Plugin); mFiles.Refresh(); } if (null == mDialog) { mDialog = new QuickOpenDialog(mFiles); } if (mDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string name = mDialog.FileToOpen; if (name.Length > 0) { Plugin.App.DTE.ExecuteCommand("File.OpenFile", string.Format("\"{0}\"", name)); } // TODO: Each time here we could save off the window position into the registry and // use it when we open the window the next time around. } return(true); }
public override void AddFiles(params string[] fileNames) { lastAddition = fileNames; SolutionFiles.Add(fileNames); base.AddFiles(fileNames); }
public QuickOpenDialog(SolutionFiles files) { mFiles = files; InitializeComponent(); mSearchResults.SearchSpace = mFiles; mStatusLabel.Text = string.Format("{0} hits", mSearchResults.CandidateCount); Resize += new EventHandler(searchResultControl1_Resize); }
public void UpdateSolution(IVsSolution solution) { SolutionFiles.Clear(); SolutionFiles.Add(GetSolutionFiles()); foreach (var directory in GetRoots(solution)) { UpdateRootStatus(directory); } }
public void files_for_nuget_solution() { using (var sandbox = DirectorySandbox.Create()) { sandbox.CreateFile("MySolution.sln"); sandbox.CreateDirectory("MyProject"); sandbox.CreateFile("MyProject", "MyProject.csproj"); sandbox.CreateFile("MyProject", "packages.config"); SolutionFiles .FromDirectory(sandbox.Directory) .Loader .ShouldBeOfType <NuGetSolutionLoader>(); } }
private void SelectSolutionInner(string fileName) { if (File.Exists(fileName)) { SelectedFilename = fileName; _history.History[fileName] = DateTime.Now; _history.Save(); DialogResult = DialogResult.OK; } else { var fileList = SolutionFiles.ToList(); fileList.Remove(fileName); SolutionFiles = fileList.ToArray(); MessageBox.Show($"The solution file {fileName} no longer exists, and will be removed."); } }
public void files_for_empty_xml_ripple_solution() { using (var sandbox = DirectorySandbox.Create()) { sandbox.StopAtParent(); sandbox.CreateXmlFile("ripple.config"); sandbox.CreateDirectory("src"); sandbox.CreateFile("src", "MySolution.sln"); sandbox.CreateDirectory("src", "MyProject"); sandbox.CreateFile("src", "MyProject", "MyProject.csproj"); SolutionFiles .FromDirectory(sandbox.Directory) .Loader .ShouldBeOfType <XmlSolutionLoader>(); } }
private async void frmOpenSolution_Load(object sender, EventArgs e) { try { _history = SettingsBase.Load <SolutionOpenHistory>(); LoadRecentItems(); llSolutionFolder.Text = SolutionFolder; lblSolutionCount.Visible = false; var solutions = (SolutionFiles?.Any() ?? false) ? SolutionFiles.Select(fileName => new ListItem <string>(fileName, fileName.Substring(SolutionFolder.Length + 1))) : await FindSolutionsAsync(); cbSolution.Fill(solutions); } catch (Exception exc) { MessageBox.Show(exc.Message); } }
public void SetUp() { theSolution = new Solution { Directory = "SolutionFiles" }; theFileSystem = new FileSystem(); theFileSystem.CreateDirectory("SolutionFiles"); theSolutionFiles = new SolutionFiles(theFileSystem, new SolutionLoader()); theSolutionFiles.RootDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SolutionFiles"); theFileSystem.CreateDirectory("SolutionFiles", "src"); theFileSystem.CreateDirectory("SolutionFiles", "src", "Project1"); theFileSystem.CreateDirectory("SolutionFiles", "src", "Project2"); theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project1", "Project1.csproj"), "test"); theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project2", "Project2.csproj"), "test"); }
public void SetUp() { theSolution = new Solution { Directory = "SolutionFiles" }; theFileSystem = new FileSystem(); theFileSystem.CreateDirectory("SolutionFiles"); theSolutionFiles = new SolutionFiles(theFileSystem); theSolutionFiles.RootDir = Path.GetTempPath().AppendRandomPath(); theFileSystem.CreateDirectory("SolutionFiles", "src"); theFileSystem.CreateDirectory("SolutionFiles", "src", "Project1"); theFileSystem.CreateDirectory("SolutionFiles", "src", "Project2"); theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project1", "Project1.csproj"), "test"); theFileSystem.WriteStringToFile(Path.Combine("SolutionFiles", "src", "Project2", "Project2.csproj"), "test"); }
// If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { string buildNumber = BuildNumber.Get(context); string smartFrameworkVersion = context.GetValue <string>(SmartFrameworkVersion); if (String.IsNullOrWhiteSpace(smartFrameworkVersion)) { throw new ArgumentNullException("SmartFrameworkVersion", "In UpdateReferences.Execute, SmartFrameworkVersion is null or whitespace."); } Tuple <bool, string> versionValidation = Util.ValidateFrameworkVersion(smartFrameworkVersion); if (versionValidation.Item1) { List <string> solutionFiles = SolutionFiles.Get(context); Workspace workspace = Workspace.Get(context); ReferenceUpdateManager.UpdateReferences(solutionFiles, versionValidation.Item2, workspace); } else { string message = String.Format("{0} is not a valid Smart Framework version.", smartFrameworkVersion); throw new ArgumentException(message); } }
public override bool Execute(InitInput input) { var rippleConfigDirectory = RippleFileSystem.FindSolutionDirectory(false); if (rippleConfigDirectory.IsNotEmpty()) { RippleAssert.Fail(ExistingSolution.ToFormat(rippleConfigDirectory)); return(false); } SolutionFiles.AddLoader(new NuGetSolutionLoader()); var builder = Builder(); var solution = builder.Build(); solution.Save(true); new CleanCommand().Execute(new CleanInput()); new RestoreCommand().Execute(new RestoreInput { FixReferencesFlag = true }); return(true); }
public override bool OnCommand() { if(null == mFiles) { Log.Info("First time fast open is run, scanning solution for files"); mFiles = new SolutionFiles(Plugin); mFiles.Refresh(); } if(null == mDialog) mDialog = new QuickOpenDialog(mFiles); if(mDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string name = mDialog.FileToOpen; if(name.Length > 0 ) Plugin.App.DTE.ExecuteCommand("File.OpenFile", string.Format("\"{0}\"", name)); // TODO: Each time here we could save off the window position into the registry and // use it when we open the window the next time around. } return true; }
public override void RenameFiles(string[] fileNames, string[] newFileNames) { SolutionFiles.Add(newFileNames); base.RenameFiles(fileNames, newFileNames); }
public override void Clear() { SolutionFiles.Clear(); base.Clear(); }
protected override bool FileChangeIsOfInterest(string fileName) { return(VisualHgOptions.Global.TrackChangesNotInSolution ? base.FileChangeIsOfInterest(fileName) : SolutionFiles.Contains(fileName) && base.FileChangeIsOfInterest(fileName)); }
protected override bool FileChangeIsOfInterest(string fileName) { return(SolutionFiles.Contains(fileName) && base.FileChangeIsOfInterest(fileName)); }
public static PublishingService Basic() { return(new PublishingService(SolutionFiles.Basic())); }
public static ISolutionBuilder Builder() { var files = SolutionFiles.FromDirectory(RippleFileSystem.CurrentDirectory()); return(new SolutionBuilder(files, ProjectReader.Basic())); }