Bugs item #1215045, was opened at 2005-06-05 16:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=474851&aid=1215045&group_id=54790
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Other Group: cvs Status: Open Resolution: None Priority: 5 Submitted By: Sam Garland (samgarland) Assigned to: Nobody/Anonymous (nobody) Summary: No support for Solution Items in SLiNGShoT Initial Comment: To support solution items in SLiNGShoT, the following changes and additions need to be made: Add to Solution.cs: private IList _SolutionItems = new ArrayList(); private void AddSolutionItem(string dependencyLine) { string pattern = @"^\t\t(?<source>\S+) = (?<target>\S+)"; Regex regex = new Regex(pattern); Match match = regex.Match(dependencyLine); if (match.Success) { string target = match.Groups["target"].Value; _SolutionItems.Add( new SolutionItem( this, target ) ); } } public IList GetSolutionItems() { return _SolutionItems; } Update while loop in Read() in Solution.cs: bool projectDependencies = false; bool solutionItems = false; while ((line = streamReader.ReadLine()) != null) { if (line.StartsWith("Project")) { AddProject(line); } else if (line.StartsWith("\tGlobalSection(ProjectDependencies)")) { projectDependencies = true; } else if (projectDependencies && line.StartsWith("\tEndGlobalSection")) { projectDependencies = false; } else if (projectDependencies) { AddDependency(line); } else if (line.StartsWith("\tGlobalSection(SolutionItems)")) { solutionItems = true; } else if (solutionItems && line.StartsWith("\tEndGlobalSection")) { solutionItems = false; } else if (solutionItems) { AddSolutionItem(line); } } Add SolutionItem.cs: // File.cs - the File class // Copyright (C) 2001, 2002 Jason Diamond // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA using System; using System.Collections; using System.IO; using System.Text.RegularExpressions; using System.Xml; using System.Xml.XPath; namespace SLiNgshoT.Core { /// <summary>Represents a solution item.</summary> public class SolutionItem { private Solution _Solution; public string _RelativePath; internal SolutionItem(Solution solution, string relativePath) { _Solution = solution; _RelativePath = relativePath; } /// <summary>Gets the relative path to the file (from the solution directory).</summary> public string RelativePath { get { return _RelativePath; } } /// <summary>Gets the absolute path to the file.</summary> public string AbsolutePath { get { return Path.Combine( _Solution.SolutionDirectory, _RelativePath); } } } } Add to SolutionWriter.cs: void WriteStartSolutionItems(); void WriteSolutionItems(SolutionItem item); void WriteEndSolutionItems(); Add to NAntWriter.cs and NMakeWriter.cs: public void WriteStartSolutionItems() { } public void WriteSolutionItems(SolutionItem item) { } public void WriteEndSolutionItems() { } Add to WriteSolution() in Driver.cs: writer.WriteStartSolutionItems(); foreach(SolutionItem solutionItem in solution.GetSolutionItems() ) writer.WriteSolutionItems(solutionItem); writer.WriteEndSolutionItems(); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=474851&aid=1215045&group_id=54790 ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ NAntContrib-Developer mailing list NAntContrib-Developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer