コード例 #1
0
			public void FileRename (object sender, FileCopyEventArgs e)
			{
				foreach (FileCopyEventInfo args in e) {
					foreach (Change change in changes) {
						var replaceChange = change as TextReplaceChange;
						if (replaceChange == null)
							continue;
						if (args.SourceFile == replaceChange.FileName)
							replaceChange.FileName = args.TargetFile;
					}
				}
			}
コード例 #2
0
        static void OnFileRenamed(FileCopyEventArgs args)
        {
            foreach (FileCopyEventInfo fi in args)
            {
                if (fi.IsDirectory)
                {
                    Counters.DirectoriesRenamed++;
                }
                else
                {
                    Counters.FilesRenamed++;
                }
            }

            eventQueue.RaiseEvent(() => FileRenamed, args);
        }
コード例 #3
0
        static void OnFileRenamed(FileCopyEventArgs args)
        {
            if (args.IsDirectory)
            {
                Counters.DirectoriesRenamed++;
            }
            else
            {
                Counters.FilesRenamed++;
            }

            if (FileRenamed != null)
            {
                FileRenamed(null, args);
            }
        }
コード例 #4
0
 static void OnFileMoved(FileCopyEventArgs args)
 {
     eventQueue.RaiseEvent(FileMoved, args);
 }
コード例 #5
0
 internal void OnFileRenamed(FileCopyEventArgs args)
 {
     FileRenamed?.Invoke(this, args);
 }
コード例 #6
0
 void OnFolderRenamed(object sender, FileCopyEventArgs e)
 {
     ProjectFolder f = (ProjectFolder) sender;
     ITreeBuilder tb = Context.GetTreeBuilder (f.Parent);
     if (tb != null) tb.UpdateAll ();
 }
コード例 #7
0
		void OnSystemFileRenamed (object sender, FileCopyEventArgs args)
		{
			foreach (FileCopyEventInfo e in args) {
				Project project = GetProjectForFile (e.SourceFile);
				if (project == null) return;
				
				if (e.IsDirectory) {
	/*				string childPath;
					ITreeBuilder tb = FindParentFolderNode (e.SourceFile, project, out childPath);
					if (tb != null && tb.Options ["ShowAllFiles"]) {
						tb.UpdateAll ();
					}
	*/
				} else {
					ITreeBuilder tb = Context.GetTreeBuilder (new SystemFile (e.SourceFile, project));
					if (tb != null) {
						tb.Remove (true);
						tb.AddChild (new SystemFile (e.TargetFile, project));
					}
				}
			}
		}
コード例 #8
0
ファイル: ProjectFolder.cs プロジェクト: Kalnor/monodevelop
        void OnFileRenamed(object sender, FileCopyEventArgs e)
        {
            // The folder path can't be updated because we would be changing
            // the identity of the object. Another folder object will need
            // to be created by updating the tree.

            var e2 = new FileCopyEventArgs (e.Where (i => i.IsDirectory && i.SourceFile == absolutePath));
            if (e2.Count > 0 && FolderRenamed != null)
                FolderRenamed (this, e);
        }
コード例 #9
0
		static void OnFileRenamed (FileCopyEventArgs args)
		{
			foreach (FileCopyEventInfo fi in args) {
				if (fi.IsDirectory)
					Counters.DirectoriesRenamed++;
				else
					Counters.FilesRenamed++;
			}

			eventQueue.RaiseEvent (() => FileRenamed, args);
		}
コード例 #10
0
		void OnFileRenamed (object sender, FileCopyEventArgs e)
		{
			if (!e.IsDirectory || e.SourceFile != absolutePath) return;

			// The folder path can't be updated because we would be changing
			// the identity of the object. Another folder object will need
			// to be created by updating the tree.
			
			if (FolderRenamed != null) 
				FolderRenamed (this, e);
		}
コード例 #11
0
 static void OnFileCopied(FileCopyEventArgs args)
 {
     eventQueue.RaiseEvent(() => FileCopied, args);
 }
コード例 #12
0
		void CheckRenamedFile(object sender, FileCopyEventArgs e)
		{
			if (e.IsDirectory) {
				foreach (IViewContent content in viewContentCollection) {
					if (content.ContentName != null && content.ContentName.StartsWith(e.SourceFile)) {
						content.ContentName = e.TargetFile + content.ContentName.Substring(e.SourceFile.Length);
					}
				}
			} else {
				foreach (IViewContent content in viewContentCollection) {
					if (content.ContentName != null &&
					    content.ContentName == e.SourceFile) {
						content.ContentName = e.TargetFile;
						return;
					}
				}
			}
		}
コード例 #13
0
		void HandleMonoDevelopCoreFileServiceFileRenamed (object sender, FileCopyEventArgs e)
		{
			foreach(FileCopyEventInfo evInfo in e.ToList())
			{
				if(!evInfo.IsDirectory)
				{
					MonoDevelop.Core.LoggingService.LogInfo ("Renamed {0} to {1}", 
						evInfo.SourceFile.FileName, evInfo.TargetFile.FileName);
					client.SendFilePath (evInfo.SourceFile, evInfo.TargetFile, EventType.Move);
				}
			}
		}
コード例 #14
0
		public void InformFileRenamed (object sender, FileCopyEventArgs e)
		{
			if (!e.IsDirectory) {
				recentFiles.RenameItem (RecentFileStorage.ToUri (e.SourceFile), RecentFileStorage.ToUri (e.TargetFile));
				OnRecentFileChange();
			}
		}
コード例 #15
0
ファイル: DesktopService.cs プロジェクト: poke/monodevelop
		static void NotifyFileRenamed (object sender, FileCopyEventArgs args)
		{
			foreach (FileCopyEventInfo e in args) {
				if (!e.IsDirectory) {
					platformService.RecentFiles.NotifyFileRenamed (e.SourceFile, e.TargetFile);
				}
			}
		}
コード例 #16
0
 void CheckRenamedFile(object sender, FileCopyEventArgs args)
 {
     foreach (FileCopyEventInfo e in args) {
         if (e.IsDirectory) {
             foreach (IViewContent content in viewContentCollection) {
                 if (content.ContentName != null && ((FilePath)content.ContentName).IsChildPathOf (e.SourceFile)) {
                     content.ContentName = e.TargetFile.Combine (((FilePath) content.ContentName).FileName);
                 }
             }
         } else {
             foreach (IViewContent content in viewContentCollection) {
                 if (content.ContentName != null &&
                     content.ContentName == e.SourceFile) {
                     content.ContentName = e.TargetFile;
                     return;
                 }
             }
         }
     }
 }
コード例 #17
0
		static void OnFileMoved (FileCopyEventArgs args)
		{
			eventQueue.RaiseEvent (() => FileMoved, args);
		}