~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ShowAllFilesBuilderExtension.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-10 16:54:48 UTC
  • mfrom: (19.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100910165448-0rybfk25zd4o9431
Tags: 2.4+dfsg-2
* debian/patches/inject_Mono.Debugger.Soft_source.patch,
  debian/patches/use_system_Mono.Debugger.Soft.patch,
  debian/control:
  + Build against system Soft Debugger, since we now have a new
    enough Mono to match MonoDevelop's required API

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
using MonoDevelop.Projects;
35
35
using MonoDevelop.Core;
36
36
using MonoDevelop.Ide.Gui;
37
 
using MonoDevelop.Core.Gui;
38
37
using MonoDevelop.Ide.Gui.Components;
39
38
 
40
39
namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
136
135
                        if (builder.Options ["ShowAllFiles"] && Directory.Exists (path))
137
136
                        {
138
137
                                Project project = (Project) builder.GetParentDataItem (typeof(Project), true);
 
138
                                SolutionFolderFileCollection folderFiles = null;
 
139
                                if (dataObject is Solution)
 
140
                                        folderFiles = ((Solution)dataObject).RootFolder.Files;
 
141
                                else if (dataObject is SolutionFolder)
 
142
                                        folderFiles = ((SolutionFolder)dataObject).Files;
139
143
                                
140
144
                                foreach (string file in Directory.GetFiles (path)) {
141
 
                                        if (project == null || project.Files.GetFile (file) == null)
 
145
                                        if ((project == null || project.Files.GetFile (file) == null) && (folderFiles == null || !folderFiles.Contains (file)))
142
146
                                                builder.AddChild (new SystemFile (file, project));
143
147
                                }
144
148
                                
160
164
                
161
165
                void OnAddFile (object sender, ProjectFileEventArgs e)
162
166
                {
163
 
                        if (!e.ProjectFile.IsExternalToProject) {
 
167
                        if (!e.ProjectFile.IsLink) {
164
168
                                object target;
165
169
                                if (e.ProjectFile.Subtype == Subtype.Directory) {
166
170
                                        target = new ProjectFolder (e.ProjectFile.FilePath, e.Project);
187
191
                void OnRemoveFile (object sender, ProjectFileEventArgs e)
188
192
                {
189
193
                        if (e.ProjectFile.Subtype != Subtype.Directory && 
190
 
                                !e.ProjectFile.IsExternalToProject &&
 
194
                                !e.ProjectFile.IsLink &&
191
195
                                File.Exists (e.ProjectFile.Name)
192
196
                        ) {
193
197
                                AddFile (e.ProjectFile.Name, e.Project);