Exemple #1
0
 internal protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs args)
 {
     if (FileRenamedInProject != null)
     {
         FileRenamedInProject(this, args);
     }
 }
Exemple #2
0
 /// <summary>
 /// Raises the FileRenamedInProject event.
 /// </summary>
 protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     if (FileRenamedInProject != null)
     {
         FileRenamedInProject(this, e);
     }
 }
        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);
                }
            }
        }
 void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnFileRenamedInProject(e);
     }
     FileRenamedInProject?.Invoke(this, e);
 }
Exemple #5
0
 protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnFileRenamedInProject(e);
     }
     if (FileRenamedInProject != null)
     {
         FileRenamedInProject(this, e);
     }
 }
Exemple #6
0
		/// <summary>
		/// Raises the FileRenamedInProject event.
		/// </summary>
		protected virtual void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			if (FileRenamedInProject != null) {
				FileRenamedInProject (this, e);
			}
		}
Exemple #7
0
		internal void NotifyFileRenamedInProject (ProjectFileRenamedEventArgs args)
		{
			SetDirty ();
			NotifyModified ("Files");
			OnFileRenamedInProject (args);
		}
		void OnRenameFile (object sender, ProjectFileRenamedEventArgs args)
		{
			foreach (ProjectFileEventInfo e in args) {
				ITreeBuilder tb = Context.GetTreeBuilder (e.ProjectFile);
				if (tb != null) tb.Update ();
			}
		}
 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)));
 }
Exemple #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 ();
		}
		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 ();
		}
		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();
        }
 		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);
		}
Exemple #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);
        }
		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;
		}
		protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			IDELogger.Log ("MonobjcProject::OnFileRenamedInProject '{0}'", e);

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

			base.OnFileRenamedInProject (e);
		}
Exemple #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);
			}
		}
Exemple #24
0
 protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     //e.
     //if (e.OldName == MainSource)
     //    MainSource = e.NewName;
     //base.OnFileRenamedInProject(e);
 }
 internal protected virtual void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     next.OnFileRenamedInProject(e);
 }
		static void HandleRename (ProjectFileRenamedEventArgs e)
		{
			foreach (ProjectFileEventInfo args in e) {
				var file = args.ProjectFile;
				var tool = GetGenerator (file.Generator);
				if (tool == null)
					continue;
			}
		}
Exemple #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;
		}