예제 #1
0
 internal protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs args)
 {
     if (FileRenamedInProject != null)
     {
         FileRenamedInProject(this, args);
     }
 }
예제 #2
0
 /// <summary>
 /// Raises the FileRenamedInProject event.
 /// </summary>
 protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     if (FileRenamedInProject != null)
     {
         FileRenamedInProject(this, e);
     }
 }
예제 #3
0
        void IdeApp_Workspace_FileRenamedInProject (object sender, ProjectFileRenamedEventArgs e)
        {
            
            foreach (var file in e) {
               
                if (file.OldName.FileName == file.NewName.FileName) {
                    //a directory filename changed
                    var oldDir = file.OldName.ParentDirectory;
                    var newDir = file.NewName.ParentDirectory;

                    if (!newDir.ToString ().Contains ("Resources")) {
                        return;
                    }

                    while (oldDir.FileName == newDir.FileName) {
                        oldDir = oldDir.ParentDirectory;
                        newDir = newDir.ParentDirectory;
                    }

                    ClearOwnFileErrors (oldDir);
                    CheckDirectoryName (newDir);
                } else {
                    ClearOwnFileErrors (file.OldName);
                    CheckProjectFileName (file.ProjectFile);
                }
            }
        }
예제 #4
0
 void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnFileRenamedInProject(e);
     }
     FileRenamedInProject?.Invoke(this, e);
 }
예제 #5
0
 protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnFileRenamedInProject(e);
     }
     if (FileRenamedInProject != null)
     {
         FileRenamedInProject(this, e);
     }
 }
예제 #6
0
		/// <summary>
		/// Raises the FileRenamedInProject event.
		/// </summary>
		protected virtual void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			if (FileRenamedInProject != null) {
				FileRenamedInProject (this, e);
			}
		}
예제 #7
0
		internal void NotifyFileRenamedInProject (ProjectFileRenamedEventArgs args)
		{
			SetDirty ();
			NotifyModified ("Files");
			OnFileRenamedInProject (args);
		}
예제 #8
0
		void OnRenameFile (object sender, ProjectFileRenamedEventArgs args)
		{
			foreach (ProjectFileEventInfo e in args) {
				ITreeBuilder tb = Context.GetTreeBuilder (e.ProjectFile);
				if (tb != null) tb.Update ();
			}
		}
예제 #9
0
 protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     base.OnFileRenamedInProject (e);
     foreach (ProjectFileRenamedEventInfo item in e)
         if (item.ProjectFile.Subtype == Subtype.Code && item.ProjectFile.BuildAction == BuildAction.Compile)
             typescript.ShimHost.UpdateScript (typescript.GetFilePath (item.OldName), null);
     // FIXME: make sure that adding, removing and then adding the same file still works (as "remove" does not really remove it).
     foreach (ProjectFileRenamedEventInfo item in e)
         if (item.ProjectFile.Subtype == Subtype.Code && item.ProjectFile.BuildAction == BuildAction.Compile)
             typescript.ShimHost.AddScript (typescript.GetFilePath (item.NewName), File.ReadAllText (typescript.GetFilePath (item.NewName)));
 }
예제 #10
0
 internal void NotifyFileRenamedInProject(object sender, ProjectFileRenamedEventArgs e)
 {
     OnFileRenamedInProject(e);
 }
		static void FileRenamed (object sender, ProjectFileRenamedEventArgs e)
		{
			bool changed = false;
			foreach (ProjectFileRenamedEventInfo args in e) {
				foreach (NavigationHistoryItem point in history) {
					DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint;
					changed &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName));
				}
			}
			if (changed)
				OnHistoryChanged ();
		}
예제 #12
0
		protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			base.OnFileRenamedInProject (e);
			if (!Loading && e.ProjectFile.BuildAction == MonoDroidBuildAction.AndroidResource)
				QueueResgenUpdate ();
		}
		void OnRenameFile (object sender, ProjectFileRenamedEventArgs e)
		{
			ITreeBuilder tb = Context.GetTreeBuilder (e.ProjectFile);
			if (tb != null) tb.Update ();
		}
예제 #14
0
		internal protected virtual void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			next.OnFileRenamedInProject (e);
		}
 private void HandleFileRenamed(ProjectFileRenamedEventArgs args)
 {
     foreach (var info in args) {
         RemoveFile(new ProjectFile(info.OldName));
         AddFile(new ProjectFile(info.NewName), info.Project);
     }
 }
        private void ExecuteFileRenamedAction(ProjectFileRenamedEventArgs args)
        {
            if (sourceProject == null) {
                return;
            }

            HandleFileRenamed(args);

            SaveTargetProjects();
        }
예제 #17
0
 		void OnFileRenamedInProject (object s, ProjectFileRenamedEventArgs args)
		{
			if (loading) return;
			
			foreach (ProjectFileRenamedEventInfo e in args) {
				if (e.ProjectFile.BuildAction != BuildAction.Compile)
					continue;
				
				if (RemoveSourceFile (e.OldName))
					AddSourceFile (e.NewName);
			}
		}
 		void OnFileRenamedInProject (object s, ProjectFileRenamedEventArgs e)
		{
			if (loading) return;
			
			if (e.ProjectFile.BuildAction != BuildAction.Compile)
				return;
				
			if (RemoveSourceFile (e.OldName))
				AddSourceFile (e.NewName);
		}
예제 #19
0
        protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
        {
            NeedsFullRebuild = true;
            //FIXME: Bug when renaming files..the new file won't be reachable somehow.. see https://bugzilla.xamarin.com/show_bug.cgi?id=13360
            var fi = Files.GetType().GetField("files",BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.GetField);
            var files = fi.GetValue (Files) as Dictionary<FilePath, ProjectFile>;

            /*foreach (var pf in e){
                // The old file won't be removed from that internal files dictionary - so go enforce this!
                files.Remove (pf.OldName);
                var ast = LocalFileCache.GetModuleByFileName (pf.OldName);
                if (ast == null)
                    continue;

                LocalFileCache.Remove (ast, true);
                ast.FileName = pf.NewName.ToString ();

                if (ast.OptionalModuleStatement == null) {
                    string parsedDir = null;
                    foreach (var dir in LocalFileCache.ParsedDirectories)
                        if (ast.FileName.StartsWith (dir)) {
                            parsedDir = dir;
                            break;
                        }
                    ast.ModuleName = DModule.GetModuleName (parsedDir, ast);
                }
                LocalFileCache.AddOrUpdate (ast);
            }*/

            base.OnFileRenamedInProject(e);
        }
예제 #20
0
		protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			base.OnFileRenamedInProject (e);
			if (Loading)
				return;
			
			if (e.ProjectFile.BuildAction == MonoDroidBuildAction.AndroidResource)
				QueueResgenUpdate ();
			//if renaming the file to "AndroidManifest.xml", and the manifest element is not in use, set it as a convenience
			else if (AndroidManifest.IsNullOrEmpty && e.NewName.ToRelative (BaseDirectory) == "AndroidManifest.xml")
				AndroidManifest = e.NewName;
			//track manifest file renames or things will break
			else if (AndroidManifest == e.OldName)
				AndroidManifest = e.NewName;
		}
예제 #21
0
		protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			IDELogger.Log ("MonobjcProject::OnFileRenamedInProject '{0}'", e);

			this.ResolverHandler.ClearCache();
			this.XcodeHandler.ClearXcodeProject();

			base.OnFileRenamedInProject (e);
		}
예제 #22
0
 internal void NotifyFileRenamedInProject(ProjectFileRenamedEventArgs args)
 {
     NotifyModified("Files");
     OnFileRenamedInProject(args);
 }
		void OnFileRenamed (object sender, ProjectFileRenamedEventArgs args)
		{
			foreach (ProjectFileRenamedEventInfo fargs in args) {
				RemoveFile (fargs.OldName);
				FileEntry file = AddFile (fargs.NewName);
				// CheckModifiedFiles won't detect new files, so parsing
				// must be manyally signaled
				QueueParseJob (file);
			}
		}
예제 #24
0
 protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     //e.
     //if (e.OldName == MainSource)
     //    MainSource = e.NewName;
     //base.OnFileRenamedInProject(e);
 }
예제 #25
0
 internal protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     next.OnFileRenamedInProject(e);
 }
예제 #26
0
		static void HandleRename (ProjectFileRenamedEventArgs e)
		{
			foreach (ProjectFileEventInfo args in e) {
				var file = args.ProjectFile;
				var tool = GetGenerator (file.Generator);
				if (tool == null)
					continue;
			}
		}
예제 #27
0
        protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
        {
            UpdateParseCache ();

            base.OnFileRenamedInProject (e);
        }
		public static void HandleRename (ProjectFileRenamedEventArgs args)
		{
			var file = args.ProjectFile;
			var tool = GetGenerator (file);
			if (tool == null)
				return;
		}