/// <summary>Called when the associated data file changed: added/removed assemblies or includes.</summary> /// <param name="dataDiff">The difference between the old and new data.</param> private void OnFileDataChanged([NotNull] T4DeclaredAssembliesDiff dataDiff) { ShellLocks.AssertWriteAccessAllowed(); if (!AssemblyReferenceManager.ProcessDiff(dataDiff)) { return; } var changeBuilder = new PsiModuleChangeBuilder(); changeBuilder.AddModuleChange(this, PsiModuleChange.ChangeType.Modified); // TODO: get rid of this queuing? ShellLocks.ExecuteOrQueueEx( "T4PsiModuleChange", () => ChangeManager.ExecuteAfterChange( () => ShellLocks.ExecuteWithWriteLock( () => { if (!IsValid()) { return; } ChangeManager.OnProviderChanged( ChangeProvider, changeBuilder.Result, SimpleTaskExecutor.Instance ); }) ) ); }
/// <summary>Called when the associated data file changed: added/removed assemblies or includes.</summary> /// <param name="dataDiff">The difference between the old and new data.</param> private void OnFileDataChanged([NotNull] T4DeclaredAssembliesDiff dataDiff) { ShellLocks.AssertWriteAccessAllowed(); if (!AssemblyReferenceManager.ProcessDiff(dataDiff)) { return; } NotifyModuleChange(); }