Exemplo n.º 1
0
        public void Execute(IDataContext context, DelegateExecute nextExecute)
        {
            var store    = Shell.Instance.GetComponent <ISettingsStore>();
            var ctx      = store.BindToContextTransient(ContextRange.ApplicationWide);
            var settings = ctx.GetKey <ZenSharpSettings>(SettingsOptimization.DoMeSlowly);

            var solution = context.GetData(ProjectModelDataConstants.SOLUTION).NotNull("solution != null");
            var fsp      = FileSystemPath.CreateByCanonicalPath(ZenSharpSettings.GetTreePath(settings.TreeFilename));

            EditorManager.GetInstance(solution).OpenFileAsync(fsp, OpenFileOptions.DefaultActivate);
        }
        public void Execute(IDataContext context, DelegateExecute nextExecute)
        {
            var store    = Shell.Instance.GetComponent <ISettingsStore>();
            var ctx      = store.BindToContextTransient(ContextRange.ApplicationWide);
            var settings = ctx.GetKey <ZenSharpSettings>(SettingsOptimization.DoMeSlowly);

            var solution = context.GetData(DataConstants.SOLUTION);

            EditorManager.GetInstance(solution)
            .OpenFile(
                FileSystemPath.CreateByCanonicalPath(ZenSharpSettings.GetTreePath(settings.TreeFilename)),
                true,
                TabOptions.Default);
        }
Exemplo n.º 3
0
        private void Initialize(string settingsPath)
        {
            var path = ZenSharpSettings.GetTreePath(settingsPath);

            try
            {
                ReinitializeWatcher(path);
                WriteDefaultTemplates(path);
                Reload(path);
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
Exemplo n.º 4
0
 public bool ValidatePage()
 {
     try
     {
         // todo: use settings notification options
         var fullPath = ZenSharpSettings.GetTreePath(Path);
         _zenWatcher.Reload(fullPath);
         _zenWatcher.ReinitializeWatcher(fullPath);
         return(true);
     }
     catch (Exception exception)
     {
         PostValidationError = exception;
         return(false);
     }
 }