Exemplo n.º 1
0
        /// <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
                    );
            })
                    )
                );
        }
Exemplo n.º 2
0
 /// <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();
 }
Exemplo n.º 3
0
 public void Dispose() => AssemblyReferenceManager.Dispose();
Exemplo n.º 4
0
 public void AddBaseReferences() => AssemblyReferenceManager.AddBaseReferences();