Ejemplo n.º 1
0
        void Shell_FileSaved(object sender, Shell.FileSavedEventArgs e)
        {
            try
            {
                if (_model == null)
                {
                    return;
                }

                if (string.Equals(e.FileName, _model.FileName, StringComparison.OrdinalIgnoreCase))
                {
                    if (_model.FileContext != FileContext.Include &&
                        ProbeEnvironment.CurrentAppSettings.FileExistsInApp(_model.FileName))
                    {
                        _backgroundFecDeferrer.OnActivity();
                    }
                    else
                    {
                        foreach (var sourceFileName in ErrorTaskProvider.Instance.GetFilesForInclude(_model.FileName))
                        {
                            Shell.OnFileSaved(sourceFileName);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Log.WriteEx(ex);
            }
        }
Ejemplo n.º 2
0
        private void Shell_FileSaved(object sender, Shell.FileSavedEventArgs e)
        {
            try
            {
                var options = ProbeToolsPackage.Instance.EditorOptions;
                if (!options.DisableBackgroundScan)
                {
                    var fileContext = FileContextUtil.GetFileContextFromFileName(e.FileName);
                    if (ProbeEnvironment.CurrentAppSettings.FileExistsInApp(e.FileName))
                    {
                        if (fileContext != FileContext.Include && !FileContextUtil.IsLocalizedFile(e.FileName))
                        {
                            Log.Debug("Scanner detected a saved file: {0}", e.FileName);

                            EnqueueChangedFile(e.FileName);
                        }
                        else
                        {
                            Log.Debug("Scanner detected an include file was saved: {0}", e.FileName);

                            EnqueueFilesDependentOnInclude(e.FileName);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Log.WriteEx(ex);
            }
        }
Ejemplo n.º 3
0
 private void Shell_FileSaving(object sender, Shell.FileSavedEventArgs e)
 {
     if (e.FileName.Equals(_fullPathName, StringComparison.OrdinalIgnoreCase))
     {
         Log.Debug("Detected change in include file (saving): {0}", _fullPathName);
         OnFileChangeSuspected();
     }
 }